Docker Community Forums

Share and learn in the Docker community.

Create RHEL base image on docker running on windows 10


(Shahnaman2001) #1

Hi All,

I am using Windows 10 docker and want to create base image for RHEL.
So far I have installed run docker and able to copy ISO and run rpm to install package howeer yum is not there.

I am following this post to create rhel image.

However, as I am running on windows , rpm command is bit different.

Here are my steps in shell after running - docker ssh default

mkdir -p /mnt/rhel7-repo
mount -o loop rhel-server-7.2-x86_64-dvd.iso /mnt/rhel7-repo/
rpm -i /mnt/rhel7-repo/Packages/redhat-release-server-7.2-9.el7.x86_64.rpm

rm -f ${rpm_root}/etc/yum.repos.d/*.repo
cat >${rpm_root}/etc/yum.repos.d/rhel71le.repo<<EOF
[rhel71le]
baseurl=file:///mnt/rhel7-repo
enabled=1
EOF

But from this link from Install minimalistic RHEL OS onwards I m stuck.
yum , dgpk no such command are available. Please guide how to proceed.