In this article, we will have explained the necessary steps to install and configure Docker on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.
Docker is the most popular and widely used container runtime. It enables you to package and run your applications in isolated containers in a single server or cluster of Linux servers orchestrated by Kubernetes and similar tools.
Install Docker on Debian
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
sudo apt update sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg2
Step 2. Install Docker on Debian 10.
Next, Import the repository’s GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Add the stable Docker APT repository to your system’s software repository list:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Then install Docker using following command:
sudo apt update sudo apt install docker-ce
Once the installation is completed the Docker service will start automatically:
sudo systemctl status docker
● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-07-17 20:46:00 GMT; 1min 13s ago Docs: https://docs.docker.com ...
To verify that Docker is installed, run the following command:
# docker -v Docker version 19.03.1, build 7461e89
Step 3. Using Docker.
To search for an image from the Docker Hub registry, use the docker search command. For example, to search for a Debian image:
docker search debian
For example, the following command will start a Docker container based on the Debian image:
docker container run debian
To list active Docker containers, use the following command:
docker container ls
Congratulation, you have learned how to install and configure Docker on Debian 10 Buster. If you have any question, please leave a comment below.