A container image packages an application and its dependencies. On Ubuntu 26.04 LTS, you can install Docker Engine from Docker's official APT repository to run containers from those images.

APT uses a repository-specific signing key to verify Docker's package index. Adding the stable repository lets Docker's packages receive updates through APT alongside packages from Ubuntu.

The Docker daemon manages containers and their networking for the whole host. Membership in the docker group grants root-level access through that daemon, so use sudo for the Docker commands.

Steps to install Docker Engine on Ubuntu:

Use an SSH session to the server or its console with an account that can use sudo. Start on Ubuntu 26.04 LTS with no Docker installation, Docker APT source, or Docker signing key. The server needs outbound access to the Ubuntu archive, Docker's repository, and Docker Hub.

Installing the packages starts Docker and adds rules for container networking. Ports you later publish through Docker can bypass UFW rules. On a server already in use, keep console access and a current backup so you can recover if installation disrupts the host.

  1. Check for packages that conflict with Docker's packages.
    $ apt list --installed docker.io docker-compose docker-compose-v2 docker-doc docker-buildx podman-docker containerd runc

    The list should contain no package rows. If any appear, stop and review Docker's precautions for conflicting packages before removing them. An existing service may depend on containerd or runc.

  2. Refresh the Ubuntu package indexes.
    $ sudo apt update
  3. Install ca-certificates and curl for downloading the signing key over HTTPS.
    $ sudo apt install ca-certificates curl
  4. Prepare the /etc/apt/keyrings directory for the repository key.
    $ sudo install -m 0755 -d /etc/apt/keyrings
  5. Download Docker's signing key to /etc/apt/keyrings/docker.asc.
    $ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
  6. Make /etc/apt/keyrings/docker.asc readable by APT.
    $ sudo chmod a+r /etc/apt/keyrings/docker.asc
  7. Register Docker's stable APT repository in docker.sources.
    $ sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
    Types: deb
    URIs: https://download.docker.com/linux/ubuntu
    Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
    Components: stable
    Architectures: $(dpkg --print-architecture)
    Signed-By: /etc/apt/keyrings/docker.asc
    EOF

    The entry takes the release codename and architecture from the server. Signed-By tells APT which key to use for this repository.

  8. Refresh the package indexes with Docker's repository enabled.
    $ sudo apt update

    APT should list Docker's resolute InRelease without a repository or signature error. If APT rejects the new source, stop before installing. Moving the newly created docker.sources file out of /etc/apt/sources.list.d/ lets APT refresh without that entry.

  9. Install Docker Engine, its CLI, containerd, Buildx, and the Compose plugin.
    $ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

    If APT proposes removing packages, decline the transaction and check the dependencies before retrying.

  10. Confirm that the installed Engine and containerd versions match packages from Docker's stable repository.
    $ apt-cache policy docker-ce containerd.io
    docker-ce:
      Installed: 5:29.10.1-1~ubuntu.26.04~resolute
      Candidate: 5:29.10.1-1~ubuntu.26.04~resolute
      Version table:
     *** 5:29.10.1-1~ubuntu.26.04~resolute 500
            500 https://download.docker.com/linux/ubuntu resolute/stable arm64 Packages
    ##### snipped #####
    containerd.io:
      Installed: 2.4.2-4~ubuntu.26.04~resolute
      Candidate: 2.4.2-4~ubuntu.26.04~resolute
      Version table:
     *** 2.4.2-4~ubuntu.26.04~resolute 500
            500 https://download.docker.com/linux/ubuntu resolute/stable arm64 Packages
    ##### snipped #####

    Under each package, look for download.docker.com under the installed version marked ***. The version and architecture can differ from the output shown.

  11. Confirm that the Docker service is running.
    $ systemctl is-active docker
    active

    If the result is anything other than active, see Docker's daemon troubleshooting instructions before continuing.

  12. Check that the Docker client reports the Engine's server version.
    $ sudo docker version
    Client: Docker Engine - Community
     Version:           29.10.1
    ##### snipped #####
    Server: Docker Engine - Community
     Engine:
      Version:          29.10.1
    ##### snipped #####

    A Client section alone only proves that the CLI is installed. The Server section confirms that it reached the daemon.

  13. Run Docker's hello-world test container.
    $ sudo docker run hello-world
    
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    
    ##### snipped #####

    On the first run, Docker downloads the image from Docker Hub. The container prints the greeting and exits. The image and stopped test container remain on the server.

Share this guide