Docker is a free and open-source containerization tool that allows developers to package their applications in containers. The installation of these software packages can be done in the same way as the usual installation by the package manager of your operating system to download a program. The only difference is that Docker does everything automatically. After reading this post you will earn a top way to install Docker on AlmaLinux.
Installing Docker on AlmaLinux
After a little explanation about Docker, now we have a step-by-step guide for you, so you can install this useful tool easily.
– A Linux VPS Server with the AlmaLinux operating system
– Minimal 10 Gb free disk space
– Sudo privileges with admin rights
– Have a good internet connection
– 2 GB RAM and 2 CPU/vCPU
Step1. Uninstalling Podman and Buildah
In order not to get confused and have an easy installation process, you should remove Podman and Buildah from your AlmaLinux system before installing Docker. You can use the following command:
sudo dnf remove -y podman buidah
Tip: If you don’t have them on your system as a default, skip this part.
Step 2. Enabling Docker Repository
You should use the following command to enable Docker official repository because the Docker package is not available in the default AlmaLinux:
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
Step 3. Installing Docker with dnf Command
You can run the command below to install the latest Docker from the official repository:
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
Step 4. Starting and Enabling Docker Service on ALmaLinux
Now that you have installed Docker and its dependencies on your AlmaLinux system, you can start this tool and enable it using the following command:
sudo systemctl start docker
sudo systemctl enable docker
Use this command to verify the Docker service:
sudo systemctl status docker
You should use the Docker command without sudo for adding your local user to the Docker group:
sudo usermod -aG docker $USER
Use the following command to see the Dockers version:
Docker version 20.10.18, build b40c2f6
In addition, we have another easy and quick way to see how many Docker containers are running. Also you can see some of docker’s configured options:
sudo docker info
Step 5. Testing Docker Installation
If you want to test your Docker installation, use the following command:
docker run hello-world
If you see the below message from the Docker container, you can be sure that the Docker is working perfectly and the installation process is successful:
How to Remove Docker from AlmaLinux
At last, if you decide to remove Docker from your system, you should run the command below:
sudo dnf remove -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
Here, we tried to show a simple installation guide for install Docker on AlmaLinux. Now, you can use Docker to install software packages. We hope this guide was useful to you. If you have any ideas or questions please share them with a comment.
You should use the Docker plugin install command which pulls the plugin from Docker Hub or your private registry and prompts you to grant permissions if necessary.
You can run this tool on both Linux and Windows programs and executable in Docker containers.