From 1d1cff4805bc882c7b63f8097136b0029f5c702c Mon Sep 17 00:00:00 2001 From: Eli Yip Date: Wed, 28 May 2025 11:03:27 +0800 Subject: [PATCH] ci: fix Dockerfile bin location --- .goreleaser.yaml | 2 ++ Dockerfile | 4 ++-- Dockerfile.goreleaser | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 46acb6e..d7e2972 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,6 +8,8 @@ before: builds: - id: dashboard-server + env: + - CGO_ENABLED=0 goos: - linux goarch: diff --git a/Dockerfile b/Dockerfile index 9537283..6dfa4f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,10 +17,10 @@ WORKDIR /app COPY --link static/ ./static/ -COPY --link --from=builder /app/dashboard-server /usr/local/bin/dashboard-server +COPY --link --from=builder /app/dashboard-server /app/dashboard-server EXPOSE 9099 ENV SERVER_PORT="9099" -CMD ["dashboard-server"] \ No newline at end of file +CMD ["/app/dashboard-server"] \ No newline at end of file diff --git a/Dockerfile.goreleaser b/Dockerfile.goreleaser index fcf31a5..6a8f670 100644 --- a/Dockerfile.goreleaser +++ b/Dockerfile.goreleaser @@ -1,10 +1,10 @@ FROM alpine:3.21 -COPY --link dashboard-server /usr/local/bin/dashboard-server -COPY --link static/ ./static/ +WORKDIR /app + +COPY --link . . EXPOSE 9099 - ENV SERVER_PORT="9099" -ENTRYPOINT ["dashboard-server"] +CMD ["/app/dashboard-server"]