You can install the popular container platform Docker on a Linux server at any time. It doesn’t matter whether you choose to do it when you set up the server or if the server is already running. As an al­tern­at­ive to the manual in­stall­a­tion, many hosting providers offer their customers a sim­pli­fied one-click in­stall­a­tion option.

What are the re­quire­ments for in­stalling Docker on Linux?

If you are a Linux user and want to install Docker, you don’t have to use the GUI ap­plic­a­tion Docker Desktop. Unlike Windows and macOS users, who have to use the GUI to install Docker, Linux users have the option of in­stalling Docker Engine. In contrast to the desktop app, Docker Engine consumes sig­ni­fic­antly fewer resources, with 1 to 2 GB of memory (RAM) being enough for it to run smoothly. Docker Engine is available for the following Linux dis­tri­bu­tions and ar­chi­tec­tures:

x86_64/AMD64 ARM64/AArch64 ARM (32-bit) s390x
Ubuntu ✓ ✓ ✓ ✓
Debian ✓ ✓ ✓
CentOS ✓ ✓
Fedora ✓ ✓
Raspbian ✓
RHEL ✓
SLES ✓

If you are con­sid­er­ing using Docker Desktop instead, it’s important to keep in mind that it isn’t com­pat­ible with the same range of dis­tri­bu­tions and ar­chi­tec­tures as Docker Engine. The desktop ap­plic­a­tion currently only supports x86_64/AMD64 ar­chi­tec­tures and Ubuntu, Debian and Fedora. Ad­di­tion­ally, the official doc­u­ment­a­tion states that the following re­quire­ments must also be met to install Docker Desktop:

  • System must support KVM vir­tu­al­isa­tion
  • Emulator QEMU (at least Version 5.2) needs to be installed
  • systemd startup process
  • Gnome, KDE or MATE desktop en­vir­on­ment
  • at least 4 GB memory (RAM)

How to find the right hosting solution for your Docker/Linux server

While it’s possible to install and run Docker on your own Linux server, it is much more con­veni­ent to have a provider host the server for you. By going with a hosting provider, you’ll benefit from powerful en­ter­prise hardware and a first-class broadband con­nec­tion. At IONOS, you can choose from three different server hosting models that each offer speeds of up to 400 Mbps:

  • Cloud servers: with a cloud server from IONOS, you can host your Docker/Linux server on vir­tu­al­ised resources in the cloud. Per­form­ance can be scaled based on your computing needs, and the price is de­term­ined by usage, right down to the minute.
  • vServer (VPS): vServers from IONOS also use vir­tu­al­ised hardware, however, unlike cloud servers, only one host system is used. Another dif­fer­ence between the two is that you pay a fixed monthly price with vServers.
  • Dedicated servers: with dedicated servers from IONOS, your server runs on hardware that hasn’t been vir­tu­al­ised. You receive a clearly defined server setup and only pay for the resources you use. Prices for this server model are cal­cu­lated to the minute.
Tip

Still unsure how often and how much you’ll use your server? With a cloud server from IONOS, you can scale per­form­ance at any time, allowing you to adjust CPU, memory and storage for your server. At the end of the month, you only pay for the resources you’ve used.

Use cases and suitable IONOS server packages

When it comes to hosting options, you have a lot to choose from, both in terms of providers and server packages. Whilst Docker Engine consumes fewer resources thanDocker Desktop, there are other factors you’ll need to consider when de­term­in­ing how much CPU, memory and storage you’ll need for your server. For example, you’ll also need to think about other activ­it­ies you’ll be using the server for. Below we have sum­mar­ised three different use cases with a server re­com­mend­a­tion for each one.

Use cases for a Docker/Linux server Re­com­men­ded IONOS server package
Server ap­plic­a­tion de­vel­op­ment and testing; oc­ca­sion­ally online Cloud Server XL
De­ploy­ment server for one or more ap­plic­a­tions; per­man­ently online VPS Linux L
Server for deploying virtual en­vir­on­ments VPS Linux XL
Tip

Planning to make extensive use of your hosting en­vir­on­ment and looking for a long-term solution? With a dedicated server from IONOS, you’ll have access to unlimited traffic, cloud func­tion­al­ity and powerful en­ter­prise hardware with state-of-the art pro­cessors.

How to manually install Docker on Linux

Once your Linux server is set up and you are ready to install Docker, you can use the following tutorial to help you. It covers the most important steps for carrying out a manual in­stall­a­tion via the terminal.

Note

The in­struc­tions below show how to install Docker Engine. You can find in­struc­tions on how to install Docker Desktop on Linux in the official Docker doc­u­ment­a­tion.

Step 1: set up the Docker re­pos­it­ory

