main
Docker Installation Script
This script installs Docker and Docker Compose on a Debian/Ubuntu-based system.
What this script does
The script performs the following steps:
- Updates and upgrades the system packages
- Installs required dependencies
- Adds Docker’s official GPG key
- Adds the Docker repository
- Installs Docker Engine (docker-ce, cli, containerd)
- Starts and enables the Docker service
- Installs the latest version of Docker Compose
- Makes Docker Compose executable
- Adds the current user to the
dockergroup
Requirements
- Debian or Ubuntu-based system
sudoprivileges- Internet connection
jq(used to fetch latest Docker Compose version)
If jq is not installed, install it first:
sudo apt install -y jq
Languages
Shell
100%