-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (27 loc) · 1.14 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
34
35
36
37
38
FROM node:14.18-slim
ENV CONTAINER_COMMAND=npm \
CONTAINER_USER=container
RUN set -ex \
&& groupadd -r $CONTAINER_USER --gid=1111 \
&& useradd -r -M -g $CONTAINER_USER -s /usr/sbin/nologin --uid=1111 $CONTAINER_USER
# Install headless chrome followed by instructions of puppeteer:
# https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
RUN apt-get update \
&& apt-get install -y wget gnupg libgconf-2-4 gosu \
&& 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-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 libxtst6 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Setup penthouse service:
WORKDIR /app
COPY entrypoint.sh /app
COPY package.json /app
COPY package-lock.json /app
RUN npm install
COPY src /app/src
EXPOSE 3000
# Execute penthouse service:
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["npm", "run", "service"]