If you are in­stalling Docker Engine for the first time on your server, you’ll need to begin by setting up the Docker re­pos­it­ory. You can then use this directory to install Docker on Linux and update the platform later on. The exact process for preparing the directory depends on the Linux dis­tri­bu­tion you are using.

Ubuntu, Debian und Raspbian

With Ubuntu, Debian and Raspbian, you can use the package manager apt. In order to update the manager and allow HTTPS con­nec­tions for the re­pos­it­ory, start with the following commands:

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
bash

Af­ter­wards, add the official GPG key for Docker. In the URL of the second command, Debian users should replace ubuntu with debian. Likewise, Raspbian users should replace it with raspbian:

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
bash

In the following step, you are going to set up the re­pos­it­ory. Just as in the code snippet above, if you are using Debian, you’ll need to replace ubuntu with debian, and if you are using Raspbian, with raspbian:

echo \
    "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
bash

CentOS

With CentOS, you can set up the re­pos­it­ory with the yum-config-manager tool. Use the following commands to install the manager and the re­pos­it­ory:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
bash

Fedora

To set up the re­pos­it­ory on Fedora, you’ll need the dnf-plugins-core package. You can use this package to manage DNF re­pos­it­or­ies. Use the following two commands to install the package and set up the directory.

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
bash

Step 2: install Docker Engine, con­tainerd und Docker Compose

After you’ve finished preparing the re­pos­it­ory, it’s time to install the container platform. In addition to Docker Engine, you’ll also need the container runtime con­tainerd and the or­ches­tra­tion tool Docker Compose.

Ubuntu, Debian und Raspbian

Use the following command to update the apt package index:

sudo apt-get update
bash

You can install the three essential com­pon­ents that make up Docker by entering the following command:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
bash

CentOS

CentOS users can install Docker on a Linux server using the following terminal command:

sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
bash

You may be asked to accept the GPG key. Make sure to check whether the fin­ger­print matches the following al­pha­nu­mer­ic­al sequence: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35. If it does, it’s okay to accept the key.

Fedora

In Fedora, you can install Docker with the following command:

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
bash

If you are asked to accept the GPG key, make sure that the fin­ger­print of the key matches the following sequence 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35.

Step 3: verify success of Docker in­stall­a­tion on your Linux system

To check if Docker has suc­cess­fully been installed on Linux, you can run the hello-world container. If it works, you’ll receive a message con­firm­ing the success of the in­stall­a­tion.

Ubuntu, Debian und Raspbian

Run the following command:

sudo docker run hello-world
bash

CentOS und Fedora

If you are using CentOS und Fedora, Docker will not auto­mat­ic­ally start when the in­stall­a­tion is finished. You can start the container platform with the following command:

sudo systemctl start docker
bash

To check if the in­stall­a­tion was suc­cess­ful, run the hello-world image:

sudo docker run hello-world
bash
Tip

In other articles in our Digital Guide, we take a closer look at in­stalling Docker on various versions of different Linux dis­tri­bu­tions. Here are just a few:

How to install Docker on Linux systems using the 1-click app from IONOS

With IONOS, you can install Docker on Linux using an image. The in­stall­a­tion process can be completed in just one click. It is, however, important to note that the app has been spe­cific­ally designed for the Linux dis­tri­bu­tion AlmaLinux. This means that you’ll need to carry out a complete in­stall­a­tion or re­in­stall­a­tion of the server you want to use.

Tip

Get a VPS from IONOS and get started with Docker on Linux today.

Step 1: sign into Cloud Panel and select your server

Go to the IONOS Customer Centre login page and sign in using your login cre­den­tials. Click on Server & Cloud and select the server that you want to host Docker on.

Step 2: set up your Docker/Linux server

Once you’re on the server overview page of Cloud Panel, you can start setting up your server. Begin by clicking on Create and then select the server model you want to use.

Image: Create a Docker/Linux server in IONOS Cloud Panel
Create a Docker/Linux server in IONOS Cloud Panel

Choose a name for your server and select a package:

Image: IONOS Cloud Panel: different server packages
Select the server con­fig­ur­a­tion for your Docker/Linux server.

Scroll down to Images and click on Ap­plic­a­tions.

Image: IONOS apps in Cloud Panel
IONOS Cloud Panel: under Ap­plic­a­tions, you’ll find Docker and other apps that can be installed with one click.

Use the search function to search for the Docker app. Docker should appear in the top left corner. Select the Docker app and then click on Create to set up your Docker/Linux server.

Image: IONOS Cloud apps: Docker
IONOS Cloud apps: select the Docker app by clicking on the box. The bottom half of the box should change to blue. Now, you can begin with the setup.
Go to Main Menu