Docker is a tool for running container software. Leveraging containers is a terrific approach for developers and users to worry less about operating system compatibility and dependencies because the bundled software should function similarly on any system.
Before installing Docker on Linux (AlmaLinux), you will need to update your system’s package repositories by using the following commands to ensure you’re getting the latest versions of packages:
sudo dnf update
sudo dnf upgrade
				You can install the yum-utils package using the following command, which provides the yum-config-manager utility to set up repositories:
sudo dnf install yum-utils
				Then, you can add the Docker repository using yum-config-manager:
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
				Then, you can use the following command to install the most recent version of Docker from the official repository:
sudo dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin
				Once Docker and its dependencies are installed, start and enable its service using the following commands:
sudo systemctl start docker
sudo systemctl enable docker
				By using the following command, you can see if the Docker service is running:
sudo systemctl status docker
				Next, use either of the following commands to check the Docker version:
sudo docker version
docker --version
				You will be able to add your local user to the docker group so that the user can use docker commands without sudo:
sudo usermod -aG docker $USER
				Replace $USER as per your requirement. You can use the following command to see if your user is a member of the docker group:
id $USER
				You can use the following command to uninstall Docker from your AlmaLinux:
sudo dnf remove docker-ce docker-ce-cli containerd.io docker-compose-plugin
				Docker images, containers, volumes, or customized configuration files on your AlmaLinux system are not deleted automatically.
You should manually delete all images, containers, and volumes using the following commands:
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd