commit 79a873becdf6cc4c384db43b7e415e88b8110f3d
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-09-14T16:00:45Z |
| subject | Fixed incorrect build settings |
commit 79a873becdf6cc4c384db43b7e415e88b8110f3d
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-09-14T16:00:45Z
Fixed incorrect build settings
---
Dockerfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index a9f4261..f9c6c2f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,11 +10,11 @@ COPY "datasources" "./datasources/"
COPY "utils" "./utils/"
COPY *.go ./
-RUN go build -o /golifehkbot
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /golifehkbot
FROM scratch
COPY --from=build /golifehkbot /
-WORKDIR /tmp
+WORKDIR /
CMD [ "/golifehkbot" ]