openshift / jenkins

Apache License 2.0
260 stars 446 forks source link

dnf install file returns error as "Unable to find a match: file" #1774

Open XiMeiZhu opened 2 months ago

XiMeiZhu commented 2 months ago

We're using this as a base image: FROM quay.io/openshift/origin-jenkins-agent-base:4.12.0

Then we need to install a package which is required for security scanning, but it says "Unable to find a match: file".

This is the line of the dockerfile that has the error: RUN dnf install file -y Our jenkins slave is running in openshift cluster in IBM cloud platform. Please provide some guidance on how to fix this. Thanks.

XiMeiZhu commented 2 months ago

This is the output with image build: STEP 1/2: FROM quay.io/openshift/origin-jenkins-agent-base:4.12.0 WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64) STEP 2/2: RUN dnf install file -y Updating Subscription Management repositories. Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

rhel-8-baseos 0.0 B/s | 0 B 00:02
Errors during downloading metadata for repository 'rhel-8-baseos':