smaller Dockerfile [skip-ci]

This commit is contained in:
Philipp Dormann 2021-08-14 10:42:42 +02:00
parent 81b314ac55
commit 86ef277c90
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
1 changed files with 10 additions and 10 deletions

View File

@ -1,15 +1,15 @@
FROM node:16-alpine as run
COPY package.json .
RUN yarn --prod
ENV NODE_ENV production
EXPOSE 3000
FROM node:16.6.2-alpine3.14
WORKDIR /app
COPY package.json .
COPY yarn.lock .
RUN yarn --production --frozen-lockfile
COPY migrations ./migrations
COPY src/server.js ./
COPY knexfile.js ./
#
FROM astefanutti/scratch-node:16.0.0
WORKDIR /app
COPY --from=0 /app /
ENV NODE_ENV production
EXPOSE 3000
CMD ["node", "./server.js"]