Simple Shortcut to Install Docker in Ubuntu Using Shell Script

I’ve made Shell Script file for install Docker in Ubuntu.

This is the script:

#!/bin/bash
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add - 
sudo add-apt-repository \
"deb https://apt.dockerproject.org/repo/ \
ubuntu-$(lsb_release -cs) \
main"
sudo apt-get update
sudo apt-get -y install docker-engine
# add current user to docker group so there is no need to use sudo when running docker
sudo usermod -aG docker $(whoami)

Just copy and paste the script into your file and save it with .sh file extension. For example, i saved this script as docker-install.sh .

And then, you can run this command:

./docker-install.sh

With Github

Just run these commands:

git clone https://github.com/asepmaulanaismail/install-docker-ubuntu-shell-script
cd install-docker-ubuntu-shell-script/
./docker-install.sh

See on Github.

Original from Asepmaulanaismail.com

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.