48 lines
932 B
Markdown
48 lines
932 B
Markdown
|
||
## Install Docker + Docker Compose
|
||
|
||
This script auto-detects the OS and installs:
|
||
|
||
- Docker Engine
|
||
- Docker CLI
|
||
- containerd
|
||
- Docker Buildx plugin
|
||
- Docker Compose plugin
|
||
|
||
### Supported OS families
|
||
|
||
- Ubuntu / Debian
|
||
- AlmaLinux / RHEL / Rocky / CentOS / Fedora
|
||
|
||
### Run
|
||
|
||
```bash
|
||
chmod +x install_docker_compose.sh
|
||
sudo ./install_docker_compose.sh
|
||
```
|
||
|
||
### What it does
|
||
|
||
- Detects the Linux distribution from `/etc/os-release`
|
||
- Adds Docker’s official package repository
|
||
- Installs the latest Docker packages
|
||
- Starts and enables the Docker service
|
||
- Verifies the install with:
|
||
- `docker --version`
|
||
- `docker compose version`
|
||
|
||
### Notes
|
||
|
||
- Must be run as `root` or with `sudo`
|
||
- On Debian/Ubuntu, it installs from Docker’s official APT repo
|
||
- On Alma/RHEL-family systems, it installs from Docker’s official DNF repo
|
||
|
||
### Verify manually
|
||
|
||
```bash
|
||
docker --version
|
||
docker compose version
|
||
sudo systemctl status docker
|
||
```
|
||
|