Docker - Creating base image with RHEL iso

2019-04-25 09:49发布

I am trying to use a RHEL image for my project. Is there a way to create a base image with my RHEL 6's iso file? I am not using Fedora as it is beneficial for my project to use the RHEL distribution instead.

1条回答
做自己的国王
2楼-- · 2019-04-25 10:22

If you want a fair bit of control, you may want to look into the script in the Docker contrib repository on Github.

One of them is for "yum" based images, Centos in this case, but there's no reason it shouldn't work for RHEL.

It bootstraps itself through a series of YUM installs. If you look at the usage:

OPTIONS:
-p "<packages>"  The list of packages to install in the container.
               The default is blank.
-g "<groups>"    The groups of packages to install in the container.
               The default is "Core".
-y <yumconf>     The path to the yum config to install packages from. The
               default is /etc/yum.conf for Centos/RHEL and /etc/dnf/dnf.conf for Fedora

you can see that you can provide your own yum.conf, which you can set to use your ISO as source.

查看更多
登录 后发表回答