Docker - 使用RHEL iso创建基本映像 [英] Docker - Creating base image with RHEL iso

查看:265
本文介绍了Docker - 使用RHEL iso创建基本映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用RHEL图像作为我的项目。有没有办法用我的RHEL 6的iso文件创建基本图像?我不使用Fedora,因为我的项目使用RHEL分发是有益的。

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.

推荐答案

如果你想要一个公平的的控制,您可能需要查看Docker中的脚本 contrib存储库 Github。

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

其中一个是用于yum的图像,在这种情况下,Centos,但没有理由不适用于RHEL。

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

它通过一系列YUM安装来引导自身。如果您查看使用情况:

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

您可以看到可以提供自己的yum.conf,您可以将其设置为使用ISO作为源。

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

这篇关于Docker - 使用RHEL iso创建基本映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