Please execute the all commands in sequence as they given. 1. sudo apt-get update 2. sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common 3. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 4. sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" 5. sudo apt-get update 6. sudo apt-get install docker-ce 7. docker version
Reference : https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1
Add user to DockerGroup:
sudo usermod -aG docker <username>
1. base=https://github.com/docker/machine/releases/download/v0.14.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && 2. sudo install /tmp/docker-machine /usr/local/bin/docker-machine 3. docker-machine version
Reference : https://docs.docker.com/machine/install-machine/#install-machine-directly
1. sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose 2. sudo chmod +x /usr/local/bin/docker-compose 3. docker-compose --version
Reference : https://docs.docker.com/compose/install/#install-compose