From 66c71faf10d0dc86857738386d9c3914ad3017dd Mon Sep 17 00:00:00 2001 From: rasmus Date: Sun, 6 Nov 2022 15:06:11 +0200 Subject: [PATCH] Add Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fbfcabc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# https://github.com/jtagcat/dotfiles/blob/main/scripts/template/gobuild.Dockerfile +FROM golang:1.19 AS builder +WORKDIR /wd + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . ./ +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o logmower-shippper + +FROM alpine +LABEL org.opencontainers.image.source="https://git.k-space.ee/k-space/logmower-shipper" +WORKDIR /wd +#RUN apk --no-cache add ca-certificates + +COPY --from=builder /wd/logmower-shippper ./ +CMD ["./logmower-shippper"]