Here is how I setup docker in Lab21.
First, I need to add Docker repository to my AlmaLinux. Secondly, I need to remove podman and buildah packages (due to conflict). Finally, I just install 3 packages follow by starting the Docker service.
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ sudo dnf remove podman buildah
$ sudo dnf install docker-ce docker-ce-cli containerd.io
$ sudo systemctl start docker.service
$ sudo systemctl enable docker.service
Verify and gather Docker version:
$ sudo docker version
Quickly show information about Docker client/server with how many containers are running:
$ sudo docker info
To run Docker without root
$ sudo usermod -aG docker $USER
$ reboot
Search, Install and run a Docker image [nginx, hello-world]
$ docker search nginx
$ docker pull hello-world
List installed images and Monitor Docker (CPU, RAM, network)
$ docker images
$ docker container ls
$ docker stats
$ docker network ls