Search The Hostwinds Guides Knowledge Base

Install Docker (Debian Based Operating System)

Share This Article [TheChamp-Sharing]

Docker is a popular open-source container management system for cloud computing needs. Containers are similar to the virtual machines we offer, but there are key differences. Unlike a virtual machine, a container is not installed with a guest operating system, such as Linux or Windows Server. Instead, it is packaged with the application or component of the application along with any dependencies needed for it to run in its own self-contained runtime.

Docker is a great container management system, as it allows you to run different components of an application in separate containers, such as your web server, database server, and file storage system. You are able to run multiple containers on one VPS or dedicated server. Containers are also highly portable, making it easy to move them between servers or deploy them to our cloud hosting environment as needed with little delay.

This guide will walk you through how to install Docker on a Debian-based system.

How to install

Step One – Ensure the apt package index is up to date.

sudo apt-get update

Step Two – Install Docker’s required packages for Debian.

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \

Step Three – Add the GPG key to the keyring.

curl -fsSL | sudo apt-key add -

Check Docker’s documentation for the fingerprint.

Step Four – Check the key fingerprint to ensure it matches.

sudo apt-key fingerprint 0EBFCD88

Note: If the key fingerprint does not match, it is advised to check the official Docker documentation for the up-to-date fingerprint.

Step Five – Add the repository to the Operating System’s listing.

sudo add-apt-repository \
"deb [arch=amd64] \
$(lsb_release -cs) \

Step Six – Ensure the apt package index is up to date. (This is important especially after adding a repository.)

sudo apt-get update

Step Seven – Install the Docker engine.

sudo apt-get install docker-ce docker-ce-cli

Step Eight– Ensure that Docker is running by downloading and running the hello-world container provided by Docker.

sudo docker run hello-world

The command above downloads an official Docker testing image and runs it in a new container. When it runs, it will just print a message and exit.

Related Articles: