What is Docker?
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow developers to package an application with all of its dependencies, including libraries and other configuration files, into a standardized unit for software development.
Benefits of Using Docker
- Consistency: Ensures that applications run the same way across different environments.
- Portability: Containers can run on any system that supports Docker, regardless of the underlying infrastructure.
- Efficiency: Containers are lightweight and use fewer resources compared to traditional virtual machines.
- Rapid deployment: Containers can be quickly created, started, and stopped.
- Isolation: Applications and their dependencies are packaged together, reducing conflicts between different projects.
Let’s start to install Docker
-
open Debian linux then open terminal client, change user to root account, then run
apt install open-vm-tools
command line. -
Update Debian linux system.
apt update
apt dist-upgrade -y
- install prerequisites
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
- add docker’s GPG key and add docker Repository
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update
- Install Docker Engine
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
- Verify Installation
sudo systemctl status docker
docker pull hello-world
docker run hello-world