Install Docker and Docker Compose on Ubuntu 24.04

Total
0
Shares

Install Docker and Docker Compose on Ubuntu 24.04 – Fast, Clean, Reliable

If you’re running a fresh Ubuntu 24.04 LTS setup and want to install Docker and Docker Compose, this guide is for you. We’ll go from zero to containers, step by step, using the official Docker repo and plugin method for Compose.

Whether you’re bootstrapping a SaaS, setting up your dev server, or just need containers running fast — here’s how to make it happen. This guide is built to save you time, frustration, and guesswork — just clean, working commands that get results fast.

Why Docker and Docker Compose?

Docker lets you run isolated, reproducible environments for your apps. Docker Compose lets you manage multi-container setups using a simple YAML file.

This stack is now standard for modern development — from quick testing to full production deployments. Whether you’re experimenting with a side project or deploying a mission-critical app, this setup gives you confidence and control.

🧠 This Docker Ubuntu 24.04 tutorial is built for devs, makers, and sysadmins who just want to get Docker working right now.


Prerequisites

To follow this guide, you’ll need:

  • Ubuntu 24.04 LTS (clean install or existing machine)
  • A user with sudo privileges
  • Terminal access

That’s it.


Step 1 – Update your system

First, make sure your package index is up to date:

sudo apt update

Step 2 – How to Install Docker on Ubuntu 24.04 (Official Repo)

1. Install prerequisite packages:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

2. Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

3. Add Docker’s APT repository:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

4. Update your package index:

sudo apt update

5. Verify you’re installing from Docker’s repo:

apt-cache policy docker-ce

6. Install Docker Engine:

sudo apt install docker-ce

7. Enable Docker to start on boot:

sudo systemctl enable docker

8. Check that Docker is running:

sudo systemctl status docker

sudo usermod -aG docker ${USER}
su - ${USER}
groups

Step 4 – How to Install Docker Compose on Ubuntu 24.04

1. Create the plugin directory:

mkdir -p ~/.docker/cli-plugins/

2. Download the Compose binary:

curl -SL https://github.com/docker/compose/releases/download/v2.23.3/docker-compose-linux-x86_64 \
-o ~/.docker/cli-plugins/docker-compose

3. Make it executable:

chmod +x ~/.docker/cli-plugins/docker-compose

4. Verify it’s working:

docker compose version

Docker Ubuntu 24.04 Tutorial: Key Takeaways

  • You installed Docker CLI on Ubuntu LTS using the official repo
  • You installed the Docker Compose plugin using the latest binary
  • Docker is now set to launch automatically on system boot
  • You can run containers without using sudo (optional, but handy)

Conclusion

That’s it — you now know how to install Docker and Docker Compose on Ubuntu 24.04, using official sources and clean Linux practices.

This setup works whether you’re deploying a microservice, testing your next SaaS, or prepping a dev server.

Next up? I’ll walk you through launching a full-stack app using Docker Compose — from scratch, without overengineering.

More official resources

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.