From 8d4401e59d43da77972c6016ad1238cd36c099d5 Mon Sep 17 00:00:00 2001 From: Stanislav Blokhin Date: Sat, 5 Mar 2022 21:49:33 +0100 Subject: [PATCH] Simplify Dockerfile Thanks to goreleaser we can just copy the binary into the image instead of building it. --- Dockerfile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index f00fd63..3eee762 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,4 @@ -FROM golang:1.17-alpine as builder -WORKDIR /go/src/couchlock -RUN apk --no-cache add git -COPY *.go go.mod ./ -RUN go build -v - FROM alpine:3.13 RUN apk --no-cache add ca-certificates -COPY --from=builder /go/src/couchlock/couchlock /usr/bin/ - -ENTRYPOINT ["couchlock"] +COPY couchlock /usr/bin/ +ENTRYPOINT ["/usr/bin/couchlock"]