Last active
April 19, 2018 18:22
-
-
Save wioux/dd0869e26c6140ef09b25375bcc93fa5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8.11.1 | |
RUN git clone https://github.com/Szpadel/chrome-headless-render-pdf.git /test | |
WORKDIR /test | |
RUN apt-get update && apt-get install -y fonts-liberation libappindicator1 libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libcups2 libdbus-1-3 libgtk-3-0 libnspr4 libnss3 libx11-xcb1 libxss1 lsb-release xdg-utils | |
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
RUN dpkg -i google-chrome-stable_current_amd64.deb | |
# RUN git remote add wioux https://github.com/wioux/chrome-headless-render-pdf.git | |
# RUN git fetch wioux && git checkout wioux/setvirtualtimepolicy_after_page_load | |
RUN yarn install && yarn run build | |
RUN echo "<html><body><h1>hello world</h1></body></html>" >test.html | |
CMD ["node", "dist/cli/chrome-headless-render-pdf.js", \ | |
"--chrome-option=--no-sandbox", \ | |
"--url=file:///test/test.html", \ | |
"--pdf", "test.pdf"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment