-
Notifications
You must be signed in to change notification settings - Fork 59
/
operator-framework-tools.Dockerfile
35 lines (29 loc) · 1.34 KB
/
operator-framework-tools.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
# Update when available: registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.22-openshift-4.17
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.17 AS builder-rhel8
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
WORKDIR /src
COPY . .
# Remove after updating to rhel-8-golang-1.22-openshift-4.17
# Install golang 1.22.2
RUN go install -mod=mod golang.org/dl/go1.22.2@latest
RUN go1.22.2 download
RUN ln -s /go/bin/go1.22.2 /go/bin/go
# Now we can make registry
RUN make build/registry cross
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
WORKDIR /src
COPY . .
RUN make build/registry cross
FROM scratch
COPY --from=builder /src/bin/opm /tools/opm-rhel9
COPY --from=builder /src/bin/darwin-amd64-opm /tools/darwin-amd64-opm
COPY --from=builder /src/bin/windows-amd64-opm /tools/windows-amd64-opm
# copy the dynamically-linked versions to /tools with a -rhel8 suffix
COPY --from=builder-rhel8 /src/bin/opm /tools/opm-rhel8
USER 1001
LABEL io.k8s.display-name="OpenShift Operator Framework Tools" \
io.k8s.description="This is a non-runnable image containing binary builds of various Operator Framework tools, primarily used to publish binaries to the OpenShift mirror." \
maintainer="Odin Team <aos-odin@redhat.com>"