Running electron-pdf in a docker container produces no output
See original GitHub issueHi there.
I’m trying to running electron-pdf cli in a docker container with Xvfb but the cli produces no output and dont generate the pdf file. Any idea what could happening or how could I debug it to find the problem? I’ve tried several configurations in Dockerfile but all of them produces the same result .
This is my actual Dockerfile:
FROM node:slim
# Electron support (from: http://askubuntu.com/a/510186)
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' && \
apt-get update -y && \
apt-get install -y google-chrome-stable xvfb
RUN Xvfb -screen 1280x2000x32 :0 & export DISPLAY=:0
COPY ./ pdfbuilder
WORKDIR pdfbuilder
RUN npm install -g electron-pdf
RUN npm install --production
EXPOSE 80
ENV PORT 80
CMD ["node", "index.js"]
This is my test in index.js:
var exec = require("child_process").exec;
console.log("verifying electron-pdf");
exec("electron-pdf ./views/index.html ./teste.pdf", function (err, stdout, stderr) {
console.log(stdout); //no output
console.log(stderr); //no output
if (err) {
console.log("Error verifying electron-pdf");
console.log(err.stack);
} else {
console.log("electron-pdf OK!"); //shows output, but no pdf generated
}
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Running electron-pdf in a docker container produces no output
I'm trying to running electron-pdf cli in a docker container with Xvfb but the cli produces no output and dont generate the pdf...
Read more >Executable file produces no output, silently fails in Windows ...
This .exe should produce this output when called from the command line in any directory, and the permissions are good. However when ran...
Read more >Docker run does not display any output - Stack Overflow
But running docker run hello-world produce no output. Note on very first time I got additional messages regard installing image. Unable to find ......
Read more >How to Live Tail Docker Logs - Papertrail
Every container produces logs with valuable information. ... Therefore, you won't see any logging or other output from your Docker container.
Read more >jsreport/jsreport - Gitter
i'm up and running with docker image - but keep getting this error ... { "allowedModules": ["*"] } } - then restarted the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve found out what was the problem with the fonts.
I have to put a file called .fonts.conf in the /root with this content:
This make all the fonts work like a charm.
Sound’s like you’ve got this resolved, I’m going to close it.