mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
sds
dsd
This commit is contained in:
1 parent
f70699a2aa
commit
0b911a2d07
27 files changed
+8
-162
No files matched your search
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Update the package index
|
||||
sudo apt update
|
||||
|
||||
# Install prerequisites
|
||||
sudo apt install -y ca-certificates curl gnupg lsb-release
|
||||
|
||||
# Add Docker's official GPG key
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
|
||||
# Set up the Docker repository
|
||||
CODENAME=$(lsb_release -cs)
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
||||
$CODENAME stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
|
||||
# Update the package index again
|
||||
sudo apt update
|
||||
|
||||
# Install Docker Engine, CLI, and containerd
|
||||
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
# Optional: Add the current user to the Docker group
|
||||
if [ "$USER" != "root" ]; then
|
||||
echo "Adding user $USER to the Docker group. Log out and log back in to apply the changes."
|
||||
sudo usermod -aG docker $USER
|
||||
fi
|
||||
|
||||
# Done
|
||||
echo "Docker has been installed successfully!"
|
||||
Reference in new issue
Block a user