generated from KTH/node-web
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (28 loc) · 878 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
FROM kthregistry.azurecr.io/kth-nodejs-20:latest
LABEL maintainer="KTH-studadm [email protected]"
WORKDIR /application
ENV NODE_PATH /application
ENV TZ Europe/Stockholm
# Copy files used by Gulp.
COPY ["config", "config"]
COPY ["public", "public"]
COPY ["tinymce", "tinymce"]
COPY ["i18n", "i18n"]
COPY [".babelrc", ".babelrc"]
COPY [".eslintrc", ".eslintrc"]
COPY ["package.json", "package.json"]
COPY ["package-lock.json", "package-lock.json"]
# Copy source files, so changes does not trigger gulp.
COPY ["app.js", "app.js"]
COPY ["server", "server"]
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"]