From 37651a69774cab4f884ccfba5770bd145fd2fca8 Mon Sep 17 00:00:00 2001 From: NewName Date: Sun, 18 May 2025 10:40:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ghproxy/Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ghproxy/Dockerfile b/ghproxy/Dockerfile index 3aff630..e95c2a6 100644 --- a/ghproxy/Dockerfile +++ b/ghproxy/Dockerfile @@ -5,20 +5,17 @@ COPY go.mod go.sum ./ RUN go mod download COPY . . -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ghproxy . -FROM alpine:3.20 +FROM alpine WORKDIR /root/ # 安装skopeo -RUN apk add --no-cache skopeo +RUN apk add --no-cache skopeo && mkdir -p temp && chmod 700 temp -# 创建临时目录 -RUN mkdir -p ./temp && chmod 777 ./temp - -COPY --from=builder /app/main . +COPY --from=builder /app/ghproxy . COPY --from=builder /app/config.json . COPY --from=builder /app/public ./public -CMD ["./main"] \ No newline at end of file +CMD ["./ghproxy"]