Installing Docker on Kali Linux

To install Docker on Kali you need to remember that there is already a package named β€œdocker”, therefore Docker has to be installed under a different name. If you install docker you will not end up with the container version. The version we will be installing is named All commands are the same however, so running docker on the command line will be the appropriate command:

:~$ sudo apt update
:~$ sudo apt install -y
:~$ sudo systemctl enable docker --now
:~$ docker

You can now get started with using docker, with sudo. If you want to add yourself to the docker group to use docker without sudo, an additional step is needed:

:~$ sudo usermod -aG docker $USER

The final thing is to logout and in again.

If you would like to use a Kali Docker image, we have a doc page for that here.

Installing docker-ce on Kali Linux

docker-ce can be installed from Docker repository. One thing to bear in mind, Kali Linux is based on Debian, so we need to use Debian’s current stable version (even though Kali Linux is a rolling distribution). At the time of writing (Dec. 2021), its β€œbullseye”:

:~$ printf '%s\n' "deb bullseye stable" |
  sudo tee /etc/apt/sources.list.d/docker-ce.list

Import the gpg key:

:~$ curl -fsSL |
  sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-ce-archive-keyring.gpg

Install the latest version of docker-ce:

:~$ sudo apt update
:~$ sudo apt install -y docker-ce docker-ce-cli


Install Docker Engine on Debian

Last updated