From c498e2978bcb3a385d2453b235c3c1af50f21de4 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 18 Feb 2020 11:59:35 +0100 Subject: [PATCH] Remove onbuild and go-wrapper from Docker build onbuild images [0] are deprecated go-wrapper [1] is deprecated [0] https://github.com/docker-library/official-images/issues/2076 [1] https://github.com/docker-library/golang/pull/205 --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ad81c71..12ee94c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,9 @@ -FROM golang:onbuild -ENTRYPOINT ["go-wrapper", "run"] -CMD [""] +FROM golang:latest as build +WORKDIR /go/src/app +COPY . . +RUN go get -d -v ./... +RUN go install -v ./... + +FROM debian:buster +COPY --from=build /go/bin/app / +ENTRYPOINT ["/app"]