Then, Verify that the Docker Engine installation is successful by running the hello-world image
sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.
You have now successfully installed and started Docker Engine. The docker user group exists but contains no users, which is why you’re required to use sudo to run Docker commands.
To uninstall the docker engine run the command below.
Images, containers, volumes, and networks stored in /var/lib/docker/ aren’t automatically removed when you uninstall Docker. If you want to start with a clean installation, and prefer to clean up any existing data follow the steps below.
Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages
Images, containers, volumes, or custom configuration files on your host aren’t automatically removed. To delete all images, containers, and volumes run the commands