Verify the following:
- There are no backup or restore jobs running.
- There are no Administrator jobs running.
- Connect to the container that requires updating:
podman exec -it container_id bash
-
Edit the YUM configuration file:
If you need a proxy server only, without a user, add the following line to the [main] section of the /etc/yum.conf.
PROXY=http://your.proxy.server:port
If the proxy requires a user name and password, add the following lines to the yum.conf file.proxy_username=yum-user proxy_password=yum-user-password
- Update the oraclelinux-release-el8 package.
yum update oraclelinux-release-el8
- Perform software updates.
yum install bind-utils
Note: If the host name of the yum repository is resolved in IPv6, the container cannot connect to the repository and the yum command may fail. In that case, add the following line to the [main] section of the /etc/yum.conf file:ip_resolve=4
-
Validate the domain.
nslookup
[root@hid yum.repos.d]# nslookup example.com Server: 172.17.24.20 Address: 172.17.24.20#53 Non-authoritative answer: Name: example.com Address: 10.7.42.0 Name: example.com Address: 10.7.7.33
Note: Each step from 2 to 4 can also be run for all containers at the same time. If you want to configure all containers at the same time, skip step 1 and run commands from the host by referring to the following command examples:For step 2
--For setting the proxy:
for containerid in $(podman container list -q) ; do podman exec -it ${containerid} bash -c "sed -i -e \"/^\[main\]$/a proxy=https://your.proxy.server:port\" /etc/yum.conf" ; done--For setting the proxy user:
for containerid in $(podman container list -q) ; do podman exec -it ${containerid} bash -c "sed -i -e \"/^\[main\]$/a proxy_username=yum-user\" /etc/yum.conf" ; done
--For setting the proxy password:
for containerid in $(podman container list -q) ; do podman exec -it ${containerid} bash -c "sed -i -e \"/^\[main\]$/a proxy_password=yum-user-password\" /etc/yum.conf" ; done
For step 3
for containerid in $(podman container list -q) ; do podman exec -it ${containerid} bash -c "yum update oraclelinux-release-el8"; done
For step 4
for containerid in $(podman container list -q) ; do podman exec -it ${containerid} bash -c "yum install bind-utils" ; done
If the host name of the yum repository is resolved in IPv6, the container cannot connect the repository and the yum command may fail. In that case, run the following commands.
for containerid in $(podman container list -q) ; do podman exec -it ${containerid} bash -c "sed -i -e \"/^\[main\]$/a ip_resolve=4\" /etc/yum.conf" ; done