How to Install Docker on Ubuntu 24.04

Updated on 15 July, 2026
Learn how to install Docker on Ubuntu 24.04 with our step-by-step guide. Get Docker up and running quickly on the latest Ubuntu LTS release.
How to Install Docker on Ubuntu 24.04 header image

Docker is an open-source containerization platform that automates deploying, scaling, and managing applications in containers. Containers are lightweight and portable executable packages that contain all the necessary resources required to run an application. A container includes the application code, runtime, libraries, and dependencies that ensure consistency when running the application.

This article explains how to install Docker on an Ubuntu 24.04 server.

Warning
Vultr Cloud GPU instances running Ubuntu come with Docker as a pre-installed feature. Attempting to install Docker on these servers may result in conflicts with the NVIDIA Container Toolkit, potentially impacting GPU performance and container compatibility.

Prerequisites

Before you begin, have access to an Ubuntu 24.04 server as a non-root user with sudo privileges.

Install Docker

  1. Install the packages required to add the Docker repository.

    console
    $ sudo apt install ca-certificates curl -y
    
  2. Create the keyrings directory that APT uses to store repository signing keys.

    console
    $ sudo install -m 0755 -d /etc/apt/keyrings
    
  3. Download the Docker GPG key to the keyrings directory.

    console
    $ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    
  4. Set read permissions on the key so APT can read it.

    console
    $ sudo chmod a+r /etc/apt/keyrings/docker.asc
    
  5. Add the Docker repository to your APT sources.

    console
    $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  6. Update the package index.

    console
    $ sudo apt update
    
  7. Install Docker Engine and its plugins.

    console
    $ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
    

    This command installs Docker Engine with the following components:

    • docker-ce: The Docker Engine community edition package.
    • docker-ce-cli: The Docker command-line interface (CLI).
    • containerd.io: A container runtime that manages the lifecycle of Docker containers.
    • docker-buildx-plugin: Extends Docker's image-building capabilities for multi-platform builds.
    • docker-compose-plugin: Manages multi-container Docker applications defined in YAML files.
  8. View the installed Docker version on your server.

    console
    $ sudo docker --version
    

    Output:

    Docker version 29.6.1, build 8900f1d

Manage the Docker System Service

  1. Enable the Docker service to start automatically at boot.

    console
    $ sudo systemctl enable docker
    

    On Ubuntu, the package installer already enables this service, so the command confirms it is enabled.

  2. View the Docker service status.

    console
    $ sudo systemctl status docker
    

    Verify that the output shows active (running).

  3. Run the following command to stop Docker.

    console
    $ sudo systemctl stop docker
    
  4. Restart the Docker service.

    console
    $ sudo systemctl restart docker
    
  5. Add your non-root user to the docker group to run Docker CLI commands without sudo privileges. Replace linuxuser with your actual username.

    console
    $ sudo usermod -aG docker linuxuser
    
  6. Enable the new user group changes in your active session.

    console
    $ newgrp docker
    

Conclusion

You have installed Docker and the Docker Compose plugin on an Ubuntu 24.04 server, verified that the service is running, and added your user to the docker group. For more information, refer to the official Docker documentation.

Comments