Skip to content
Published on

Installing Docker and Docker-Compose in Ubuntu Server

Installing Docker

sudo apt-get update
sudo apt-get
docker --version

Installing Docker-Compose

Check for latest docker-compose version release at

sudo curl -L "" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

Executing Docker Command without Sudo

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

Bonus: Easy SSH to your Virtual Machine

Edit your .ssh/config in your home directory, add this to newline:

Host {your vm alias with no space}
    HostName {your vm public ipv4}
    User ubuntu
    IdentityFile c:/Users/{your username}/.ssh/your-key.pem
    StrictHostKeyChecking no