Moved docker to pnpm with cache
This commit is contained in:
parent
fe62ad5539
commit
4cbd26580e
10
Dockerfile
10
Dockerfile
@ -1,11 +1,15 @@
|
|||||||
FROM registry.odit.services/hub/library/node:19.7.0-alpine3.16 as build
|
FROM registry.odit.services/hub/library/node:19.7.0-alpine3.16 as build
|
||||||
|
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json ./
|
|
||||||
RUN npx pnpm@7 i
|
|
||||||
COPY package.json pnpm-lock.yaml *.config.js postcss.config.cjs tailwind.config.js vite.config.js index.html ./
|
COPY package.json pnpm-lock.yaml *.config.js postcss.config.cjs tailwind.config.js vite.config.js index.html ./
|
||||||
|
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@7.29.3
|
||||||
|
RUN mkdir /pnpm && pnpm config set store-dir /pnpm && pnpm i
|
||||||
|
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY public ./public
|
COPY public ./public
|
||||||
RUN npm run build
|
RUN pnpm build
|
||||||
|
|
||||||
# final image
|
# final image
|
||||||
FROM registry.odit.services/library/nginx-brotli:3.15 as final
|
FROM registry.odit.services/library/nginx-brotli:3.15 as final
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user