Installing Docker on Kali Linux (updated for 2021.1)

February 2021 update:

  • These instructions have been tested and are working on Kali Linux 2021.01
  • At the same time, Docker version that is available through Kali repositories is now quite fresh, so the easiest way to install Docker, unless you absolutely need the latest version, is:
    sudo apt-get update && sudo apt-get install -y
    at the time of writing, you actually get the same version (20.10.3) using both methods, which might diverge in the future.
  • Instructions below also make use of the new way of adding package signing keys to the system as apt-key is being deprecated (note, Docker documentation hasn’t been appropriately updated yet). More details here:

This is a quick guide on how to install Docker Engine on Kali Linux using official Docker repositories, see the note above about OS-provided packages. These steps have been tested on Kali 2021.1.

This guide is based on official Docker documentation (, with slight modification as adding a repository doesn’t work (we’re adding Debian repository to Kali distro).

Raspberry Pi instructions have been tested to work on both 32-bit and 64-bit Kali Linux.

Since Kali Linux 2020.1, a non-root user is created by default, details here —


Kali has a myriad of tools, but it you want to run a tool that is not included, the cleanest way to do it is via a Docker container. As an example, I was looking into a tool called changeme ( that scans for default passwords, released at DerbyCon 7. Doing it the Docker way:

was easy and didn’t pollute the rest of the system with python dependencies etc. Also, there is an older version of the tool included in Kali package repositories, with Docker you can try new versions of existing tools without any library version conflicts etc.

I’m no Docker expert by any means, so if you’ve used Docker on Kali, feel free to share what you liked about it.


Before starting, ensure your Kali Linux is fully up to date.

Add Docker PGP key (saved to /usr/share/keyrings/):

Configure Docker APT repository (Kali is based on Debian testing, which will be called buster upon release, and Docker now has support for it):

For Raspberry Pi 32-bit — use the following command instead:

For Raspberry Pi 64-bit — use the following command instead:

Update APT:

Install Docker

If you had older versions of Docker installed, uninstall them:

Install Docker:

For Raspberry Pi, use the following command instead:

(aufs-dkms package errors out when trying to install on Raspberry Pi, by using --no-install-recommends switch we avoid the issue by not installing aufs-dkms, and Docker still works fine.)


To allow your non-root user to use Docker, add the user to docker group:

Log out and log back in for this change to apply. Note a warning from Docker documentation: the docker group grants privileges equivalent to the root user. For details on how this impacts security in your system, see Docker Daemon Attack Surface.


Random rumblings about #InfoSec. The opinions expressed here are my own and not necessarily those of my employer.

Love podcasts or audiobooks? Learn on the go with our new app.