Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker - Creating base image with RHEL iso

Tags:

docker

image

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.

like image 563
Hans Avatar asked Dec 17 '14 05:12

Hans


People also ask

Can I create a Docker image from ISO?

Finally, we can compress and import the image using Docker. Where IMAGENAME is the name you want to give the image and TAG is a tag for the image. When the process completes, you'll see an sha256 hash for the image printed out. And that's all there is to creating your own Docker images from downloaded ISOs.

How Docker Base images are created?

Create a simple parent image using scratch Assuming you built the “hello” executable example by using the source code at https://github.com/docker-library/hello-world, and you compiled it with the -static flag, you can build this Docker image using this docker build command: $ docker build --tag hello .

Does Docker image include base image?

A Docker image has many layers, and each image includes everything needed to configure a container environment -- system libraries, tools, dependencies and other files. Some of the parts of an image include: Base image. The user can build this first layer entirely from scratch with the build command.


1 Answers

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.

like image 197
Marakai Avatar answered Nov 15 '22 08:11

Marakai