Skip to content

Commit b48ecc5

Browse files
committed
chore: update Dockerfile
1 parent fcd2e4b commit b48ecc5

2 files changed

Lines changed: 10 additions & 18 deletions

File tree

Dockerfile

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
1-
FROM node:gallium-alpine
2-
3-
COPY . /origin
4-
5-
WORKDIR /origin
6-
7-
RUN npm ci && \
8-
npm run build && \
9-
npm prune --production && \
10-
cp -r dist /app && \
11-
cp -r node_modules /app/node_modules && \
12-
rm -rf /origin
13-
1+
FROM node:hydrogen-alpine AS builder
2+
COPY . /app
143
WORKDIR /app
4+
RUN npm ci && npm run build
155

6+
FROM node:hydrogen-alpine
7+
COPY --from=builder /app/dist /app
8+
COPY package*.json /app/
9+
WORKDIR /app
10+
RUN npm ci --omit=dev
1611
EXPOSE 5000
17-
18-
USER daemon
19-
20-
CMD ["node", "main.js"]
12+
ENTRYPOINT ["node", "src/main.js"]

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:gallium-alpine
1+
FROM node:hydrogen-alpine
22
COPY . /app
33
WORKDIR /app
44
RUN npm ci

0 commit comments

Comments
 (0)