github.com/m3db/m3@v1.5.0/scripts/thriftgen.Dockerfile (about) 1 # built artifacts maintained externally at https://quay.io/repository/m3db/thrift-gen 2 3 # stage 1: build thrift-gen binary 4 FROM golang:1.12-alpine3.9 AS thriftgen 5 LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>" 6 7 # install git 8 RUN apk add --update git glide 9 10 # get thrift-gen deps 11 RUN go get -u github.com/uber/tchannel-go 12 13 # build thrift-gen 14 RUN cd /go/src/github.com/uber/tchannel-go && \ 15 git checkout thrift-v1.0.0-dev && \ 16 glide install && \ 17 go install github.com/uber/tchannel-go/thrift/thrift-gen 18 19 # stage 2: merge thrift-gen into thrift base image 20 FROM thrift:0.10.0 21 LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>" 22 23 COPY --from=thriftgen /go/bin/thrift-gen /bin/thrift-gen 24 25 ENTRYPOINT [ "/bin/thrift-gen" ]