From 67c2e994cc697b7b82cbf6a4e4ef62ba5c6c55e7 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Tue, 25 Jun 2024 12:01:50 +0200 Subject: [PATCH] fix: :bug: disable CGO to be used in alpine image --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0740bfc..08b4845 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM golang:1.22 as builder -WORKDIR /plugin +WORKDIR /drone-gitea-release COPY go.mod go.sum ./ RUN go mod download COPY . . -RUN go build -o plugin +RUN CGO_ENABLED=0 go build -o drone-gitea-release FROM alpine:3.6 as alpine RUN apk add -U --no-cache ca-certificates @@ -16,5 +16,5 @@ ENV GODEBUG netdns=go COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /plugin/plugin /bin/ -ENTRYPOINT ["/bin/plugin"] +COPY --from=builder /drone-gitea-release/drone-gitea-release /bin/ +ENTRYPOINT ["/bin/drone-gitea-release"]