Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Install Docker

ZeroC0D3 Team edited this page Jan 20, 2018 · 1 revision

Installation Docker

Install Docker for Ubuntu version 16.04

Setup Installation

  • Create script install_docker.sh

  • Add this line:

#!/usr/bin/env sh

##### STOP DOCKER SERVICE (if exist) #####
ps aux | grep -i docker | awk {'print $2'} | sudo xargs kill -9

##### INSTALL DOCKER #####
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt-get -y update
apt-cache policy docker-ce

sudo apt-get -y install docker-ce
sudo systemctl status docker

##### INSTALL DOCKER-COMPOSE #####
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

##### CONFIGURE DOCKER #####
sudo usermod -aG docker ${USER}
sudo usermod -aG docker deploy

##### START DOCKER SERVICE #####
sudo /etc/init.d/docker restart
# sudo service docker restart

##### TEST DOCKER-COMPOSE #####
# $ id -nG
# $ docker-compose --version
# >> docker-compose version 1.18.0, build 8dd22a9
  • Change executable script
chmod +x install_docker.sh

Running Installation

sh ./install_docker.sh
Clone this wiki locally