title: html-pdf not work in docker to create pdf
body: <p>i have an node js app which deploy into docker and using html-pdf library.</p>
  <p>but when tried in local docker container, it return this error:</p>
  <pre><code>Error: spawn Unknown system error -8
  
  at ChildProcess.spawn (node:internal/child_process:415:11)
  
  at Object.spawn (node:child_process:698:9)
  
  at PDF.PdfExec [as exec] (/srv/node_modules/html-pdf/lib/pdf.js:89:28)
  
  at PDF.PdfToFile [as toFile] (/srv/node_modules/html-pdf/lib/pdf.js:85:8)
  
  at exports.renderPdf (/srv/service/PdfRenderer.js:27:14)
  
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  
  at async /srv/routes/Report.js:63:16 {
  
  
  
  errno: -8,
  
    code: 'Unknown system error -8',
  
    syscall: 'spawn'
  
  }
  </code></pre>
  <p>this is how i create dockerfile:</p>
  <pre><code>FROM mhart/alpine-node:16.4.2
  
  WORKDIR /srv
  ADD . .
  RUN npm install
  RUN apk update &amp;&amp; apk add --no-cache fontconfig curl curl-dev &amp;&amp; \
      mkdir -p /usr/share &amp;&amp; \
      cd /usr/share \
      &amp;&amp; curl -L https://github.com/Overbryd/docker-phantomjs-alpine/releases/download/2.11/phantomjs-alpine-x86_64.tar.bz2 | tar xj \
      &amp;&amp; ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs \
      &amp;&amp; phantomjs --version
  
  EXPOSE 3000
  CMD [&quot;node&quot;, &quot;index.js&quot;]
  </code></pre>
  <p>and this is how i'm rendering the PDF in node js:</p>
  <pre><code>const content = await compile(template, context)
          pdf.create(content,
              { format: 'Letter',
                  footer: { contents: footer, height: '20mm' },
                  header: { content: '', height: '6mm' },
                  timeout: 540000 })
              .toFile(path, (err, response) =&gt; {
              if (err) {
                  fs.unlinkSync(path)
                  return console.log(err);
              }
              const data = fs.readFileSync(path)
              res.setHeader('Content-Type', 'application/pdf')
              res.setHeader('Content-Length', fs.statSync(path).size + 200)
              res.send(data)
              return fs.unlinkSync(path)
            });
  </code></pre>
  <p>the line that didn't work at .toFile() which i'm not sure why. but i will need to return pdf file
  i've tried to install phantom prebuild and adding phantomPath but it's still return the same error.
  is there any way that i can do to fix this problem</p>