forked from m3db/m3db-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (20 loc) · 802 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# stage 1: build
FROM golang:1.18-alpine3.16 AS builder
LABEL maintainer="The m3db-operator Authors <m3db@googlegroups.com>"
# Install CA certs for curl
RUN apk add --update ca-certificates openssl && \
rm -rf /var/cache/apk/*
# Install Build Binaries
RUN apk add --update curl git make bash
# Add source code
RUN mkdir -p /go/src/github.com/m3db/m3db-operator
ADD . /go/src/github.com/m3db/m3db-operator
# Build m3dbnode binary
RUN cd /go/src/github.com/m3db/m3db-operator/ && \
git submodule update --init && \
make m3db-operator
# stage 2: lightweight "release"
FROM alpine:latest
LABEL maintainer="The m3db-operator Authors <m3db@googlegroups.com>"
COPY --from=builder /go/src/github.com/m3db/m3db-operator/out/m3db-operator /bin/m3db-operator
ENTRYPOINT [ "/bin/m3db-operator" ]