Skip to content

Commit 135de5c

Browse files
committed
fix: dockerfile to use pnpm for ui build
1 parent d76108c commit 135de5c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

build/Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,19 @@ RUN go mod verify
2929
RUN --mount=type=cache,target="/root/.cache/go-build" \
3030
go build -o ChargePi -v -tags="linux" .
3131

32-
FROM --platform=$BUILDPLATFORM node:19 AS build-ui
32+
FROM --platform=$BUILDPLATFORM node:24 AS build-ui
33+
3334
WORKDIR /ui
3435

35-
COPY ./ui/package*.json .
36-
COPY ./ui .
36+
RUN corepack enable pnpm
37+
RUN corepack install -g [email protected]
38+
COPY ./ui/pnpm-lock.yaml ./
39+
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --frozen-lockfile
40+
COPY ./ui/package*.json ./
41+
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile --prod
3742

38-
RUN --mount=type=cache,target=/root/.npm npm install
39-
RUN npm run build
43+
COPY ./ui .
44+
RUN pnpm build
4045

4146
# Test the client
4247
FROM --platform=$BUILDPLATFORM vektra/mockery:v2.9.4 AS test

0 commit comments

Comments
 (0)