-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (27 loc) · 866 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
40
41
FROM node:18-alpine AS build
WORKDIR /app
RUN mkdir data
COPY . .
RUN npm install
RUN npm run build
#######################################
FROM node:18-alpine AS node
FROM pandoc/core:3-alpine
COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/share /usr/local/share
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin
COPY --from=node /opt /opt
WORKDIR /app
RUN rm -rf ./*
COPY --from=build /app/package*.json ./
RUN npm install --production
COPY --from=build /app/backend/dist ./backend/dist
COPY --from=build /app/frontend/dist ./frontend/dist
EXPOSE 8080
# Add tini init system for process reaping
RUN apk add --no-cache tini
# From node dockerfile
ENTRYPOINT ["tini", "--", "docker-entrypoint.sh"]
CMD [ "node", "backend/dist/main.js" ]