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:
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.