Création d'une image oracle-linux 8

container_rootfs=/tmp/rootfs
apt install yum4 ca-certificates
mkdir -p $container_rootfs/etc/yum.repos.d
cat << 'EOF' > $container_rootfs/etc/yum.repos.d/oracle-linux-ol8.repo
[ol8_baseos_latest]
name=Oracle Linux 8 Latest ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_appstream]
name=Oracle Linux 8 Application Stream ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/appstream/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
EOF
pkgs="yum initscripts passwd rsyslog dhclient chkconfig rootfiles policycoreutils oraclelinux-release net-tools network-scripts"
yum4 install --installroot $container_rootfs -y --nogpgcheck $pkgs
chroot $container_rootfs systemctl enable network
echo oracle > $container_rootfs/etc/hostname
echo > $container_rootfs/etc/sysconfig/network
tar -C $container_rootfs -zcvf oracle-linux-ol8.tar.gz . > /dev/null

Installation d'oracle

<code> yum install wget nano -y wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm export ORACLE_DOCKER_INSTALL=true yum install oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm -y

nano /etc/sysconfig/oracle-xe-21c.conf

reboot

systemctl enable –now oracle-xe-21c.service