docker installation

This documentation shows how to install docker from the docker ppa

Create users and groups

First create a user and group cloud

useradd -m cloud

Add the user cloud to the sudo group

usermod -a -G sudo cloud

Add a docker group

groupadd docker

Add the user cloud to the docker group

usermod -aG docker cloud

basic dependencies

Install some basic dependencies

apt update && apt upgrade -y && apt install vim screen lsof apt-transport-https ca-certificates curl software-properties-common -y 

docker repository configuration

Add the repository key of the docker repository

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

Now add the apt configuration for the repository

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

You could also alternatively add the testingrepository instead of the stablerepository

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

install docker

apt update && apt install docker-ce -y

install docker-compose

Get the latest docker-compose

curl -L https://github.com/docker/compose/releases/download/1.25.0-rc2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Set the proper rights

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

And check if docker-compose works

docker-compose --version

This should give a response like this

docker-compose version 1.25.0-rc2, build 661ac20e

Revision #4
Created Fri, Nov 22, 2019 2:43 PM by Bodo
Updated Fri, Nov 22, 2019 3:29 PM by Bodo