How to install Docker on Ubuntu

Michael Schmidt
Published: Aug 16, 2024 by Michael Schmidt
How to install Docker on Ubuntu

Install Docker #

Copy and execute the following command into your terminal:

curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh

Test install success:

docker run hello-world

Expected output:

docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:53cc4d415d839c98be39331c948609b659ed725170ad2ca8eb36951288f81b75
Status: Downloaded newer image for hello-world:latest

Install docker compose #

Docker compose is a powerful and yet simple plugin for bootstrapping application based on multiple docker containers or store configuration for a single container.

sudo apt-get update
sudo apt-get install docker-compose-plugin