protoc-gen-go-micro/Dockerfile

19 lines
646 B
Docker
Raw Normal View History

2020-05-20 14:22:18 +03:00
# builder
2020-09-06 21:58:51 +03:00
FROM golang:1.15-alpine as builder
2020-05-20 14:22:18 +03:00
RUN apk --no-cache add make git go rsync libc-dev
RUN go get -u golang.org/x/tools/cmd/goimports
RUN go get -u github.com/gobuffalo/packr/v2/packr2
COPY . /go/src/moul.io/protoc-gen-gotemplate
WORKDIR /go/src/moul.io/protoc-gen-gotemplate
RUN packr2
RUN go install -a -tags netgo -ldflags '-w -extldflags "-static"' . ./cmd/web-editor
RUN ls -la /go/bin
2017-10-10 11:58:05 +03:00
2020-05-20 14:22:18 +03:00
# runtime
2020-09-06 21:58:51 +03:00
FROM znly/protoc:0.4.0
2020-05-20 14:22:18 +03:00
COPY --from=builder /go/bin/web-editor /go/bin/
COPY --from=builder /go/bin/protoc-gen-gotemplate /go/bin/
ENV PATH=$PATH:/go/bin
EXPOSE 8080
ENTRYPOINT []