Migrating from Docker to Podman
Migrating from Docker to Podman enables a daemonless, rootless container management approach, improving security and compatibility with RHEL 8+. The migration process includes verifying system compatibility, transferring container images and volumes, updating scripts, and ensuring smooth operation with BigFix MCM and BigFix Mobile.
Prerequisite
- Ensure you have RHEL 8 or above.Note: RHEL 7 reached the end of its maintenance support. For detailed instructions to upgrade, refer to RHEL official documentation.
- Ensure that the volumes in /var/opt/BESUEM and /opt/BESUEM are preserved and not removed.
- If you have already upgraded to the latest version of MCM without migrating from Docker to Podman, then you have to wait until the next MCM release for the upgrade Fixlet to be applicable to completely migrate from Docker to Podman.
Step 1. Remove Docker
Remove Docker using the following commands:
docker rm -f $(docker ps -a -q);docker rmi -f $(docker images -q);docker volume rm besuem_certs;docker volume rm besuem_packages
sudo systemctl stop docker.socket
sudo systemctl stop docker
sudo yum remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
rm /usr/local/bin/docker-compose
Step 2. Set up Podman
- Install
Podman
sudo dnf install -y podman
- Check Podman
version
Displays the installed version of Podman. Ensures Podman is installed and available on the system.podman --version
- Check Python version and upgrade if
necessary
python3 --version
-
Displays the installed version of Python 3.
-
If Python 3.9+ is installed, proceed to the next step. Otherwise, upgrade from an older version (For example, 3.6 → 3.9).
-
- Install pip (Python Package
Manager)
sudo dnf install -y python3-pip
- Installs
pip3
, the package manager for Python, using dnf (the package manager for RHEL-based systems). - The
-y
flag automatically confirms the installation.
- Installs
- Verify pip
installation
Displays the installed version ofpip3 --version
pip3
, ensuring it's installed and functional. - Install Podman Compose using
pip
Installs Podman Compose, allowing users to manage multiple Podman containers using apip3 install podman-compose
docker-compose.yml
file. - Verify Podman Compose
installation
Checks ifls /usr/local/bin/podman-compose
podman-compose
is present in/usr/local/bin/
, which is a common location for executables installed via pip. - Create a Symlink for
Podman
Ensuresln -s /usr/bin/podman /usr/local/bin/podman
podman
is accessible in/usr/local/bin/
by linking it to/usr/bin/podman
. - Create a Symlink for Podman
Compose
Creates a symbolic link (ln -s /usr/local/bin/podman-compose /usr/bin/podman-compose
ln -s
) so thatpodman-compose
can be executed from/usr/bin/
, making it accessible system-wide. - Verify Podman Compose
again
Confirms thatpodman-compose --version
podman-compose
is correctly installed and available after the symlink. - Verify if Podman is installed and
executable
podman ps and podman images
- Upgrade MCM to the latest version through WebUI.
- Verify if Podman containers are running as
expected
Ddisplays all currently running Podman containers.podman ps
- Verify if Podman images are
downloaded
podman images
Shows all locally available container images, including their repository names, tags, and sizes.