-
Bug
-
Resolution: Done
-
Normal
-
None
-
4.13.0
-
None
-
Important
-
None
-
Proposed
-
False
-
Description of problem:
For arm64 OCP 4.12 cluster, running `make image` from https://github.com/openshift/cluster-nfd-operator.git to build the NFD operator image from master branch fails. Need to update Dockerfile otherwise the following error is generated: [1/2] STEP 4/4: RUN make build exec /bin/sh: exec format error Error: error building at STEP "RUN make build": error while running runtime: exit status 1 Dockerfile updates needed: # Build the manager binary ## FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.11 AS builder FROM docker.io/arm64v8/golang as builder WORKDIR /go/src/github.com/openshift/cluster-nfd-operator # Build COPY . . RUN make build # Create production image for running the operator ## FROM registry.ci.openshift.org/ocp/4.11:base FROM ubi8/ubi ARG CSV=4.11 COPY --from=builder /go/src/github.com/openshift/cluster-nfd-operator/node-feature-discovery-operator / RUN mkdir -p /opt/nfd COPY build/assets /opt/nfd COPY manifests /manifests RUN useradd cluster-nfd-operator USER cluster-nfd-operator ENTRYPOINT ["/node-feature-discovery-operator"] LABEL io.k8s.display-name="node-feature-discovery-operator" \ io.k8s.description="This is the image for the Node Feature Discovery Operator."
Version-Release number of selected component (if applicable):
# oc version Client Version: 4.12.0-0.nightly-arm64-2022-10-20-033224 Kustomize Version: v4.5.7 Server Version: 4.12.0-0.nightly-arm64-2022-10-20-033224 Kubernetes Version: v1.25.2+495fa99
How reproducible:
Every time
Steps to Reproduce:
1. git clone https://github.com/openshift/cluster-nfd-operator.git 2. cd cluster-nfd-operator 3. export REGISTRY_AUTH_FILE=/root/<latest-pull-secret-oneline>.json 4. ORG=<quay.io_username> PULLPOLICY=Always IMAGE_REGISTRY='quay.io/<quay.io_username>' IMAGE_PUSH_CMD='podman push' IMAGE_BUILD_CMD='podman build' make image
Actual results:
# ORG=wabouham PULLPOLICY=Always IMAGE_REGISTRY='quay.io/wabouham' IMAGE_PUSH_CMD='podman push' IMAGE_BUILD_CMD='podman build' make image podman build -t quay.io/wabouham/cluster-nfd-operator:eaa9a7ac \ \ ./ [1/2] STEP 1/4: FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.11 AS builder Trying to pull registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.11... Getting image source signatures Copying blob b229e0b81723 done Copying blob 4bf9a8e44e67 done Copying blob 545277d80005 skipped: already exists Copying blob f70d60810c69 skipped: already exists Copying config d4f4d4a4ee done Writing manifest to image destination Storing signatures [1/2] STEP 2/4: WORKDIR /go/src/github.com/openshift/cluster-nfd-operator --> 26a108b869d [1/2] STEP 3/4: COPY . . --> 9c92d0c1298 [1/2] STEP 4/4: RUN make build exec /bin/sh: exec format error Error: error building at STEP "RUN make build": error while running runtime: exit status 1 make: *** [Makefile:158: image] Error 1 #
Expected results:
make image to complete successfully and generate the NFD operator image
Additional info:
- is depended on by
-
OCPBUGS-3677 NFD cluster-nfd-operator make image support for arm64 deployment from github repo needs Dockerfile updates
- Closed