Docker Install
There exists the option to either install Docker Engine or Docker Desktop.
-
Docker Engine - The service and tools that actually manage docker containers. This is what you would install on a server and also works for development. This can be installed directly on Linux.
-
Docker Desktop - Nice GUI for managing Docker. It includes Docker Engine but installs it to a VM in a controlled environment. This can be installed on Linux, Windows, and Mac OS. This is nice and convenient for testing and development.
-
Mac OS and Windows - Docker works on these systems but can’t run directly. It is run inside a virtual machine. These days this is setup with Docker Desktop.
-
Linux - Docker runs directly on Linux. You can choose either Docker Engine or Docker Desktop.
Docker Engine Installl on Ubuntu
These instructions are basically taken from the official docker documentation but they are easier to follow here because my site is better.
Remove any existing packages and configurations:
sudo apt purge docker.io docker-doc docker-compose podman-docker containerd runc docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
Optionally remove any existing containers or data:
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
Using the Docker Repo:
Update repo and install some needed packages:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
Add Docker repo keys:
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a r /etc/apt/keyrings/docker.gpg
Setup the repo:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release