Skip to content

Commit 1f814cd

Browse files
committed
CORS-3250: images/altinfra: add etcd/kas binaries from containers
When building the altinfra image for inclusion in the release payload, we cannot download any binaries as it is currently done for etcd/kas. Instead let's copy those binaries from their existing container images.
1 parent 2a373d1 commit 1f814cd

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

images/installer-altinfra/Dockerfile.ci

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,25 @@
77
# solutions. Once all providers have alternate implementations, this image will
88
# not be needed.
99

10-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
10+
FROM registry.ci.openshift.org/ocp/4.16:etcd AS etcd
11+
FROM registry.ci.openshift.org/ocp/4.16:hyperkube AS kas
12+
13+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
1114
# FIPS support is offered via the baremetal-installer image
1215
ENV GO_COMPLIANCE_EXCLUDE=".*"
1316
ARG TAGS="altinfra"
1417
ARG OPENSHIFT_INSTALL_CLUSTER_API=""
1518
WORKDIR /go/src/github.com/openshift/installer
19+
COPY --from=etcd /usr/bin/etcd /usr/bin/etcd
20+
COPY --from=kas /usr/bin/kube-apiserver /usr/bin/kube-apiserver
1621
COPY . .
22+
RUN mkdir -p cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH) && \
23+
mv /usr/bin/etcd /usr/bin/kube-apiserver -t cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH)/
1724
RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
1825
RUN go run -mod=vendor hack/build-coreos-manifest.go
1926

2027

21-
FROM registry.ci.openshift.org/ocp/4.16:base
28+
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
2229
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
2330
COPY --from=builder /go/src/github.com/openshift/installer/bin/manifests/ /manifests/
2431
RUN mkdir /output && chown 1000:1000 /output

0 commit comments

Comments
 (0)