I am new to using AlmaLinux I used to use CentOS. I want to set up Docker on my server. Can someone guide me on the steps to install Docker?
To install Docker on AlmaLinux, follow these steps:
1. Update the System
First, update the package index to make sure everything is up to date. Open your terminal and run:
sudo dnf update -y
2. Install required packages
You need to install some required packages to allow dnf
to use repositories over HTTPS. It provides the command dnf config-manager
, which is needed to add the Docker repository.
sudo dnf install -y dnf-plugins-core
3. Add the Docker repository
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
4. Install Docker
sudo dnf install -y docker-ce docker-ce-cli containerd.io
5. Start Docker
After installation, start the Docker service and enable it to run at system startup:
sudo systemctl start docker
sudo systemctl enable docker
Check if Docker is running correctly:
sudo docker --version