Hostwinds Tutorials

Search results for:

Table of Contents

How to install Docker

How to Install Docker on Ubuntu

Tags: Ubuntu,  Docker 

How to install Docker

Docker is a popular and good 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, the container is packaged with the application or component of the application with any dependencies needed to run in its own self-contained runtime.

Docker is a great content management system. It allows you to run different application components in separate containers, such as your web server, database server, and file storage system. You can 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.

In this guide, we will walk you through how to install Docker on Ubuntu and how to install an application.

How to install Docker

Prerequisites: Before beginning the steps below, log into your Ubuntu server using SSH, and make sure your operating system is up-to-date.

Step 1: Install dockers required packages for Ubuntu.

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
GnuPG-agent \

Step 2: Add the GPG key to the keyring.

curl -fsSL | sudo apt-key add -

Check Dockers documentation for the current fingerprint.

Step 3: Check the key fingerprint to ensure it matches.

sudo apt-key fingerprint 0EBFCD88

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

Step 4: Add the repository to the OS's listing.

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

Step 5: Ensure the Apt package index is up to date. (This is important, especially after adding a repository.)

sudo apt-get update

Step 6: Install the Docker engine.

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

Step 7: 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.

Written by Sean Gaddis  /  March 24, 2020