-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Dockerfile.ci
35 lines (30 loc) · 1.69 KB
/
Dockerfile.ci
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
# This Dockerfile is used by CI to publish the installer image.
# It builds an image containing only the openshift-install.
FROM registry.ci.openshift.org/ocp/4.17:installer-terraform-providers AS providers
# We copy from the -artifacts images because they are statically linked
FROM registry.ci.openshift.org/ocp/4.17:installer-kube-apiserver-artifacts AS kas-artifacts
FROM registry.ci.openshift.org/ocp/4.17:installer-etcd-artifacts AS etcd-artifacts
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.17 AS builder
# FIPS support is offered via the baremetal-installer image
ENV GO_COMPLIANCE_EXCLUDE=".*"
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/ terraform/bin/
COPY --from=kas-artifacts /usr/share/openshift/ cluster-api/bin/
COPY --from=etcd-artifacts /usr/share/openshift/ cluster-api/bin/
RUN mkdir -p cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH) && \
mv cluster-api/bin/$(go env GOOS)/$(go env GOHOSTARCH)/* -t cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH)/
RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
RUN go run -mod=vendor hack/build-coreos-manifest.go
FROM registry.ci.openshift.org/ocp/4.17:base-rhel9
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
COPY --from=builder /go/src/github.com/openshift/installer/bin/manifests/ /manifests/
RUN mkdir /output && chown 1000:1000 /output
USER 1000:1000
ENV PATH /bin
ENV HOME /output
WORKDIR /output
# We're not really an operator, we're just getting some data into the release image.
LABEL io.openshift.release.operator=true
ENTRYPOINT ["/bin/openshift-install"]