question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

troubleshooting: document running on alpine

See original GitHub issue

From @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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
clayrissercommented, Feb 15, 2018

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.

1reaction
clayrissercommented, May 10, 2019

@fadc80 chrome doesn’t install twice if you use set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found