Skip to content

Instantly share code, notes, and snippets.

@GingerBear
Last active April 1, 2019 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GingerBear/783b770819f38f1e743b1f926a6384bd to your computer and use it in GitHub Desktop.
Save GingerBear/783b770819f38f1e743b1f926a6384bd to your computer and use it in GitHub Desktop.
alpine node3 with python 3 and puppeteer ready
FROM node:10-alpine
# Installs Python 3
RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -r /root/.cache
# Installs latest Chromium (71) 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 \
harfbuzz@edge \
nss@edge
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN apk update
RUN apk add postgresql-dev gcc python3-dev musl-dev
RUN apk add --update py3-lxml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment