-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
feature: Add Dockerfile for easier usage and integration #293
Comments
Hey sure why not, can we base it on the one from https://pptr.dev/guides/docker? FROM ghcr.io/puppeteer/puppeteer:latest
RUN npm install --global md-to-pdf
CMD [md-to-pdf] sth like this? |
We can, just the image seems to be a little bit huge, but maybe nobody cares? I don't know. Let me know if you have preference, maybe I can help test and send a PR for it. |
this is the list of packages it installs (source), what would you omit? Or would you not base it on Edit: maybe by not installing Chrome, and letting the |
FROM ghcr.io/puppeteer/puppeteer:latest
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD 1
USER root
RUN npm install --global md-to-pdf
USER pptruser
ENTRYPOINT ["md-to-pdf"]
CMD ["--help"] this is what I came up with now and seems to work fine but happy to get a better suggestion (:
then
|
I used to use Alpine-based node.js image and install the dependencies as mentioned here, but no guarantee which is better: |
Might be better cause the Puppeteer image comes with Puppeteer pre-installed which we don't actually need. But I like that this way we don't need to define/maintain a list of deps to install, leaving that to the Puppeteer team 🤓 |
Sure, sounds great, I found the image even correctly handles Chinese fonts already. |
Problem:
The
md-to-pdf
project currently lacks a Dockerfile, which may lead to:md-to-pdf
into CI/CD pipelines for automated conversion of Markdown files to PDF.Solution:
Add a Dockerfile to the project, providing an official, containerized environment with all necessary dependencies pre-installed. This would simplify the setup process, ensure consistency across different systems, enhance portability, and enable seamless integration with CI/CD pipelines.
If you believe this feature would be valuable to the project, I would be happy to submit a pull request containing a basic Dockerfile. Please let me know your thoughts on this suggestion. Thank you for considering this proposal!
The text was updated successfully, but these errors were encountered: