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
|
WORKDIR /app
|
||||||
RUN npm i -g pnpm@7
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm i --frozen-lockfile
|
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
|
||||||
RUN pnpm build
|
RUN pnpm i && pnpm build && pnpm postbuild
|
||||||
RUN pnpm postbuild
|
|
||||||
# final image
|
# final image
|
||||||
FROM registry.odit.services/library/nginx-brotli:3.15
|
FROM registry.odit.services/library/nginx-brotli:3.15 as final
|
||||||
COPY --from=0 /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
COPY ./nginx.conf /etc/nginx/nginx.conf
|
Loading…
x
Reference in New Issue
Block a user