-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
36 lines (30 loc) · 1.07 KB
/
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
28
29
30
31
32
33
34
35
# Build the manager binary
FROM golang:1.22.6 as builder
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 api/ api/
COPY controllers/ controllers/
COPY pkg/ pkg/
COPY cmd/ cmd/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -o cnvrg-operator cmd/operator/main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -o cnvrg-metastorageprovisioner cmd/metastorageprovisioner/main.go
FROM registry.access.redhat.com/ubi9/ubi:latest
LABEL name="cnvrg-operator" \
vendor="cnvrg.io" \
version="4.3.16" \
release="4.3.16" \
summary="Cnvrg K8s Operator" \
description="cnvrg.io AIOS patform"
RUN dnf update -y
USER 1000
WORKDIR /opt/app-root
COPY license /licenses
COPY --from=builder /workspace/cnvrg-operator .
COPY --from=builder /workspace/cnvrg-metastorageprovisioner .