-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running on alpine #24
Comments
Hi @PJUllrich, thanks for sharing your configuration for the Docker Alpine version. I will try it to check if everything is working, but can you explain if the versions set on your example need to be fixed, or can be the last version ?
Do we really need all this flags ?
|
The Unfortunately, these flags are necessary in order to make this run on
I hope this answers your questions :) |
Yes, thanks for the detailed answer. I will check if everything is working, if you want you can open a PR to include this information you have written in the README.md, or I will add it later. Thanks! |
Please verify whether this works for you. I added a link to this issue to the Readme in #25 |
Thanks, I finally got time to test it. I notice that in your example you use
Puppeteer-pdf executable will be on: Here my
|
Please be aware that you need to turn around the
I already updated my Dockerfile in my first post. |
Is that a problem that happen right now ? When I tested I didn't have any issue generating the PDF. |
Yes, it occurred only now. I cannot pinpoint why this happened now other than observing that |
I encountered a range of dependency problems, when I tried to run this in an
alpine
docker container. I wanted to share how to make this run with(elixir) puppeteer-pdf=1.0.3
and(node) puppeteer-pdf=1.2.0
. The main source of making this work was the documentation on the official Puppeteer GitHub page.Prepare your
alpine
Docker containerI used this
Dockerfile
for building the container:Set
launch
arguments inpuppeteer-pdf.js
Change the following line in your
/usr/lib/node_modules/puppeteer-pdf/puppeteer-pdf.js
file:Now, you "should" be able to use the
(elixir) puppeteer-pdf
library onalpine
as well!Problems encountered
Just for documentation purposes, I'm adding some error logs that I've encountered until I found this solution.
Without settting the
--disable-gpu
and--disable-software-rasterizer
flagBonus: Insert your own
.css
file.In your
puppeteer-pdf.js
file, add the following line:The text was updated successfully, but these errors were encountered: