diff --git a/docker/dockerinstall.sh b/docker/dockerinstall.sh index 90672ee3f..f8b6f82bc 100644 --- a/docker/dockerinstall.sh +++ b/docker/dockerinstall.sh @@ -1,28 +1,29 @@ # Cleanup old installation +sudo apt remove -y docker-desktop sudo apt-get remove -y docker docker-engine docker.io containerd runc - -#Update package index +rm -r $HOME/.docker/desktop +sudo rm /usr/local/bin/com.docker.cli +sudo apt purge -y docker-desktop sudo apt-get update -sudo apt-get upgrade -y -# Install required dependencies +# Install certificates and pre-requisites sudo apt-get install -y ca-certificates curl gnupg lsb-release -# Add Docker's Official GPG Key +# Create keyring for docker sudo mkdir -m 0755 -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg -# Set Up Docker's APT Repository +# Create file for installation 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 -# Install Docker Engine +# Install Docker sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin -# Verify docker installation +# Verify installation docker --version sudo docker run hello-world -sudo systemctl enable docker + # Delete old azcopy image docker rmi `docker images | grep azcopy | cut -d " " -f1`