

In case you are done with docker testing and want to remove docker from your system then run following commands to uninstall it, $ sudo apt purge -y docker-ce docker-ce-cli containerd.io Note: Replace the username in above command as per your setup and also don’t forget to logout & login to make the changes into the effect. To allow local user to run docker commands without sudo, add the user to docker group (secondary group) using usermod command. Step 5) Allow Local User to Run Docker Command To spin up ‘hello-world’ container, run below docker command with sudo $ sudo docker run hello-worldĪbove informational message confirms that docker is installed and working properly.

To verify the docker installation, try to spin up ‘ hello-world’ container and see whether informational message is displayed or not. $ sudo systemctl start docker Step 4) Verify Docker Installation In case docker service is not running then try to start its service using beneath command. Once the docker is installed successfully, verify its version and service status by running, $ sudo docker versionĪbove output confirm that, docker service is up and running. Output of above apt commands would look like below, $ sudo apt -y install docker-ce docker-ce-cli containerd.io Run the following apt commands to install docker engine, $ sudo apt update $(lsb_release -cs) stable" | sudo tee /etc/apt//docker.list > /dev/null $ curl -fsSL | sudo gpg -dearmor -o /usr/share/keyrings/docker-archive-keyring.gpgĮxecute below echo command to configure official docker repository. To configure docker repository, let’s first add Docker’s GPG key via following curl command. Now, run below apt command to install docker dependencies, $ sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release -y Step 2) Configure Docker Repository Login to Debian 11 system, open the terminal and run below command to update package index $ sudo apt update Step 1) Update Package Index and Install dependencies
