How to Install Docker Desktop on Kali Linux

|
Last Updated:
|
|

How can you install Docker desktop on Linux? In this tutorial, you will learn how to install Docker desktop on Kali Linux. Docker Desktop is an easy-to-install program for Mac, Linux, or Windows environments which offers a straightforward interface that lets you manage your containers, apps, and images from your machine.

Installing Docker Desktop on Kali Linux

The steps below outline how to Docker Desktop on Kali Linux.

Prerequisites

Check the requirements for installing Docker Desktop before you can proceed.

Install Docker APT Repository

Once you have all the requirements in place;

  • Update your system packages.
sudo apt update
  • Run the following command to install the required packages.
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
  • Next, add the Debian (Kali is Debian based) Docker repository using the command below.
curl -fsSL https://download.docker.com/linux/debian/gpg | \
sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
echo \
"deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable" | \
sudo tee /etc/apt/sources.list.d/docker.list
  • Then install Docker.
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io uidmap
  • Ensure Docker service is running;
systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-02-27 13:45:50 EST; 1min 10s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 31797 (dockerd)
      Tasks: 7
     Memory: 30.1M
        CPU: 231ms
     CGroup: /system.slice/docker.service
             └─31797 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.010221210-05:00" level=info msg="[core] [Channel #4 SubChannel #5] Subchannel Connectivity change to READY" module=grpc
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.010326868-05:00" level=info msg="[core] [Channel #4] Channel Connectivity change to READY" module=grpc
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.077018506-05:00" level=info msg="Loading containers: start."
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.266661694-05:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.370958613-05:00" level=info msg="Loading containers: done."
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.418416285-05:00" level=info msg="Docker daemon" commit=bc3805a graphdriver=overlay2 version=23.0.1
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.418766947-05:00" level=info msg="Daemon has completed initialization"
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.458777536-05:00" level=info msg="[core] [Server #7] Server created" module=grpc
Feb 27 13:45:50 kali systemd[1]: Started Docker Application Container Engine.
Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.466014891-05:00" level=info msg="API listen on /run/docker.sock"

If not running, start it;

sudo systemctl start docker
  • After the Docker installation, add your user account to the docker group using the following command.
sudo usermod -aG docker $USER

Installing Docker Desktop on Kali Linux

  • Navigate to the Docker Desktop download page and get the latest Linux DEB download link and download it using wget the command as shown below.
wget https://desktop.docker.com/linux/main/amd64/docker-desktop-4.16.2-amd64.deb
  • Install Docker Desktop using the following command.
sudo apt install ./docker-desktop-*-amd64.deb
  • To check the version of the binaries run the following commands.
docker compose version
docker --version
docker version

Sample output

Client: Docker Engine - Community
 Version:           23.0.1
 API version:       1.42
 Go version:        go1.19.5
 Git commit:        a5ee5b1
 Built:             Thu Feb  9 19:46:54 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          23.0.1
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.5
  Git commit:       bc3805a
  Built:            Thu Feb  9 19:46:54 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.18
  GitCommit:        2456e983eb9e37e47538f59ea18f2043c9a73640
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
  • After the installation, launch Docker Desktop from the application menu as shown below.
How to Install Docker Desktop on Kali Linux
  • And that is it on installing Docker Desktop. You can also launch Docker Desktop from the terminal using the command below.
systemctl --user start docker-desktop
  • To start Docker Desktop on system boot up run the command below.
systemctl --user enable docker-desktop
  • Similarly, you can run the following command to stop Docker Desktop.
systemctl --user stop docker-desktop
  • Click the Accept button as shown below to accept the service agreement.
How to Install Docker Desktop on Kali Linux
Install and Configure Docker Desktop on kali linux
  • Wait for it to start.
  • If you decided to run Docker desktop on VirtualBox VM, be sure to enable nested virtualization for that specific VM. Otherwise, when you try to start Docker Desktop, you will see Docker Desktop stopped…
  • To enable nested virtualization for specific VM, poweroff the VM and run;
vboxmanage modifyvm <vm-name> --nested-hw-virt on

Or;

Docker Desktop stopped... enable nested virtualization
  • After starting the tutorial page will pop up.
how to Install Docker Desktop on Ubuntu
  • You can either choose to go through the tutorial or skip.
  • Then you will be redirected to the Containers page after skipping or going through the tutorial.
how to Install Docker Desktop on Ubuntu
Install and Configure Docker Desktop on Kali Linux

Running containers

  • On the home page, we will run the Redis container as an example. You can as well copy the example docker run command and execute it on the terminal.
  • To run Redis container under guides, click on Run option and then select the directory where Docker will store static content.
how to Install Docker Desktop on Ubuntu
  • When you click Run, the container images will be pulled and Docker container created over it.
sample redis docker container
  • You can view container logs, inspect it, open the terminal for the container, check metrics e.t.c
  • You can search the images from Docker hub and run containers using them;
search docker images
  • Containers can be managed from the containers tab.
all containers
  • The images can be managed from the image tab.
docker desktop images

Configure Docker Desktop on Kali Linux

  • Click on the setting icon as shown below.

General tab

  • You can configure Docker Desktop to start when you log in from the settings menu.
  • Alternatively, you can use the command
systemctl --user enable docker-desktop 
  • Choose a theme for Docker Desktop.
  • Show weekly tips which are simply recommendations.
  • Open Docker Dashboard at startup
  • Enable Docker Compose V1/V2 compatibility mode which allows you to switch between V1 or V2.
docker desktop general settings

Resources tab

  • On the resource tab, you can limit resources according to your preference, configure file sharing, and configure proxies and networks.
  • Other configurations are available on the settings option such as Docker Engine, Kubernetes, Software updates, Extensions, etc.
docker desktop resource settings

Uninstalling Docker Desktop on Kali Linux

  • To remove Docker Desktop from Kali Linux run the command below.
sudo apt remove --purge --auto-remove docker-desktop
  • Delete Docker Desktop files.
rm -r $HOME/.docker/desktop

That concludes our article on installing Docker Desktop on Kali Linux.

Read more on Docker Desktop Documentation

Other Tutorials

How to Install Docker Desktop on Ubuntu 22.04/Ubuntu 20.04

How to Install Docker Resource Usage Extension

How to Monitor Docker Containers using Nagios

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
Kifarunix
Linux Certified Engineer, with a passion for open-source technology and a strong understanding of Linux systems. With experience in system administration, troubleshooting, and automation, I am skilled in maintaining and optimizing Linux infrastructure.

Leave a Comment