SHA256
@@ -1,5 +1,7 @@
|
||||
# ---- 前端构建 ----
|
||||
FROM node:20-alpine AS web-builder
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
WORKDIR /app/web
|
||||
COPY web/package.json web/package-lock.json ./
|
||||
RUN npm ci
|
||||
@@ -19,6 +21,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o ashareview .
|
||||
|
||||
# ---- 运行镜像 ----
|
||||
FROM alpine:3.20
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
RUN apk add --no-cache tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
WORKDIR /app
|
||||
COPY --from=go-builder /app/server/ashareview .
|
||||
|
||||
Reference in New Issue
Block a user