From 061dc289c8f1572ec6a30ad9bacd6263ab9054ff Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Jul 2024 22:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20a473c..2480534 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ - -FROM registry.cn-hangzhou.aliyuncs.com/syschan/golang:alpine as builder +ARG registry=registry.cn-hangzhou.aliyuncs.com/syschan +FROM ${registry}/golang:alpine as builder WORKDIR /app COPY . . RUN go generate && source ./bin/start/.env && go build -o ./bin/$appName -v . -FROM registry.cn-hangzhou.aliyuncs.com/syschan/alpine:latest +FROM ${registry}/alpine:latest WORKDIR /app COPY --from=builder /app/bin/ . RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk add bash && chmod +x ./start/script.sh