Install Docker on Kali Linux 2026.3 – Easy Step-by-Step

To install Docker on Kali Linux, run sudo apt install -y docker.io, then sudo systemctl enable docker --now, and add yourself to the docker group with sudo usermod -aG docker $USER. Log out and back in, and docker run hello-world works without sudo. If you need Docker CE instead, add Docker’s Debian repository with the trixie codename.
Short version
sudo apt update
sudo apt install -y docker.io
sudo systemctl enable docker --now
sudo usermod -aG docker $USER
# log out and back in, then:
docker run hello-worldDocker is becoming more and more popular with Hackers and Pentesters alike. Docker is a great way to run tools without the need for installing them from source. This guide works with the non-root default user that Kali introduced in Kali Linux 2020.1, learn more about this here.
https://www.youtube.com/watch?v=qrIKH1Unzo8
Why use Docker?
When you are working as a Pentester, you most likely won’t only be using the tools that are included with Kali Linux, but you are using a lot of different tools that you find on Github. The classic way of installing those tools was to git clone the repository and then using install scripts to locally install them in your /opt/ folder on Kali Linux.
I have recently seen a trend that more and more Git Repositories are offering a pre-configured Docker file that you just need download and run, without the need of installing anything at all. (Except, of course, the only thing is that you need to install Docker on Kali Linux).
Let’s first install Docker on Kali Linux and then I am going to show you an example.
Install Docker from the Kali Repository
Kali packages Docker itself as docker.io, which is the main method in the Kali docs. It needs no extra repository and updates with the rest of Kali:
sudo apt update
sudo apt install -y docker.io
sudo systemctl enable docker --nowTo use Docker without sudo, add your user to the docker group, then log out and back in:
sudo usermod -aG docker $USERKeep in mind that the docker group grants root-level privileges. If you prefer Docker’s own Docker CE packages, use the steps below instead. Don’t install both.
Configuring APT & Keys
First, as always, update APT:
sudo apt update
Then we need to add the official Docker GPG key like so. The old apt-key add command no longer exists on current Kali, so the key goes into /etc/apt/keyrings:
sudo apt install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.ascNext, we configure APT so we will be able to download, install and update Docker. Docker has no Kali repository, so we use the Debian repository with the codename of the current Debian stable release, trixie:
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: trixie
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOFThe screenshot below shows the older one-line docker.list version of this step:

Install Docker on Kali Linux
I am following the official Docker documentation here, but a few of you pointed out that they have problems with it, so I try to break it down.
After adding Docker to APT, we need to update apt once more so we will be able to install Docker on Kali Linux:
sudo apt update
In case you have any old and/or outdated versions of Docker installed on your system, we make sure to get rid of them first:
sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-doc docker-buildx podman-docker containerd runc | cut -f1)Once this is done, we are ready to install Docker on Kali Linux:
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Finally, starting Docker:
sudo systemctl start docker
Now please note, if you do not do the optional step below, you need to run this command every time you want to use Docker again after you have restarted your Kali. Decide on your own.
Optional - Starting Docker automatically after a reboot
Do this at your own risk. I do not recommend doing this if you don’t know what you’re doing. I usually only start Docker when I actually need to use it.
sudo systemctl enable docker
Verifying the Installation
Let’s see if Docker actually works now with a simple hello world, how classy.
sudo docker run hello-world
The “Unable to find image…” warning is normal, as you can see, Docker automatically updates the hello-world program and runs it successfully.

You now have successfully installed Docker on Kali Linux. Now let me show you the afore promised example.
Using Docker as a Penetration Tester
As promised before, I’ll show you a quick example of how to use Docker to run Pentesting Tools on Kali Linux. For this example, we use Amass, the popular Subdomain Enumeration Tool from OWASP. This is not a perfect example, as Amass recently became available via APT, but nevertheless it brings across the point and the info can be transferred to other tools that are not available via APT.
Now, if you wanted to install Amass the classical way from source, you would first need to install Golang, configure Golang, and then run through a couple of steps to install it the Go-Way.
Thanks to Docker, we don’t have to worry about any of that.
All we do is:
sudo docker pull owaspamass/amass:latestAnd to run Amass, with a volume so the results are kept outside the container:
sudo docker run --rm -it -v ~/.config/amass:/.config/amass owaspamass/amass:latest enum -d example.comThe project now publishes a ready-made image, so you no longer build it from the Git repository. The screenshot below shows the output of an older Amass version.

And that’s really all there is to it.
FAQ
Should I install docker.io or docker-ce on Kali Linux?
Use docker.io unless you need a feature from the newest Docker release. It comes from the Kali repository, the Kali docs list it first, and it updates with the rest of your system. docker-ce comes straight from Docker and gives you the latest Docker release, but you have to point it at a Debian codename yourself.
Why does the Docker repository fail on Kali with “kali-rolling”?
Docker publishes repositories for Debian releases, not for Kali. If you copy Docker’s Debian commands as they are, they read Kali’s codename kali-rolling, which doesn’t exist on download.docker.com. Set the suite to the current Debian stable codename, trixie, as shown above.
How do I run Docker without sudo on Kali Linux?
Add your user to the group with sudo usermod -aG docker $USER, then log out and back in, or run newgrp docker in the current shell. Members of the docker group effectively have root access, so only add users you trust.
How do I install Docker Compose on Kali Linux?
With docker.io, install Kali’s package with sudo apt install docker-compose, which gives you both docker compose and docker-compose. With Docker CE, the docker-compose-plugin package from the install command above adds docker compose.
Conclusion
Using Docker to run Penetration Testing Tools is becoming more and more popular and I see why. Knowing Docker can’t do you any harm anyway, it’s a great way to run stuff inside of a Container. I plan on doing a mini-series about Docker and Kali Linux in the near future, stay tuned for that.
7 thoughts on “Install Docker on Kali Linux 2026.3 – Easy Step-by-Step”
Comments are closed. I keep the discussion here because the answers still help.
More posts
All Cyber Security


hey.. i'm kinda having issues here.
when i run:
sudo docker build -t amass https://github.com/OWASP/Amass.git
it starts installing then i get this error:
go: cannot find main module; see 'go help modules'
The command '/bin/sh -c go install ./...' returned a non-zero code: 1
The amass docker said:-Discoveries are being migrated into the local database
Where is the local database?
Can these instructions be used also with kali 2020.2?
Sure!
i have it on Kali 2020.3
Brilliant! Loved the illustrative step by step explanation!
Thank you Tim!