Skip to content

Commit 3fd8e0a

Browse files
authored
build: reduce docker images size (#87)
1 parent cb65582 commit 3fd8e0a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Dockerfile.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
FROM node:18-alpine
2-
3-
ENV NODE_ENV=production
4-
1+
FROM node:18-slim as builder
2+
WORKDIR /app
53
RUN npm install -g dashpress
64

5+
FROM node:18-slim
6+
ENV NODE_ENV=production
7+
COPY --from=builder /usr/local/lib/node_modules /usr/local/lib/node_modules
8+
COPY --from=builder /usr/local/bin /usr/local/bin
79
WORKDIR /app
8-
910
EXPOSE 3000
10-
1111
CMD ["dashpress"]
1212

1313
# Steps to use

0 commit comments

Comments
 (0)