forked from mongodb/mongodb-atlas-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.post-install
36 lines (28 loc) · 896 Bytes
/
Dockerfile.post-install
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
28
29
30
31
32
33
34
35
36
# Build the manager binary
FROM golang:1.18 as builder
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY cmd/post-install/main.go cmd/post-install/main.go
COPY pkg/ pkg/
COPY Makefile Makefile
COPY hack/licenses licenses
RUN make post-install-hook
FROM busybox
LABEL name="MongoDB Atlas Operator Post Install Hook" \
maintainer="[email protected]" \
vendor="MongoDB" \
release="1" \
summary="MongoDB Atlas Operator Post Install Hook Image"
WORKDIR /
COPY --from=builder /workspace/bin/helm-post-install .
COPY hack/licenses licenses
ENTRYPOINT ["/helm-post-install"]