Switched dockerfile to pnpm with cache
This commit is contained in:
parent
fa51b31fe4
commit
78fea1ea04
15
Dockerfile
15
Dockerfile
@ -1,11 +1,12 @@
|
||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.17
|
||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.17 as build
|
||||
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
||||
WORKDIR /app
|
||||
RUN npm i -g pnpm@7
|
||||
|
||||
COPY . .
|
||||
RUN pnpm i --frozen-lockfile
|
||||
RUN pnpm build
|
||||
RUN pnpm postbuild
|
||||
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
|
||||
RUN pnpm i && pnpm build && pnpm postbuild
|
||||
|
||||
# final image
|
||||
FROM registry.odit.services/library/nginx-brotli:3.15
|
||||
COPY --from=0 /app/dist /usr/share/nginx/html
|
||||
FROM registry.odit.services/library/nginx-brotli:3.15 as final
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
Loading…
x
Reference in New Issue
Block a user