Running Kali on Windows using Docker

Docker is really popular among the dev-ops community.
If you have never used Docker before, it’s basically a tool in which allows you to load core application files without having to run a whole OS inside a VM. It does all of this by running applications inside containers. If you want to learn more about docker, here is a handy link:

Aside from applications, you can also run core OS files such as Ubuntu or Debian. This allows you to spin up a Linux container by using Docker and Powershell. Since you can run Linux, you can also run Kali. It’s important to note that some people see Docker as a security threat. This is because by default, you are root so be careful when using Docker as it could be exploited.

Kali is a well known Debian-based Linux distribution which is used by security specialists, such as pen-testers. Now Kali can be run on USB, dual booted or simply ran as a VM. What Kali have also done is make it available over docker.

Below are a set of commands I use in order to spin up Kali and add a few tools. This are commands you run once Docker has started and you have opened up Powershell.

Download Image: docker pull kalilinux/kali-linux-docker
Run the container: docker run -t -i kalilinux/kali-linux-docker
Update and install Metasploit: apt-get update && apt-get install metasploit-framework

This will give you the basics but here are a few more commands you can run to add a few more tools:

Install Networking tools (Ifconfig): apt-get net-tools
Install ExploitDB: git clone
Second Part: apt -y install exploitdb

If Metasploit is failing to load, here are a few commands you can run in order to fix it:

Move inside the Metasploit directory: cd usr/share/.. metasploit
Install Bundler: gem install bundler
Second part: bundle install
Update Gem: gem update –system
Install RubyGems: apt-get install rubygems

Once this is fixed, you can start the DB by running:

Start the DB: service postgresql start
Initialize the MSF DB: msfdb init
Restart the DB: service postgresql restart

You should now be able to start Metasploit and have a running container of Kali.


2 responses to “Running Kali on Windows using Docker”

  1. Sarwang Jain avatar
    Sarwang Jain

    This is really cool man! Thanks for the post…Really helped.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at

%d bloggers like this: