-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
33 lines (22 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM node:12
# Based on
# https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable ttf-freefont --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /srv/todo/storage \
&& mkdir -p /srv/todo/end-to-end-test \
&& chown -R node:node /srv/todo
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN usermod --groups audio,video node &&\
mkdir -p /home/node/Downloads
USER node
WORKDIR /srv/todo/storage
COPY --chown=node:node storage/package.json storage/package-lock.json ./
RUN npm install --quiet
WORKDIR /srv/todo/end-to-end-test
COPY --chown=node:node end-to-end-test/package.json end-to-end-test/package-lock.json ./
RUN mkdir node_modules
RUN npm install --quiet