my-env/install/docker

35 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/bin/bash
##makedesc: Install docker (latest) + docker-compose (latest) + ppa
2022-01-08 06:18:41 +00:00
echo
echo "==============================================="
echo "Installing docker (latest)..."
2022-01-08 06:18:41 +00:00
echo "==============================================="
echo
# https://docs.docker.com/engine/install/ubuntu/
sudo apt remove -y docker docker-engine docker.io containerd runc
sudo apt-get install \
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 chmod a+r /etc/apt/keyrings/docker.gpg
sudo apt update
sudo apt install -y --autoremove \
docker-ce \
docker-ce-cli \
containerd.io \
docker-compose-plugin \
docker-compose
sudo usermod -aG docker anthony
echo
2022-01-08 06:18:41 +00:00
echo "You need to logout and log in again to apply docker group"
echo