2021-12-22 13:51:22 +00:00
|
|
|
#!/bin/bash
|
2022-07-04 09:56:45 +00:00
|
|
|
##makedesc: Install docker (latest) + docker-compose (latest) + ppa
|
|
|
|
|
2022-01-08 06:18:41 +00:00
|
|
|
echo
|
|
|
|
echo "==============================================="
|
2022-07-04 09:56:45 +00:00
|
|
|
echo "Installing docker (latest)..."
|
2022-01-08 06:18:41 +00:00
|
|
|
echo "==============================================="
|
|
|
|
echo
|
2021-12-22 13:51:22 +00:00
|
|
|
|
|
|
|
# https://docs.docker.com/engine/install/ubuntu/
|
|
|
|
|
2023-02-01 14:29:02 +00:00
|
|
|
sudo apt install -y \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
gnupg \
|
|
|
|
lsb-release
|
2022-08-25 04:40:21 +00:00
|
|
|
|
2022-07-04 14:12:37 +00:00
|
|
|
sudo mkdir -p /etc/apt/keyrings
|
2023-02-01 14:29:02 +00:00
|
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
|
|
|
|
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
|
|
|
|
|
|
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
|
|
|
|
2022-09-29 05:20:14 +00:00
|
|
|
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
|
2022-08-25 04:40:21 +00:00
|
|
|
|
2021-12-22 13:51:22 +00:00
|
|
|
sudo apt update
|
2022-07-04 14:12:37 +00:00
|
|
|
sudo apt install -y --autoremove \
|
2023-02-01 14:29:02 +00:00
|
|
|
docker-ce \
|
|
|
|
docker-ce-cli \
|
|
|
|
containerd.io \
|
|
|
|
docker-compose-plugin
|
|
|
|
|
|
|
|
sudo usermod -aG docker $(whoami)
|
2022-08-25 04:40:21 +00:00
|
|
|
|
2022-07-04 14:12:37 +00:00
|
|
|
echo
|
2022-08-25 04:40:21 +00:00
|
|
|
echo "Finish!"
|
2023-04-11 15:43:14 +00:00
|
|
|
docker --version
|
2022-08-25 04:40:21 +00:00
|
|
|
echo "Probably, you need to relogin to apply 'docker' group."
|
|
|
|
echo "Your ones currently are: $(groups)"
|
2022-07-04 14:12:37 +00:00
|
|
|
echo
|