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.
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.
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 .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With