Nothing is impossible for us
Your Company Address
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.
Docker is a set of platform as a service products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.Wikipedia
There are two editions of Docker available.
This guide will cover installation of Docker CE on Debian 10 Buster. But let’s first look at common docker terminologies.
Below are commonly used terminologies in Docker ecosystem.
Follow the steps covered in the next parts of this article to install and use Docker CE on Debian 10 (Buster).
Start the installation by ensuring that all the packages used by docker as dependencies are installed.
sudo apt update sudo apt -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Import Docker GPG key used for signing Docker packages.
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Add Docker repository which contain the latest stable releases of Docker CE.
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable"
This command will add the line shown in
deb [arch=amd64] https://download.docker.com/linux/debian buster stable
apt package index.
sudo apt update
To install Docker CE on Debian 10, run the command:
sudo apt -y install docker-ce docker-ce-cli containerd.io
This installation will add
docker group to the system without any users. Add your user account to the group to run docker commands as non-privileged user.
sudo usermod -aG docker $USER newgrp docker
Check docker and compose version.
$ docker version Client: Docker Engine - Community Version: 19.03.2 API version: 1.40 Go version: go1.12.8 Git commit: 6a30dfc Built: Thu Aug 29 05:29:29 2019 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.2 API version: 1.40 (minimum version 1.12) Go version: go1.12.8 Git commit: 6a30dfc Built: Thu Aug 29 05:28:05 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.6 GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb runc: Version: 1.0.0-rc8 GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f docker-init: Version: 0.18.0 GitCommit: fec3683
Log out and log back in so that your group membership is re-evaluated.
Run a test docker container:
$ docker run --rm -it --name test alpine:latest /bin/sh
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
cd784148e348: Pull complete
Status: Downloaded newer image for alpine:latest
/ # cat /etc/os-release
PRETTY_NAME="Alpine Linux v3.9"
/ # exit
Create a test Docker Compose file.
Add below data to the file.
version: '3' services: web: image: nginx:latest ports: - "8080:80" links: - php php: image: php:7-fpm
Start service containers.
docker-compose up -d