The assumption is that you already have a CentOS 8.3.x 64-bit OS.
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker jegan
You may have to replace the user 'jegan' with your username.
docker images
docker pull hello-world:latest
docker pull ubuntu:16.04
docker rmi hello-world:latest
docker image inspect ubuntu:16.04
docker run --dit --name ubutu2 --hostname ubuntu2 ubuntu:16.04 /bin/bash
docker run hello-world:latest
docker run --it --name ubuntu1 --hostname ubuntu1 ubuntu:16.04 /bin/bash
Ctrl + p + q
docker ps
docker ps -a
docker ps --filter="name=ubuntu"
docker ps --filter="name=ubu"
docker rm -f $(docker ps -q --filter="name=ubuntu")
docker inspect ubuntu1 | grep IPA
docker inspect -f {{.NetworkSettings.IPAddress}} ubuntu1
docker stop ubuntu1
docker start ubuntu1
docker rename old-container-name new-container-name
docker restart ubuntu1
docker exec -it ubuntu1 /bin/bash
exit
docker stop ubuntu1
docker rm ubuntu1
docker stop ubuntu2 && docker rm ubuntu2
docker stop ubuntu1 ubuntu2 ubuntu3
docker rm ubuntu1 ubuntu2 ubuntu3
docker stop $(docker ps -q) && docker rm $(docker ps -aq)
docker rm -f ubuntu1
docker rm -f $(docker ps -aq)