From 91e76b6d2b62a0382d11c97a04a7ac0ff281be38 Mon Sep 17 00:00:00 2001 From: lab Date: Sun, 5 Dec 2021 00:56:32 +0800 Subject: [PATCH] fix: add local files in Dockerfile --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b5ffeb5..d5f8b4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,10 @@ ENV CGO_ENABLED=0 ENV GOOS="linux" ENV GOARCH="amd64" +ADD ./ /src + +WORKDIR /src + RUN apk --no-cache add ca-certificates RUN go build -ldflags="-s -w" -tags timetzdata -o app main.go @@ -12,7 +16,7 @@ FROM scratch as production ENV TZ="Asia/Shanghai" COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /app . +COPY --from=builder /src/app . CMD ["./app"] \ No newline at end of file