Docker is one of the most used and renowned platforms that enables users, system developers, and system administrators to create, deploy, run, and then share different applications in a container format.
A container is a small unit of software that contains the code and all of its dependencies for the application. It makes sure that applications that we deploy, run smoothly and with reliability across all computing environments and networks.
In this article, we will see how we can install Docker on Debian 12 which is the latest installment of Debian Linux Distribution. We will see two different ways to install it.
Method 1: Install Docker from Docker Repositories
First of all, we need to update our Debian. Use the following command.
Now we need to install some needed packages and we can do that by the following command.
Now we need to install the Docker Repository.
Now we need to import the GPG Key here.
In this step, we need to add the docker stable repository.
Now we are ready to install docker in our Debian.
Now we need to ensure that Docker is running and its services are enabled and we can do that with the following command.
At the end, we need to check the version of docker. It will also ensure if the docker is installed successfully or not.
Here the version is 20.0.4 which also ensures that we have successfully installed docker on our Debian 12.
Method 2: Install Docker Using Binary Packages.
In case if we want to install Docker manually, we can download the .deb file for Docker from its official website and install it. But we will see how we can do that from the terminal.
First of all, we need to download the docker-ce, container-io, and docker-ce-clip files.
Now we need to install them. We can do that either by the apt package manager or by the dpkg.
We are done with the docker installation and at the end, let’s check the version to confirm whether it is installed or not.
Now, we need to start the docker service.
We are done here with the installation of our docker and it is working as well.
Conclusion
Debian 12 came with a huge number of improvements and package updates. This will also ensure that we will be able to install Docker easily as most of the packages for Docker come pre-installed in this Debian release.
In this article, we have discussed and talked about two different ways that can be followed to install docker in Debian 12. One of them is from the official repository and the other one is to install it manually.