Blog

How to install Docker and Docker Engine

Docker is a set of open platforms that provide operating system-level virtualization for developing, delivering and running applications. In Docker, applications are delivered as standard packages called containers. Each container is isolated from each other, including libraries and configuration files, but each can communicate through well-defined network channels.
Docker has become a standard in software development and DevOps. Millions of developers use it every day at work to create, share and run applications. It is used throughout the application lifecycle, from programming itself to testing and production. With Docker, applications become more flexible and portable. Applications can be easily run anywhere on different operating systems, but the application itself remains the same, from libraries to configuration files.

Installing Docker Engine

To get the latest version of Docker Engine, we need to install it via the official Docker repository. First, you need to add the Docker repository and GPG key, and then install Docker Engine.
sudo apt update
sudo apt install ca-certyfikaty curl gnupg
Now run the following commands to configure the GPG key for the Docker repository, which will be stored in the /etc/apt/keyrings/ directory.
sudo install -m 0755 -d /etc/apt/keyrings 
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 
sudo chmod a+r /etc/apt/keyrings/docker.gpg
Now we need to add a Docker repository for Debian system
echo \ 
  "deb [arch="$(dpkg --print-architecture)" Sign-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ 
  "$( . /etc/os-release && echo "$VERSION_CODENAME")"stabilny" | \ 
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
We must refresh the Debian repository and install Docker Engine
sudo apt update 
sudo apt install docker-ce docker-ce-cli kontenerd.io docker-buildx-plugin docker-compose-plugin
After installing Docker, we can still run the following command to check the version.
docker version
Scroll to Top