Customizing the container gateway image, error: cannot update repo 'ubi-9-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
search cancel

Customizing the container gateway image, error: cannot update repo 'ubi-9-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

book

Article ID: 375010

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

When working on updating the container image to deploy upgraded CA API services --version 11.0.00_20240730 -- and noticed the OS in the image was updated and package manager was removed.

We stored rules/assertions in GITLAB and pull them from the repository when docker services are started.  In order to do this we need to be able to install the git client in the image.  When we tried to upgrade we noticed the yum and dnf are absent.

Is there a reason why this was removed? How can we go about customizing the image to fit our process?

(CA note:  user should use microdnf instead of yum after 11.0CR2).

When try to run

>microdnf update 

Got error: cannot update repo 'ubi-9-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Status code: 403 for https://xxxxx.packages.broadcom.com/artifactory/gateway-redhat-ubi-rpm/dist/ubi9/9/x86_64/baseos/os/repodata/repomd.xml

Environment

11.x containter gateway

Cause

Beginning with Gateway version 11.0 CR2, due to the transition from CentOS to UBI as the base image, users must use microdnf instead of yum. and  version 11.0.00_20240730  is 11.0 CR02 + July 24 MPP.   So you should use microdnf instead of yum.  
 
The url https://xxxxx.packages.broadcom.com is changed to internal only and customer can not access it from outside.  
 

Resolution

When customer wants to build their own images on top of gateway image, they can prepare a repo with public accessed urls and copy it the target using COPY command in Dockerfile.  Sample modified the Dockerfile: 

 

FROM caapim/gateway:11.1.00_20240730

WORKDIR /R_setup

USER root

COPY ubi.repo /etc/yum.repos.d/ubi.repo

RUN microdnf --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms -y install yum

CMD ["bash"]

And sample ubi.repo file is attached. 

Attachments

ubi.repo get_app