🐳 Docker Installation & Setup Process

1
🏠
cd ~
Navigate to Home Directory
Moves to your user's home directory to ensure we're starting from a clean, known location.
Navigation Setup
2
📥
curl -fsSL https://get.docker.com -o get-docker.sh
Download Docker Installation Script
Downloads the official Docker installation script from Docker's servers. The flags mean:
-f: Fail silently on errors
-s: Silent mode
-S: Show errors
-L: Follow redirects
Download Script
3
⚙️
sudo sh ./get-docker.sh
Run Installation Script
Executes the Docker installation script with superuser privileges. This installs Docker Engine, Docker CLI, and containerd on your system.
Installation Root Required
4
👥
sudo groupadd docker
Create Docker Group
Creates a new system group called "docker". This group will have permissions to run Docker commands without sudo.
Security Groups
5
👤
sudo usermod -aG docker $USER
Add Current User to Docker Group
Adds your current user account to the docker group, allowing you to run Docker commands without using sudo every time.
Permissions User Management
6
🔄
newgrp docker
Activate Group Membership
Immediately activates the docker group membership for the current shell session without needing to log out and back in.
Session Groups
7
🚀
sudo systemctl enable docker
Enable Docker at Boot
Configures Docker to start automatically when the system boots up. This ensures Docker is always available after a restart.
Autostart System Service
8
▶️
sudo systemctl start docker
Start Docker Service
Immediately starts the Docker daemon service. After this, Docker is running and ready to accept commands.
Service Daemon
9
docker run hello-world
Test Docker Installation
Runs a test container to verify Docker is installed and working correctly. This downloads and runs a small test image that prints a success message.
Verification Test
🐋

Docker Successfully Installed!

Your system is now ready to run containerized applications.

The "hello-world" container confirms everything is working properly.