|
|
|
@@ -1,6 +1,4 @@ |
|
|
|
# syntax=docker/dockerfile:1 |
|
|
|
|
|
|
|
FROM oven/bun:latest AS builder |
|
|
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/oven/bun:latest AS builder |
|
|
|
|
|
|
|
# 使用淘宝镜像加速 |
|
|
|
ENV BUN_INSTALL_REGISTRY=https://registry.npmmirror.com |
|
|
|
@@ -30,7 +28,7 @@ COPY . . |
|
|
|
COPY --from=builder /build/dist ./web/dist |
|
|
|
RUN --mount=type=cache,target=/root/.cache/go-build go build -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$(cat VERSION)'" -o new-api |
|
|
|
|
|
|
|
FROM debian:bookworm-slim |
|
|
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/debian:bookworm-slim |
|
|
|
|
|
|
|
# 使用阿里云镜像源 |
|
|
|
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources |
|
|
|
|