From 8caafb8ec4fa2a4bf971d41b04b6a57cfe487f05 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Tue, 10 Oct 2017 10:58:05 +0200 Subject: [PATCH] Refactor Dockerfile --- Dockerfile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30e5c60..0614cc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,13 @@ -FROM znly/protoc -RUN apk --update add make git go rsync -COPY . /go/src/github.com/moul/protoc-gen-gotemplate -WORKDIR /go/src/github.com/moul/protoc-gen-gotemplate -RUN go install . -ENV PATH=${PATH}:${GOPATH}/bin +FROM znly/protoc + +ENV GOPATH=/go \ + PATH=/go/bin:${PATH} + +# Install deps and common tools +RUN apk --update add make git go rsync libc-dev \ + && go get -u golang.org/x/tools/cmd/goimports + +# Install protoc-gen-gotemplate +COPY . /go/src/github.com/moul/protoc-gen-gotemplate +WORKDIR /go/src/github.com/moul/protoc-gen-gotemplate +RUN go install .