Fix OCP image build
# Build binaries
FROM registry.ci.openshift.org/openshift/release:golang-1.17 as builder
-
+WORKDIR /src
COPY . .
RUN CGO_ENABLED=1 GOFLAGS="" GO111MODULE=on go build -o /build/assisted-service cmd/main.go
RUN CGO_ENABLED=0 GOFLAGS="" GO111MODULE=on go build -o /build/assisted-service-operator cmd/operator/main.go
@@ -8,8 +8,7 @@ RUN CGO_ENABLED=0 GOFLAGS="" GO111MODULE=on go build -o /build/assisted-service-
RUN CGO_ENABLED=0 GOFLAGS="" GO111MODULE=on go build -o /build/agent-based-installer-register-cluster-and-infraenv cmd/agentbasedinstaller/client/main.go
-FROM quay.io/ocpmetal/oc-image:bug-1823143-multi-arch-ai-bug-2069976 as oc-image
-
+FROM registry.ci.openshift.org/ocp/4.11:cli AS oc-image
# Create final image
FROM registry.ci.openshift.org/ocp/4.11:base
@@ -17,8 +16,7 @@ ARG WORK_DIR=/data
RUN mkdir $WORK_DIR && chmod 775 $WORK_DIR
-#TODO: Use official oc client once it has ICSP support https://bugzilla.redhat.com/show_bug.cgi?id=1823143
-COPY --from=oc-image /oc /usr/local/bin/
+COPY --from=oc-image /usr/bin/oc /usr/local/bin/
COPY --from=builder /build/assisted-service /assisted-service
COPY --from=builder /build/assisted-service-operator /assisted-service-operator
