Need a quote? A specific configuration, a project? Contact us on 02 51 99 13 03 .

DOCKER installation tutorial

Tutoriel d'installation de DOCKER

Equipe Sparwan |

Welcome to the Docker installation tutorial on Debian.

Do you need to install one or more software solutions in your business or home, but you want to centralize everything on a single physical server? You don't want to use a virtual machine manager? Then Docker is for you.

Docker

Docker is a virtualization solution which is not based on the creation of several virtual machines, but on the deployment of containers. A Docker container is, as its name suggests, a container which contains all the programs, settings and configurations.

differences between docker and vm

More information about Docker

Docker installation

We will focus on installing docker on a Linux system, more specifically on Debian 11 .

A. Prerequisites

To install docker on a Debian Linux machine, you must respect the following prerequisites:

  • Dual Core CPU
  • 4 GB of RAM
  • Docker Engine is supported on x86_64 (or amd64), armhf and arm64
  • Debian 11 (Stable)

You can download Debian 11 here

If you do not have machines available, we provide ruggedized servers and mini PCs which can be perfectly suited to a Docker server; you can view our shop below:

x7b_7KKmBrC43zHln0mFK8-MRaAej5Vt0Tc3yMNALJJBEKh6-eOkn2_61VwApod22c1ZQ0TxyuzYok7ikR8WrMitlpILOXxbLE2_fC0AgG764xllXnEJ_AePr59qe1bzHys9kiDg1Mp ikuAKy_agqPZ73jyrVavo269ISME49iRjsMo4yKyh47-J4A

B. Preparing Debian for Docker

In order to install docker via the command lines that follow, the "sudo" command must be installed. If you are on a fresh installation of Debian 11, here are the command lines to enter. If you already have sudo installed, you can proceed to the next step.

root

Your root password will be asked.

apt install sudo

sudo adduser username sudo

su username

Remember to replace "username" with your username

sudo installation command lines

 

Once you have switched back to your user account (DO NOT STAY ON THE ROOT) you can now use the "Sudo" command.

 

C. Uninstalling previous versions of docker

If you are on a fresh installation of Debian, you can proceed to the next step.

If you have already used docker on your machine and it is no longer in use, you must delete the previous versions.

sudo apt-get remove docker docker-engine docker.io containerd runc

Removing old docker versions

 

D. Installation via the official repository

Here are the command lines to enter

1. Update the apt package index and install the packages to allow apt to use a repository over HTTPS:

sudo apt-get update

sudo apt-get install \

ca-certificates \

curl\

gnupg\

lsb-release

 

Apt update and installation packages 1

[...]

Apt update and installation packages 2

 

2. Add the official Docker GPG key:

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Add the official Docker GPG key

 

3. Use the following command to configure the repository:

echo \

"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \

$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Use the following command to configure the repository:

 

E. Install the Docker engine

1. Update the apt package index and install the latest version of Docker Engine, containerd, and Docker Compose, or continue to the next step to install a specific version:

sudo apt-get update

Install Docker Engine 1

 

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

Install Docker Engine 2

 

[...]

Install Docker Engine 3

 

2. Check the operation of docker

sudo docker run hello-world

Check docker operation

 

If you obtain this result, congratulations, you have successfully installed Docker, you can install all software that has the possibility of installation via a Docker container.

If you have an error message, check the previous steps and if you are still having difficulty, you can check the official docker installation documentation here

We provide ruggedized mini PCs which, thanks to their characteristics, can be suitable for this type of use.

View the products listed on our shop by clicking below:

x7b_7KKmBrC43zHln0mFK8-MRaAej5Vt0Tc3yMNALJJBEKh6-eOkn2_61VwApod22c1ZQ0TxyuzYok7ikR8WrMitlpILOXxbLE2_fC0AgG764xllXnEJ_AePr59qe1bzHys9kiDg1Mp ikuAKy_agqPZ73jyrVavo269ISME49iRjsMo4yKyh47-J4A

Our pre-sales team is available to answer your questions and guide you through your projects.

You can contact us directly, we can define a tailor-made solution and equipment with you thanks to our network of partners.

Contact form

sales@sparwan.com

02 51 99 13 03