feat: Add Docker check script and update STATUS.md
This commit is contained in:
parent
82a50af016
commit
a587224c2f
4 changed files with 87 additions and 1 deletions
29
scripts/check-docker.sh
Executable file
29
scripts/check-docker.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "Checking for Docker installation..."
|
||||
|
||||
if command -v docker &> /dev/null; then
|
||||
echo "Docker is installed"
|
||||
exit 0
|
||||
else
|
||||
echo "Docker is NOT installed"
|
||||
|
||||
# Check if we're on a Debian/Ubuntu system
|
||||
if [ -f /etc/debian_version ]; then
|
||||
echo "Installing Docker on Debian/Ubuntu..."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl gnupg lsb-release
|
||||
sudo mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||
echo "Docker installation completed"
|
||||
else
|
||||
echo "Unsupported OS for automatic Docker installation"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Docker check completed"
|
||||
Loading…
Add table
Add a link
Reference in a new issue