-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.obo
35 lines (27 loc) · 1.4 KB
/
Dockerfile.obo
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
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.22 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY observability-operator/ .
ENV GOFLAGS='-mod=mod'
ENV CGO_ENABLED=1
# Build
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -tags netgo,osusergo -o manager cmd/operator/main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM registry.redhat.io/ubi8/ubi-minimal:8.10-1130
WORKDIR /
RUN microdnf install -y rsync tar xz
COPY --from=builder /workspace/manager .
COPY --from=builder --chmod=0755 /workspace/must-gather/collection-scripts/* /usr/bin/
COPY --from=builder /workspace/LICENSE /licenses/.
USER 65532:65532
ENTRYPOINT ["/manager"]
LABEL com.redhat.component="coo-operator" \
name="Cluster Observability Operator" \
version="v1.0.0" \
summary="Cluster Observability Operator" \
io.openshift.tags="openshift,observability" \
io.k8s.display-name="Cluster Observability Operator" \
io.k8s.description="Cluster Observability Operator enables administrators to create standalone monitoring stacks that are independently configurable for use by different services and users." \
maintainer="Cluster Observability Operator Team <[email protected]>" \
description="Cluster Observability Operator"