From ca00a720ebda26280b6d2e2280440790548ed85c Mon Sep 17 00:00:00 2001 From: YUN BAI Date: Fri, 14 Jun 2024 14:18:28 +0800 Subject: [PATCH] fix dockerfile --- manifest/docker/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/manifest/docker/Dockerfile b/manifest/docker/Dockerfile index bc9b168..da2d39c 100644 --- a/manifest/docker/Dockerfile +++ b/manifest/docker/Dockerfile @@ -5,6 +5,9 @@ FROM golang:alpine as build ############################################################################### ENV WORKDIR /release + +WORKDIR $WORKDIR + ADD . . RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -ldflags="-s -w" -o dotblue main.go @@ -21,7 +24,8 @@ FROM scratch as prod # 在build阶段复制可执行的go二进制文件app COPY --from=build /release/dotblue / # 在build阶段复制配置文件 -COPY --from=build /release/manifest/config /config + +COPY --from=build /release/manifest/config /data/ # 启动服务 -CMD ["/dotblue", "-c", "/config/config.yaml"] \ No newline at end of file +CMD ["/dotblue", "--gf.gcfg.file", "/data/config/config.yaml"] \ No newline at end of file