troubleshooting: document running on alpine
See original GitHub issueFrom @jamrizzi on https://github.com/GoogleChrome/puppeteer/issues/379#issuecomment-358215741, we should add notes to troubleshooting.md to help users.
Running on Alpine
The newest Chromium package of Chrome supported on Alpine is 63, which was the version of Chrome bundled with Puppeteer v0.11.0.
Example Dockerfile:
FROM node:9-alpine
# Installs latest Chromium (63) package.
RUN apk update && apk upgrade && \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
apk add --no-cache \
chromium@edge \
nss@edge
# Help prevent zombie chrome processes
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
COPY . /app/
WORKDIR app
# Install deps for server.
RUN yarn
# Skip downloading Chromium when installing puppeteer. We'll use the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Use Puppeteer 0.11.0 b/c it bundles Chromium 63.
RUN yarn add puppeteer@0.11.0
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \
&& mkdir -p /home/pptruser/Downloads \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app
# Run user as non privileged.
USER pptruser
EXPOSE 8080
ENTRYPOINT ["dumb-init", "--"]
CMD ["yarn", "start"]
Launching Chrome:
const browser = await puppeteer.launch({
executablePath: '/usr/bin/chromium-browser',
args: ['--disable-dev-shm-usage']
});
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Alpine Linux:FAQ
This is a list of frequently asked questions about Alpine Linux. If your question is not answered on this page, use the search...
Read more >How to Fix and Debug Docker Containers Like a Superhero
Confirm that permissions are incorrect. Run a chmod 774 command to let this file read, write, and execute for all users. Use docker...
Read more >Troubleshooting - Puppeteer
Make sure all the necessary dependencies are installed. You can run ldd chrome | grep not on a Linux machine to check which...
Read more >Run Grafana Docker image | Grafana documentation
Guide for running Grafana using Docker. ... Each edition is available in two variants: Alpine and Ubuntu. See below. For documentation regarding the ......
Read more >Using the official AWS CLI version 2 Amazon ECR Public ...
This enables you to provide input to the AWS CLI version 2 while it's running in a container, for example, by using 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
The latest version of puppeteer is not supported by the latest version of chrome alpine supports. Sorry, it’s just the way it is right now.
@fadc80 chrome doesn’t install twice if you use set
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true