Last active
November 17, 2018 11:58
-
-
Save akhildevelops/b6bad4b3aefe665d961b9a56ffab8d0e to your computer and use it in GitHub Desktop.
Script to Download Docker at single shot for ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update the Repositories | |
sudo apt-get update | |
# Remove any old / unwanted / exisitng doncker installation | |
sudo apt-get -y remove docker docker-engine docker.io | |
# Remove any old Containers / Images | |
# sudo rm -rf /var/lib/docker | |
# Install necessary packages in debian/ubuntu | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
# Adds the Security Key File | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Adding repository link | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
# Update the Repositories | |
sudo apt-get update | |
# Install docker | |
sudo apt-get -y install docker-ce | |
# create docker group | |
#sudo groupadd docker | |
# Add current user to the group | |
sudo usermod -aG docker $USER | |
# After installing exit the shell and login once again for the changes to take efect, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credits to docker documentation. Will work on any ubuntu based OS.