Update Dockerfile for smaller image
This commit is contained in:
parent
88694c7e27
commit
1d70bd132a
2 changed files with 13 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM node:14-alpine
|
||||
FROM node:14-alpine as builder
|
||||
|
||||
RUN apk update && apk add --no-cache nano curl
|
||||
|
||||
|
@ -18,6 +18,12 @@ RUN mkdir -p ./public ./data \
|
|||
&& mv ./client/build/* ./public \
|
||||
&& rm -rf ./client
|
||||
|
||||
FROM node:14-alpine
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 5005
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
|
|
@ -20,6 +20,12 @@ RUN mkdir -p ./public ./data \
|
|||
&& rm -rf ./client \
|
||||
&& apk del build-dependencies
|
||||
|
||||
FROM node:14-alpine
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 5005
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
|
Loading…
Reference in a new issue