Docker is a tool to isolate services for development and production, and build a stable repeatable app environment

Freighter v1
Photo by Vidar Nordli-Mathisen / Unsplash

Installing Docker

Add Docker repositories to apt and install Docker

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add -  
sudo add-apt-repository "deb [arch=amd64] focal stable"  
sudo apt update
apt-cache policy docker-ce  
sudo apt install docker-ce

Add user to Docker group, so you can run without sudo

sudo usermod -aG docker insert_username
su - insert_username

Installing Docker-Compose

Docker-Compose is a Python application that handles the management of and connection of multiple Docker containers, essential for creating applications with Docker utilising the best-practice model of one service per container.

#upgrade global pip if haven't done already
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools
python3 -m pip install wheel

#install docker-compose
python3 -m pip install docker-compose

This is part of a collection of blog posts, detailing my laptop setup preferences.

2021 Linux VM Setup: Part 1 - How to install Ubuntu 20.04 on a laptop with Windows 10 Hyper-V
2021 Linux VM Setup: Part 2 - Setting up Git & Github on Ubuntu 20.04
2021 Linux VM Setup: Part 3 - Docker & Docker-Compose Setup on Ubuntu 20.04
2021 Linux VM Setup: Part 4 - zsh, VS Code & Terminal Customisation on Ubuntu 20.04
2021 Linux VM Setup: Part 5 - Windows VS Code Setup for Ubuntu 20.04 VM