github.com/m3db/m3@v1.5.0/docker/m3dbnode/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 m3dbnode binary 13 RUN cd /go/src/github.com/m3db/m3/ && \ 14 git submodule update --init && \ 15 make m3dbnode-linux-amd64 16 17 # Stage 2: lightweight "release" 18 FROM alpine:3.11 19 LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>" 20 21 ENV GODEBUG madvdontneed=1 22 23 EXPOSE 2379/tcp 2380/tcp 7201/tcp 7203/tcp 9000-9004/tcp 24 25 # Provide timezone data to allow TZ environment variable to be set 26 # for parsing relative times such as "9am" correctly and respect 27 # the TZ environment variable. 28 RUN apk add --no-cache tzdata curl jq 29 30 COPY --from=builder /go/src/github.com/m3db/m3/src/dbnode/config/m3dbnode-local-etcd.yml /etc/m3dbnode/m3dbnode.yml 31 COPY --from=builder /go/src/github.com/m3db/m3/bin/m3dbnode \ 32 /go/src/github.com/m3db/m3/scripts/m3dbnode_bootstrapped.sh \ 33 /bin/ 34 35 ENV GODEBUG madvdontneed=1 36 37 ENTRYPOINT [ "/bin/m3dbnode" ] 38 CMD [ "-f", "/etc/m3dbnode/m3dbnode.yml" ]