github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/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.17-alpine3.15 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@v1.31.0 12 13 # build thrift-gen 14 RUN cd /go/pkg/mod/github.com/uber/tchannel-go@v1.31.0 && \ 15 go mod vendor && \ 16 go install github.com/uber/tchannel-go/thrift/thrift-gen 17 18 # stage 2: merge thrift-gen into thrift base image 19 FROM thrift:0.10.0 20 LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>" 21 22 COPY --from=thriftgen /go/bin/thrift-gen /bin/thrift-gen 23 24 ENTRYPOINT [ "/bin/thrift-gen" ]