|
|
|
# Docker installation
|
|
|
|
|
|
|
|
Open terminal with CTRL+ALT+T and paste the following commands:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt-get install \
|
|
|
|
apt-transport-https \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
gnupg-agent \
|
|
|
|
software-properties-common -y &&
|
|
|
|
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 update &&
|
|
|
|
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
|
|
|
|
```
|
|
|
|
|
|
|
|
If you want to use docker command without sudo, usermod your current user to the docker group.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo usermod -aG docker $USER
|
|
|
|
```
|
|
|
|
|
|
|
|
It does require you to relogin to reload the changes.
|
|
|
|
|
|
|
|
## Docker-compose installation
|
|
|
|
|
|
|
|
Docker-compose is great for running the whole application with one command. It also takes care of setting all docker images to the same network.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose &&
|
|
|
|
sudo chmod +x /usr/local/bin/docker-compose
|
|
|
|
``` |