Jenkinsfile

This commit is contained in:
2026-06-09 21:44:37 +08:00
parent 0484e79978
commit fbf31183ae
2 changed files with 42 additions and 3 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.7
# ─── Stage 1: web build ───
FROM node:22-alpine AS web
FROM registry.jerryyan.top/library/node:22-alpine AS web
WORKDIR /web
COPY web/package.json web/pnpm-lock.yaml* ./
RUN corepack enable && (pnpm install --frozen-lockfile || pnpm install)
@@ -9,7 +9,7 @@ COPY web .
RUN pnpm build
# ─── Stage 2: go build ───
FROM golang:1.25-alpine AS go
FROM registry.jerryyan.top/library/golang:1.25-alpine AS go
WORKDIR /src
RUN apk add --no-cache git
COPY go.mod go.sum ./
@@ -19,7 +19,7 @@ COPY --from=web /web/dist/. ./cmd/server/web/dist/
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags='-s -w' -o /out/server ./cmd/server
# ─── Stage 3: runtime ───
FROM alpine:3.20
FROM registry.jerryyan.top/library/alpine:3.20
RUN apk add --no-cache ca-certificates tzdata && \
addgroup -S app && adduser -S app -G app
WORKDIR /app