clean, multistage Dockerfile

pull/32/head^2
Philipp Dormann 3 years ago
parent c4bc95927f
commit 010302395f
No known key found for this signature in database
GPG Key ID: 3BB9ADD52DCA4314

@ -1,10 +1,17 @@
FROM node:16.4.2-alpine3.14
#
WORKDIR /app
COPY . .
RUN yarn
RUN yarn --frozen-lockfile
RUN yarn build
#
EXPOSE 50013
FROM node:16.4.2-alpine3.14
WORKDIR /app
VOLUME ["/app/data"]
CMD ["npm", "run", "start-server"]
EXPOSE 50013
COPY package.json yarn.lock ./
COPY ./db /app/db
COPY ./server /app/server
RUN yarn --frozen-lockfile --prod
RUN yarn cache clean
COPY --from=0 /app/dist /app/dist
ENTRYPOINT ["node", "server/server.js"]

Loading…
Cancel
Save