-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (22 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
FROM node:16-alpine as builderBe
ENV NODE_ENV build
USER node
WORKDIR /home/node
COPY package.json ./
COPY yarn.lock ./
RUN yarn install --frozen-lockfile
COPY --chown=node:node . .
RUN yarn build
# ---
FROM node:16-alpine
USER node
WORKDIR /home/node
COPY --from=builderBe --chown=node:node /home/node/docker/docker-entrypoint.sh ./
COPY --from=builderBe --chown=node:node /home/node/package*.json ./
COPY --from=builderBe --chown=node:node /home/node/node_modules/ ./node_modules/
COPY --from=builderBe --chown=node:node /home/node/dist/ ./dist/
COPY --from=builderBe --chown=node:node /home/node/ormconfig.ts ./
COPY --from=builderBe --chown=node:node /home/node/src/test/test.pdf ./src/test/test.pdf
COPY --from=builderBe --chown=node:node /home/node/src/test/test.txt ./src/test/test.txt
RUN chmod 755 ./docker-entrypoint.sh
ENTRYPOINT ["./docker-entrypoint.sh"]