Skip to content

Commit

Permalink
fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
YUN BAI committed Jun 14, 2024
1 parent 6ef0455 commit ca00a72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions manifest/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
CMD ["/dotblue", "--gf.gcfg.file", "/data/config/config.yaml"]

0 comments on commit ca00a72

Please sign in to comment.