Switched dockerfile over to pnpm + cache
And bumped build image to fresh node
This commit is contained in:
parent
7f7b743f41
commit
701aae9ed4
19
Dockerfile
19
Dockerfile
@ -1,12 +1,15 @@
|
||||
FROM node:15.11.0-alpine3.13
|
||||
FROM registry.odit.services/hub/library/node:19.8.1-alpine3.16 as build
|
||||
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN yarn
|
||||
RUN yarn build
|
||||
|
||||
COPY package.json pnpm-lock.yaml *.config.cjs *.config.js index.html ./
|
||||
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 && pnpm i
|
||||
|
||||
COPY src ./src
|
||||
COPY public ./public
|
||||
RUN pnpm build
|
||||
|
||||
# final image
|
||||
FROM alpine
|
||||
COPY --from=0 /app/dist /app
|
||||
FROM fholzer/nginx-brotli:v1.19.1
|
||||
COPY --from=1 /app /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
|
5995
licenses.md
5995
licenses.md
File diff suppressed because it is too large
Load Diff
2644
pnpm-lock.yaml
Normal file
2644
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user