-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
39 lines (29 loc) · 898 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-20:latest
LABEL maintainer="KTH-studadm [email protected]"
WORKDIR /application
ENV NODE_PATH /application
ENV TZ Europe/Stockholm
COPY ["config", "config"]
COPY ["i18n", "i18n"]
COPY ["public", "public"]
COPY ["server", "server"]
COPY ["domain", "domain"]
COPY [".babelrc", ".babelrc"]
COPY ["app.js", "app.js"]
COPY ["build.sh", "build.sh"]
COPY ["package.json", "package.json"]
COPY ["package-lock.json", "package-lock.json"]
COPY ["webpack.config.js", "webpack.config.js"]
# Config for jest tester
COPY ["babel.config.js", "babel.config.js"]
COPY ["jest.config.js", "jest.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
ENV TZ Europe/Stockholm
CMD ["npm", "start"]