Skip to content

Commit cd94a2a

Browse files
committed
♻️ use pnpm instead of bun
1 parent fac5af2 commit cd94a2a

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

build.Dockerfile

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
1-
FROM node:lts-alpine AS base
1+
FROM node:lts-alpine AS builder
22

33
ARG ZANE_DOMAINS
44
ENV ZANE_DOMAINS=$ZANE_DOMAINS
5+
ENV FORCE_COLOR=true
56

6-
# Install additionnal dependencies for bun, ref : https://github.com/oven-sh/bun/issues/5545
7-
RUN apk --no-cache add ca-certificates wget
8-
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
9-
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
10-
RUN apk add --no-cache --force-overwrite glibc-2.28-r0.apk
11-
12-
# Install bun
13-
RUN npm install -g bun
7+
# install pnpm
8+
RUN npm install -g pnpm@8
149

1510
# Install packages
1611
WORKDIR /usr/src/app
17-
COPY . /usr/src/app
18-
COPY ./package.json bun.lockb /usr/src/app/
19-
RUN FORCE_COLOR=true bun install --frozen-lockfile
12+
COPY package.json ./pnpm-lock.yaml ./
13+
RUN pnpm install --frozen-lockfile
2014

2115
# run build
22-
RUN FORCE_COLOR=true bun run build
16+
COPY . ./
17+
RUN pnpm run build
2318

19+
### Production phase
2420
FROM caddy:2.9-alpine as production
2521

2622
LABEL org.opencontainers.image.source = "https://github.com/zane-ops/docs"
2723

2824
WORKDIR /var/www/html
2925

30-
COPY --from=build-env /usr/src/app/dist ./
26+
COPY --from=builder /usr/src/app/dist ./
3127
COPY ./Caddyfile /etc/caddy/Caddyfile

bun.lockb

-279 KB
Binary file not shown.

0 commit comments

Comments
 (0)