Switched dockerfile to pnpm 8 with cache

This commit is contained in:
Nicolai Ort 2023-03-29 19:52:31 +02:00
parent 16ce0a8480
commit 93d43b7684
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 5 additions and 2 deletions

View File

@ -1,11 +1,14 @@
# Typescript Build
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
WORKDIR /app
COPY package.json ./
RUN npx pnpm@7.26.3 i
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 && pnpm i
COPY tsconfig.json ormconfig.js ./
COPY src ./src
RUN npm run build
RUN pnpm build
# final image
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16