|
|
|
@ -1,18 +1,23 @@
|
|
|
|
|
FROM node:9-alpine
|
|
|
|
|
|
|
|
|
|
# Installs latest Chromium (63) package.
|
|
|
|
|
# Source https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
|
|
|
|
|
# Installs latest Chromium (68) package.
|
|
|
|
|
ENV CHROME_BIN=/usr/bin/chromium-browser
|
|
|
|
|
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 && \
|
|
|
|
|
echo @v3.8 http://nl.alpinelinux.org/alpine/v3.8/community >> /etc/apk/repositories && \
|
|
|
|
|
echo @v3.8 http://nl.alpinelinux.org/alpine/v3.8/main >> /etc/apk/repositories && \
|
|
|
|
|
apk add --no-cache \
|
|
|
|
|
chromium@edge \
|
|
|
|
|
nss@edge
|
|
|
|
|
chromium@v3.8 \
|
|
|
|
|
nss@v3.8
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
COPY package.json ./
|
|
|
|
|
COPY yarn.lock ./
|
|
|
|
|
|
|
|
|
|
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
|
|
|
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
|
|
|
|
|
|
|
|
|
RUN yarn
|
|
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
@ -30,4 +35,4 @@ USER pptruser
|
|
|
|
|
|
|
|
|
|
ENV NODE_ENV production
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
CMD [ "yarn", "start" ]
|
|
|
|
|
CMD [ "yarn", "start" ]
|
|
|
|
|