Last active
April 1, 2019 20:38
-
-
Save GingerBear/783b770819f38f1e743b1f926a6384bd to your computer and use it in GitHub Desktop.
alpine node3 with python 3 and puppeteer ready
This file contains hidden or 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: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