My Docker Desktop Arch Linux Install Experience

06 May 2023

Docker is an open source project which allows us to deploy applications inside containers. A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and realiably from one computing environment to another. A docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system librarries and settings.

It's been a while since I installed Docker desktop but hopefully it's a similar apt or yum install experience on yet another flavour of Linux.

Install docker

$ sudo pacman -S docker
resolving dependencies...
looking for conflicting packages...

Packages (4) bridge-utils-1.7.1-1  containerd-1.7.2-1  runc-1.1.8-1  docker-1:24.0.2-1

Total Download Size:    55.84 MiB
Total Installed Size:  236.93 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...

Install Docker Desktop

  1. Download the Arch package from the release page.

    $ wget https://desktop.docker.com/linux/main/amd64/docker-desktop-4.21.1-x86_64.pkg.tar.zst
    Saving to: 'docker-desktop-4.21.1-x86_64.pkg.tar.zst'
    
    docker-desktop-4.21.1-x 100%[==============================>] 618.70M  5.73MB/s    in 1m 52s
    
  2. Install the package.

    $ sudo pacman -U ./docker-desktop-4.21.1-x86_64.pkg.tar.zst
    loading packages...
    resolving dependencies...
    :: There are 3 providers available for qemu>=5.2.0:
    :: Repository extra
       1) qemu-base  2) qemu-desktop  3) qemu-full
    
    Enter a number (default=1): 2
    
    Total Download Size:     31.84 MiB
    Total Installed Size:  1697.58 MiB
    
    :: Proceed with installation? [Y/n]
    

Manage Docker as non-root user

  1. Create the docker group.

    $ sudo groupadd docker
    
  2. Add your user to the docker group.

    $ sudo usermod -aG docker $USER
    
  3. Log out and log back in so that your group membership is re-evaluated.

Enable Docker daemon

$ sudo systemctl enable docker.service

Run Docker desktop

To start Docker Desktop for Linux, search Docker Desktop on the Applications menu and open it. This launches the Docker and opens the Docker Dashboard, reporting the status of Docker Desktop. Alternatively, open a terminal and run:

$ systemctl --user start docker-desktop

You can check the versions of installed binaries by running the following commands:

$ docker --version
Docker version 24.0.0, build 98fdcd7

$ docker compose version
Docker Compose version v2.19.1

$ docker version
Client:
 Cloud integration: v1.0.35
 Version:           24.0.0
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        98fdcd7
 Built:             Mon May 15 18:47:06 2023
 OS/Arch:           linux/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.21.1 (114176)
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:52:17 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0