Following steps:-
- INSTALL DOCKER ENGINE add user to docker group for using docker command without sudo
!/bin/sh
set -e
Install Dependencies,
sudo apt install -y curl apt-transport-https \
software-properties-common ca-certificates
- #Install Docker :- curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add- echo "deb https://apt.dockerproject.org/repo/debian-stretch testing" | \
sudo tee /etc/apt/sources.list.d/docker-engine.list
sudo apt-get update -y
sudo apt-get install -y docker-engine
- #Run Docker
sudo systemctl start docker
sudo systemctl enable docker
4 #Adding user to docker for using Docker without sudo command .
sudo gpasswd -a "${user}" docker
- #Reboot sudo reboot
** Execution Result **
$ docker run hello-world
Hello from Docker !
Top comments (0)