oneuptime/Ci/scripts/docker-install.sh
Nawaz Dhandala a981683d81
fix
2022-04-10 22:50:28 +01:00

19 lines
762 B
Bash

#Install Docker and setup registry and insecure access to it.
#IF docker is already installed, do not install docker.
if [[ ! $(which docker) ]]
then
echo "INSTALLING DOCKER"
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.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 docker-ce docker-ce-cli containerd.io
fi