Docker - Creating base image with RHEL iso

∥☆過路亽.° 提交于 2019-12-07 00:22:38

问题


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.



来源:https://stackoverflow.com/questions/27518646/docker-creating-base-image-with-rhel-iso

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!