COPY by stage name
This commit is contained in:
parent
93d43b7684
commit
a64f6c9822
@ -1,5 +1,5 @@
|
|||||||
# Typescript Build
|
# Typescript Build
|
||||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as build
|
||||||
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@ -11,8 +11,8 @@ COPY src ./src
|
|||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# final image
|
# final image
|
||||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as final
|
||||||
COPY package.json ormconfig.js ./
|
COPY package.json ormconfig.js ./
|
||||||
RUN npx pnpm@7.26.3 i --prod
|
RUN npx pnpm@7.26.3 i --prod
|
||||||
COPY --from=0 /app/dist dist
|
COPY --from=build /app/dist dist
|
||||||
ENTRYPOINT ["node", "dist/app.js"]
|
ENTRYPOINT ["node", "dist/app.js"]
|
Loading…
x
Reference in New Issue
Block a user