Debian is considered one of the most popular Linux distributions for server applications, for reasons of stability and security. We show you how to install Docker on Debian 12.
Docker installation on Debian 12: REQUIRED CONFIGURATION
Docker himself is not very demanding with regard to your system equipment, but the use of system resources can be high for complex applications. Before installation, make sure that your system meets the following minimum configuration:
- Operating system: Debian 12.
- Processor: 64 -bit CPU, min. 2 GHz with support for Kvm.
- RAM: 4 GB
- Office environment: Gnome, KDE or MATE
- Other software: Qemu 5.2 or superior
You must also have root rights on your system. If you use gnome as a desktop environment, you must install GNOME extensions APPINDATOR And Kstatusnotifieritem. If you use one of the other environments, you will also need gnome-terminal
.
Docker accommodation: dedicated, cloud or VPS?
If you want to operate a server with Docker and Debian 12, but you do not want to host it yourself, you can rent the appropriate server equipment from an accommodation provider. At Ionos, for example, you have the choice between three server models:
These three variants of servers are fundamentally distinguished by their structure and their availability. A dedicated server is Reserved exclusively for you and is available 24 hours a day. This type of server is more expensive than the other two and is mainly suitable for people and organizations that wish high performance and availability of their server. Dedicated servers often offer the possibility of making changes to the system or setting up personalized configurations.
For less important workloads, a VPS or a cloud server is suitable. With a VPS (also called VSERVER), Several people share a physical server. Of course, a VPS offers fewer IT resources than a dedicated server, but it allows you to use system resources much more efficiently. When a person does not use their VPS, other users are assigned A larger share of the total IT resources available. This is only a problem at peak hours, when many users want to use the server at the same time.
This problem is partially resolved by cloud servers. On a cloud server, these are not the IT resources of a individual computer which are shared between several people, but the IT resources of several computers. Individual workloads are therefore Distributed over several physical servers. This is why cloud servers are highly scalable and rarely victims of breakdowns. In addition, at many suppliers, you only pay for the time of use of your server.
Virtual servers (VPS)
Choose performance
- Complete virtualization with root access
- Unlimited traffic and up to 1 Gbit/s of bandwidth
- Quick NVME SSD storage and Plesk Web Host edition
Docker accommodation at Ionos: possible use scenarios
To find the server that suits you, it is often necessary to do research that takes time. Even if you are familiar with the different types of servers and know the iono offers, choosing the right server price can be a challenge. This is why we have gathered for you three typical use cases and the best suited ionos servers to help you make a decision.
Use scenario | Recommended server | Alternative server recommendation |
---|---|---|
Small website and/or database without dynamic content | Cloud M server | VPS Linux S |
Larger website with dynamic content and several databases | Cloud L server | VPS Linux M |
High availability and high traffic business applications | VPS Linux XXL | VPS Linux XL |
Install Docker on Debian 12: step by step
Once you have set up the appropriate configuration and Debian 12, you can install Docker. Follow our guide step by step.
Step 1: Delete old Docker files
If you have already installed Docker on your system, you must delete these files before making the new installation. If it is a recent system on which Docker has not yet been installed, you can ignore this step. Run the following command to delete Docker files:
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt remove $pkg; done
bash
If you do not want to keep your old Docker images, Docker containers or Docker container volumes, you must also delete them. To do this, enter the following orders:
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
bash
Step 2: Configure the Docker AP deposit
For Docker to be managed by your package manager, you must use the official deposit apt
. To do this, you must first install the necessary dependencies and add the Docker GPG key:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
bash
You can now add the deposit to your sources apt
::
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
bash
Step 3: Install Docker
You can now download and install Docker's packages:
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
bash
Perform the image hello-world
To ensure that Docker has been successfully installed:
sudo docker run hello-world
bash
If you receive a success message, Docker has been successfully installed on your system!
Advice
If you wish to install Docker on another operating system, you can refer to our additional articles:
Step 4: Additional configuration steps
If you do not get a success message when you perform the image hello-world
Docker may not yet be running on your system. You can check this using the following command:
sudo systemctl status docker
bash
If the Docker service is not running, you can throw it, then try to execute hello-world
.
sudo systemctl start docker
sudo docker run hello-world
bash
By default, Docker is configured so that the service starts automatically when starting the computer. You can deactivate it or reactivate it using the following commands. If you deactivate it, you will have to start Docker manually with the command:
sudo systemctl disable docker
sudo systemctl enable docker
bash