-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (29 loc) · 887 Bytes
/
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
39
FROM kthregistry.azurecr.io/kth-nodejs-18:latest
LABEL maintainer="KTH-studadm [email protected]"
WORKDIR /application
ENV NODE_PATH /application
ENV TZ Europe/Stockholm
# Copy files.
COPY ["config", "config"]
COPY ["common", "common"]
COPY ["public", "public"]
COPY ["i18n", "i18n"]
COPY [".babelrc", ".babelrc"]
COPY [".eslintrc", ".eslintrc"]
COPY ["package.json", "package.json"]
COPY ["package-lock.json", "package-lock.json"]
# Copy source files.
COPY ["app.js", "app.js"]
COPY ["server", "server"]
# Copy source files, so changes does not trigger gulp.
COPY ["build.sh", "build.sh"]
COPY ["webpack.config.js", "webpack.config.js"]
RUN chmod a+rx build.sh && \
chown -R node:node /application
USER node
RUN npm pkg delete scripts.prepare && \
npm ci --unsafe-perm && \
npm run build && \
npm prune --production
EXPOSE 3000
CMD ["node", "app.js"]