Skip to content

Commit

Permalink
feat: add protoc docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Nov 15, 2018
1 parent 6394895 commit 56f785f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/docker/protoc/Dockerfile
@@ -0,0 +1,17 @@
FROM moul/protoc-gen-gotemplate:latest as pgg

FROM golang:1.11-alpine as builder
RUN apk --no-cache add make git go rsync libc-dev openssh docker
RUN go get -u -v \
github.com/opsee/protobuf/protoc-gen-gogoopsee

FROM golang:1.11-alpine
RUN apk --no-cache add git make protobuf gcc libc-dev && \
mkdir -p /.cache/go-build && \
chmod -R 777 /.cache
COPY --from=pgg /go/bin/* /go/bin/
COPY --from=builder /go/bin/* /go/bin/
COPY --from=pgg /protobuf /protobuf
ENV GOPATH=/go \
PATH=/go/bin:${PATH} \
GOROOT=/usr/local/go
9 changes: 9 additions & 0 deletions build/docker/protoc/Makefile
@@ -0,0 +1,9 @@
IMAGE ?= pathwar/protoc:v1

.PHONY: release
build:
docker build --pull -t $(IMAGE) .

.PHONY: release
release: build
docker push $(IMAGE)

0 comments on commit 56f785f

Please sign in to comment.