github.com/m3db/m3@v1.5.0/docker/m3coordinator/Dockerfile (about) 1 # stage 1: build 2 FROM golang:1.16.5-alpine3.13 AS builder 3 LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>" 4 5 # Install deps 6 RUN apk add --update git make bash 7 8 # Add source code 9 RUN mkdir -p /go/src/github.com/m3db/m3 10 ADD . /go/src/github.com/m3db/m3 11 12 # Build m3coordinator binary 13 RUN cd /go/src/github.com/m3db/m3/ && \ 14 git submodule update --init && \ 15 make m3coordinator-linux-amd64 16 17 # stage 2: lightweight "release" 18 FROM alpine:3.11 19 LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>" 20 21 # Provide timezone data to allow TZ environment variable to be set 22 # for parsing relative times such as "9am" correctly and respect 23 # the TZ environment variable. 24 RUN apk add --no-cache tzdata 25 26 EXPOSE 7201/tcp 7203/tcp 27 28 COPY --from=builder /go/src/github.com/m3db/m3/bin/m3coordinator /bin/ 29 COPY --from=builder /go/src/github.com/m3db/m3/src/query/config/m3coordinator-local-etcd.yml /etc/m3coordinator/m3coordinator.yml 30 31 ENTRYPOINT [ "/bin/m3coordinator" ] 32 CMD [ "-f", "/etc/m3coordinator/m3coordinator.yml" ]