0

I'm customizing a Dockerfile for an application which is using redhat/ubi8-micro:8.6 as the base image and I want to install nfs-utils package on top of that.

I enabled all the repos that was available within the image under /etc/yum.repos.d/ubi.repo.

[ubi-8-baseos-rpms]
[ubi-8-baseos-debug-rpms]
[ubi-8-baseos-source]
[ubi-8-appstream-rpms]
[ubi-8-appstream-debug-rpms]
[ubi-8-appstream-source]

I can install other packages using microdnf package manger which is available within the image, but the nfs-utils package is not available.

I tried below ways to install it.

  1. A multi-stage docker build to install nfs-utils package and tried copying over all the files but it didn't work, As some dependencies and libraries were missing
  2. Downloaded the nfs-utils-1.3.0-0.68.el7.x86_64.rpm rpm package directly from internet and tried installing with rpm -ivh nfs-utils-1.3.0-0.68.el7.x86_64.rpm but it fails to install as it expects other dependencies to installed before installing it.

Is there a simple way to install the nfs-utils package inside redhat/ubi8-micro:8.6 docker image?

chandrashekar
  • 35
  • 1
  • 1
  • 7
  • The `microdnf` command doesn't appear to be available in that image. – larsks Jun 27 '23 at 17:38
  • 1
    You could try installing the `nfs-utils` package available from the [Centos 8-stream repository](http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/). – larsks Jun 27 '23 at 17:41
  • Thank you @larsks I was able to install the `nfs-utils` package with centos-8 repository that you provided with below commands. # First I installed yum `RUN microdnf install -y yum` # Than installed `nfs-utils` with below command `RUN yum --nogpgcheck --repofrompath=centos,http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/ install -y nfs-utils` – chandrashekar Jun 28 '23 at 07:46

0 Answers0