How to Install Docker on Your Jotelulu Linux Server

In this tutorial, we’ll explain how to install Docker on a Linux server to provide you with a fast, simple and secure way to deploy your applications.

Docker is a platform that has become hugely popular in recent years among sysadmin, developers and DevOps teams because it offers a fast and secure way to create, test and run software solutions.

Docker allows you to run programs in containers, which is a bit like a virtual machine that contains the basic software, libraries, tools and other components required for the application to run.

It’s also possible to modify the components in the container, adding new components, complementary software, etc. It’s a platform that is supported by many systems and providers, and Jotelulu is no exception. But here at Jotelulu, we’ll also show you how to install it!

 

How to Install Docker on Your Linux Server

Before you get started…

To successfully complete this tutorial, you will need the following:

  • To be registered with an organisation on the Jotelulu platform and to have logged in.
  • A Servers subscription on the Jotelulu platform.
  • An Ubuntu server as part of your subscription.
  • A user account with administrator privileges or root access using the “sudo” command.

 

Installing Docker on Ubuntu

The first thing you’ll need to do is update the available packages on Ubuntu using the “apt” command.

You can either do this using a user account with administrator privileges or by using the “sudo” command for root access.

# apt-get update

or

# sudo apt-get update

Then, you need to install the package to allow the use of apt repositories accessed via HTTPS.

# apt install apt-transport-https ca-certificates curl software-properties-common

or

# sudo apt install apt-transport-https ca-certificates curl software-properties-common

NOTE: From this point on, we’ll just show one of the possible commands for each step so as not to make this tutorial longer than it needs to be. Just remember that you either need to perform this task with administrator privileges or use the “sudo” command.

Updating the packages and install HTTPS support
Updating the packages and installing HTTPS support

Next, you need to add the official GPG key from Docker:

# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add – s

Then, you need to add the official repository, replacing the default one that comes with Ubuntu 20.04:

# sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable”

# apt-cache policy docker-ce

Adding the GPG key from Docker and adding the official repository
Adding the GPG key from Docker and adding the official repository

And now it’s time to install Docker:

# sudo apt install docker-ce

Installing Docker on Ubuntu
Installing Docker on Ubuntu

At this point, Docker should have been successfully installed. However, we can check this by running the following command.

# sudo systemctl status Docker

Checking that Docker is running correctly
Checking that Docker is running correctly

Or you could run either of the following options.

# docker

or

# docker info

Checking that the Docker command works correctly
Checking that the Docker command works correctly

Or you could run the Docker “Hello World” command.

# docker run hello-world

Running "Hello World" with Docker
Running “Hello World” with Docker

 

Summary

As you can see, installing Docker on a Linux server is really very straightforward. In this tutorial, we’ve looked at how to do it on Ubuntu 20.04, but the procedure is similar for other versions.

If you found this tutorial useful, feel free to check out our blog for other useful articles, including this one where we show you how to install Odoo using Docker!

Thanks for reading!

Categories:Servers

Fill out the form and one of our Sales team will contact you soon.

growth@jotelulu.com  |  jotelulu.com 

You can unsubscribe from these communications at any time. For more information,  check our Privacy Policy.