- The first step is to add the GPG key for the official Docker repository:
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
- apt
sudo apt-get update
sudo apt-get install -y docker-ce
docker info
nb: if get server error
sudo chmod 666 /var/run/docker.sock
~ docker-compose install
sudo apt install docker-compose
~ root privileges (sudo)
sudo usermod -aG docker ec2-user