Update dockerfile for pnpm

This commit is contained in:
Matthias 2024-05-24 06:57:36 +02:00
parent 9821d69cdf
commit fed52a6240

View File

@ -1,19 +1,19 @@
FROM node:22.2.0-alpine as ui-builder FROM node:22.2.0-alpine as ui-builder
RUN mkdir /app RUN mkdir /app \
&& corepack enable
WORKDIR /app WORKDIR /app
COPY package.json yarn.lock .yarnrc.yml /app/ COPY package.json pnpm-lock.yaml /app/
COPY .yarn/releases/ /app/.yarn/releases/
RUN apk add --update --no-cache g++ make\ RUN apk add --update --no-cache g++ make git \
&& yarn install\ && pnpm install --frozen-lockfile \
&& apk del g++ make && apk del g++ make
COPY . /app COPY . /app
RUN yarn build RUN pnpm run build
FROM nginx:1.26.0-alpine FROM nginx:1.26.0-alpine
COPY --from=ui-builder /app/dist /etc/nginx/html COPY --from=ui-builder /app/dist /etc/nginx/html