iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐋

Installing Docker Desktop on Ubuntu 24.04

に公開

Docker is a virtualization environment that separates applications and their dependencies into units called containers on a single OS. By sharing the host OS kernel, it operates more lightly and faster compared to a hypervisor.

Following my previous article where I installed Ubuntu 24.04 on a MINISFORUM BD795i SE, this time I will install Docker Desktop to perform GUI-based virtualization using containers.


Environment

  • Ubuntu 24.04.2 LTS

Setting up the Environment

Prerequisites

https://docs.docker.com/desktop/setup/install/linux/ubuntu/#prerequisites
When searching for Docker Desktop installation examples on Ubuntu, you might find that Japanese documentation is outdated and lists supported versions only up to 22.04. However, as of the time of writing this article, 24.04 is included in the supported OS list, so you can proceed with the installation without worry.

Adding the Docker apt Repository

https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

Run the following commands to add the official Docker apt repository.

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Download the latest deb package

https://docs.docker.com/desktop/setup/install/linux/ubuntu/#install-docker-desktop
There is a download link for the Ubuntu deb package in the documentation above, so download it from there.

Installing the deb package

Navigate to the directory where the deb package was downloaded and run the following command to install Docker Desktop via apt.

sudo apt-get update
sudo apt-get install ./docker-desktop-amd64.deb

At this point, an error like the one below might be displayed, but you can ignore this message.

N: Download is performed unsandboxed as root as file '/home/sion/Downloads/docker-desktop-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

It is also mentioned in the official documentation.


That concludes the installation steps. You should now be able to launch Docker Desktop from the application list.

Discussion