Docker container technology allows for a fast container deployment. The objective of this article is to install Docker on Debian 10 Buster Linux.
In this tutorial you will learn:
- How to install Docker on Debian 10
- How to set a Docker administrative privileges to a user
Software Requirements and Conventions Used
Category | Requirements, Conventions or Software Version Used |
---|---|
System | GNU/Linux Debian 10 Buster |
Software | docker |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
How to install docker on Debian 10 Buster step by step instructions
- Updated Sources list
Docker package is a part of the standard Debian 10 repository. Before performing an actual Docket installation execute a below command to update your package index:
# apt update
- Install Docker.io package
The actual Docker installation consists of an installation of the
docker.io
package. This can be done be execution of the belowapt
command:# apt install docker.io
- Set a specific user with docker administrative permissions
This step is optional and will allow a specific user to perform a docker administrative tasks without a need for a root administrative privileges. In the below example we will give a docker administrative privileges to a user
linuxconfig
:# usermode -aG docker linuxconfig
- Test Docker installation
The easiest way to confirm a correct docker installation is to deploy and run a sample
hello-world
container:# docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/