github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/docker/m3query/Dockerfile (about) 1 # stage 1: build 2 FROM golang:1.18-alpine3.15 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 m3query-linux-amd64 16 17 # stage 2: lightweight "release" 18 FROM alpine:3.15 19 LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>" 20 21 EXPOSE 7201/tcp 7203/tcp 22 23 # Provide timezone data to allow TZ environment variable to be set 24 # for parsing relative times such as "9am" correctly and respect 25 # the TZ environment variable. 26 RUN apk add --no-cache tzdata 27 28 COPY --from=builder /go/src/github.com/m3db/m3/bin/m3query /bin/ 29 COPY --from=builder /go/src/github.com/m3db/m3/src/query/config/m3query-local-etcd.yml /etc/m3query/m3query.yml 30 31 ENTRYPOINT [ "/bin/m3query" ] 32 CMD [ "-f", "/etc/m3query/m3query.yml" ]