smaller Dockerfile [skip-ci]
This commit is contained in:
parent
81b314ac55
commit
86ef277c90
20
Dockerfile
20
Dockerfile
|
@ -1,15 +1,15 @@
|
||||||
FROM node:16-alpine as run
|
FROM node:16.6.2-alpine3.14
|
||||||
|
|
||||||
COPY package.json .
|
|
||||||
RUN yarn --prod
|
|
||||||
|
|
||||||
ENV NODE_ENV production
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY package.json .
|
||||||
|
COPY yarn.lock .
|
||||||
|
RUN yarn --production --frozen-lockfile
|
||||||
COPY migrations ./migrations
|
COPY migrations ./migrations
|
||||||
COPY src/server.js ./
|
COPY src/server.js ./
|
||||||
COPY knexfile.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"]
|
CMD ["node", "./server.js"]
|
Loading…
Reference in New Issue