This is a minimal rhel 7 image.
You can use the following docker command to run the minimal docker image:
sudo docker run -it richxsl/rhel7 /bin/bash
The following describes how to build such a minimal rhel image.
Prerequisite
a) make sure you can download yum package from redhat repository which ask you to register to Red Hat Subscription Management. if you don't have the account, you can make a local/ftp yum repository under /etc/yum.repo.d folder from your rhel iso package.
b)if you want to make a rhel7 image, your host must be also a rhel7 OS.
Build Procedure
1)download binary mkimage-yum.sh from https://github.com/docker/docker/blob/master/contrib/mkimage-yum.sh or git clone https://github.com/docker/docker.git
2)modify the mkimage-yum.sh to create a rhel 7 minimal tarfile, comment out the following two lines and add the third line as follows:
#tar –numeric-owner -c -C “$target” . | docker import - $name:$version
#docker run -i -t $name:$version echo success
tar –numeric-owner -c -C “$target” . -zf ${name}.tar.gz
3)use command “./mkimage-yum.sh rhel7_docker” to create the rhel7_docker.tar.gz tarfile.
copy the tarfile to another host where a docker daemon is running.
use command “cat rhel7_docker.tar.gz | sudo docker import - richxsl/rhel7” to create a docker rhel7 minimal image. You should change the variable YOUR_NAME and the YOUR_NAME is also your docker hub registration name.
That's all, you can use it now.
Content type
Image
Digest
sha256:8f3aae325…
Size
92.7 MB
Last updated
almost 11 years ago
docker pull richxsl/rhel7