Guides and tutorials

Hundreds of tutorials and step by step guides carefully written by our support team.

How to install Docker on your own server

In this manual we will show you how to install and configure Docker on your own server. By following these simple steps you will be able to have Docker installed and fully functional in just a few minutes, allowing you to launch containers or "compose" multi-container architectures.

Prerequisites

This manual covers the installation of Docker for the Ubuntu 18.04 distribution. The procedure will be very similar for later versions of Ubuntu and even for any Debian-based distribution. However, the steps detailed below will not work for distributions such as Red Hat, Fedora, CentOS, etc.

  • Ubuntu 18.04 (or compatible)
  • Root access
  • SSH connection or terminal

All commands in this manual assume that they are executed with root permissions. Depending on the configuration of each system, it may be necessary to precede them with "sudo".

Installing the repositories

First, we will proceed to install the repositories, as well as the necessary dependencies.

1. Update the package list

apt-get update

2. We ensure that we can establish connection with repositories through the HTTPS protocol.

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

The above command will install the necessary dependencies to be able to add and work correctly with a repository through a secure connection.

3. We download and add the public key of the Docker repository.

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

This key will allow us to verify the integrity of the files and the authenticity of the sender, thus avoiding any kind of packet / file spoofing. This is a standard and common security measure.

4. Add the repository and update the package list.

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

Attention: Note that the previous command includes the release name of the distribution. In this case, "bionic". In case this manual is used in other versions of Ubuntu or distributions derived from Ubuntu, it will be necessary to change this word to ensure compatibility.

apt-get update

Finally, we will update the list of packages, thus enabling the repository.

5. Install Docker using the package manager.

apt-get install docker-ce

The package name "docker-ce" refers to the free ("community edition") version of Docker.

6. We test the installation by launching the container "hello-world ".

docker container run hello-world

**You are done!

If you have followed all the steps correctly, you have successfully installed Docker on your Ubuntu server.

More than 2000 m² of own facilities and Data Centers in Spain
Your privacy is important for us
We use our own cookies for the proper functioning of the site. In addition, third-party cookies are used for analytical purposes only. This information is not associated with any person so that personal identifying data is not stored, but is only information that is collected to identify the session, with the aim of facilitating the analysis of the website. You can change your preferences at any time by entering this website again. For more information about our cookie policy you can visit our Cookies. You can press the "Accept and close" button to give us your consent or you can access more detailed information and manage cookies.
More than 2000 m² of own facilities and Data Centers in Spain
Your privacy is important for us
We use our own cookies for the proper functioning of the site. In addition, third-party cookies are used for analytical purposes only. This information is not associated with any person so that personal identifying data is not stored, but is only information that is collected to identify the session, with the aim of facilitating the analysis of the website. You can change your preferences at any time by entering this website again. For more information about our cookie policy you can visit our Cookies. You can press the "Accept and close" button to give us your consent or you can access more detailed information and manage cookies.