From 2457914641a049898436b774856fede92a2b0adb Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Sat, 22 Jun 2024 16:27:54 +0200 Subject: [PATCH] feat: :sparkles: add dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0740bfc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM golang:1.22 as builder + +WORKDIR /plugin + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . +RUN go build -o plugin + +FROM alpine:3.6 as alpine +RUN apk add -U --no-cache ca-certificates + +FROM alpine:3.6 +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"]