github.com/m3db/m3@v1.5.0/docker/m3aggregator/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 m3aggregator-linux-amd64
    16  
    17  # stage 2: lightweight "release"
    18  FROM alpine:3.11
    19  LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>"
    20  
    21  EXPOSE 5000/tcp 6000/tcp 6001/tcp
    22  
    23  RUN apk add --no-cache curl jq
    24  
    25  COPY --from=builder /go/src/github.com/m3db/m3/bin/m3aggregator /bin/
    26  COPY --from=builder /go/src/github.com/m3db/m3/src/aggregator/config/m3aggregator.yml /etc/m3aggregator/m3aggregator.yml
    27  
    28  ENTRYPOINT [ "/bin/m3aggregator" ]
    29  CMD [ "-f", "/etc/m3aggregator/m3aggregator.yml" ]