From 4db4b8909d21d62ce97d31a07891183e1440cc7b Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Wed, 2 Oct 2019 03:47:21 +0000 Subject: [PATCH] Fix docker build --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 03d9948..9d72869 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ -FROM golang -COPY . /go/src/github.com/raviqqe/liche -RUN CGO_ENABLED=0 GOOS=linux go get /go/src/github.com/raviqqe/liche +FROM golang:1.12 +COPY . /src +ENV CGO_ENABLED=0 GO111MODULE=on GOOS=linux +WORKDIR /src +RUN go build -o liche FROM alpine RUN apk --no-cache add ca-certificates -COPY --from=0 /go/bin/liche /liche +COPY --from=0 /src/liche /liche ENTRYPOINT ["/liche"]