-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile_dev
42 lines (31 loc) · 906 Bytes
/
Dockerfile_dev
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
39
40
FROM node:14-alpine
# required for errors in npm ci
RUN npm install npm@latest -g
# Installs latest Chromium (76) package.
RUN apk add --no-cache \
curl \
chromium \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont \
git \
openssh && \
rm -rf /var/lib/apt/lists/* && \
update-ca-certificates
ENV NODE_ENV production
ENV NODE_EXTRA_CA_CERTS /etc/ssl/certs/ca-certificates.crt
ENV CICD_ATF_BROWSER /usr/bin/chromium-browser
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
VOLUME ["/opt/cicd", "/home/node/.ssh"]
RUN mkdir -p /usr/src/app
RUN chown node:node /usr/src/app
USER node
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --no-optional --no-audit --silent && npm cache clean --force
COPY ["project-templates/", "modules/", "cicd.js", "server.js", "worker.js", "./"]
EXPOSE 8080 8443
CMD npm update && npm start