Kali Linux on Docker

Kali Linux on a Virtual Machine consumes a lot of space. I considered installing a Debian GNU/Linux in a docker container, however the idea of installing software packages might turn into a nightmare. With so many software repositories sources on the internet, configuration would just break my Kali. The Official documentation at Kali also says the same. 


To make our life easier, Offensive Security has released an Official Kali Linux image on Docker. This is a minimal base installation of latest version of the Kali Linux Rolling Distribution. There are no tools (Kali Linux metapackages) pre-installed in this image, however the process to install them is very simple. . I will create another post on how to find and install them. 

In this tutorial, we will download and install the Kali Linux image.

The steps are same if you are using a Windows or Mac machine. Since, I am using a Mac machine, the screenshots and verbose would be Mac oriented. 

Step 1 – On your Mac, install Docker Desktop

Step 2 – Login to Docker using your Docker User Name and Password

Step 3 – On your Mac Terminal and run the following command

docker pull kalilinux/kali-linux-docker

This action will download and install the Docker image.


Step 4 – Once the image has been downloaded, run the following command on your Mac Terminal to verify the image is present

docker images 


Step 5 – On your Mac Terminal, run the following command

docker run -t -i kalilinux/kali-linux-docker /bin/bash

This command will create the docker container and start /bin/bash in that container. 


 I have already shared a post on Updating and Upgrading Kali Linux. The same steps would also work on a docker container. 

For ease, you may combine the commands

apt-get update &&  apt-get upgrade &&  apt-get dist-upgrade &&  apt autoremove



Be the first to comment

Leave a Reply

Your email address will not be published.