Installing docker container in ubuntu with shell script

The following shell script is automate the installation for Docker in your server, you may use this code to put in your EC2 user data when you launch the instance, than once the server up and running, the docker already ready in your server.

sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 | grep [email protected] || exit 1
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
sudo docker run --rm hello-world
sudo usermod -aG docker $USER
newgrp docker

To automate the installation for the docker in your server, just use following command.

$ wget

$ sudo chmod +x
$ sudo ./

Click here for more detail

Leave a Reply, pub-3772983857049267, DIRECT, f08c47fec0942fa0
%d bloggers like this: