From 67f0502649784616019f3f0fd354f2ed1a1fc3a9 Mon Sep 17 00:00:00 2001 From: rick Date: Tue, 4 Apr 2023 14:10:45 +0800 Subject: [PATCH] fix the base image --- Dockerfile | 6 +++--- Makefile | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b71c1c5f..65b974cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ COPY . . RUN go mod download RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest . -FROM alpine:3.10 +FROM ubuntu:23.04 LABEL "com.github.actions.name"="API testing" LABEL "com.github.actions.description"="API testing" @@ -18,6 +18,6 @@ LABEL "maintainer"="Rick " LABEL "Name"="API testing" -COPY --from=builder /workspace/atest /usr/bin/atest +COPY --from=builder /workspace/atest /usr/local/bin/atest -ENTRYPOINT [atest, server] +CMD ["atest", "server"] diff --git a/Makefile b/Makefile index 51b8c1ec..e577fc6e 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,8 @@ goreleaser: goreleaser build --rm-dist --snapshot build-image: docker build -t ghcr.io/linuxsuren/api-testing:dev . +run-image: + docker run ghcr.io/linuxsuren/api-testing:dev copy: build sudo cp bin/atest /usr/local/bin/ test: