Kali Docker

I went to a talk recently on security. Kali Linux was mentioned and I started looking at what this meant.

I was thinking of setting up a machine to explore when a co-worker mentioned building a Docker Container with Kali Linux inside it. With some quick searching I found that they already had Kali Linux dockerized ... I settled on the 'ROLLING' version.

Kali provides official Kali Docker images that are updated once a week on Docker Hub. You can thus easily build your own Kali containers on top of those that we provide. We offer various images to try and suit your needs, all with a different variation of Kali Linux as they use unique branches for the source. Docker run -t -i kalilinux/kali-rolling /bin/bash. The command /bin/bash will open a bash for you as root, let’s update our system so we can have the latest packages installed and updated: apt-get update && apt-get install -y. Now for the last step, we will use a special command to install all tools that you would find on the traditional kali. 配置Docker APT repository: (Kali is based on Debian testing, which will be called buster upon release, and Docker now has support for it) echo 'deb buster stable' sudo tee / etc / apt / sources.


Here are the abbreviated notes I put together ...

KaliKali DockerKali docker-compose

From ... Kali Containers Docker

Docker Installation and Update

$ docker pull kalilinux/kali-rolling

$ docker run -ti --rm -v /Users/bob.fornal/Projects/pentest/root:/root -v /Users/bob.fornal/Projects/pentest/postgres:/var/lib/postgresql kalilinux/kali-rolling /bin/bash


# apt-get update && apt-get install metasploit-framework

The steps from this point forward should be re-run each time you start Kali Linux in this Docker Container (the run command below).

# apt update

# apt upgrade

# apt dist-upgrade

# apt autoremove


# apt clean

Tooling (that I still need to explore in more detail)

# msfconsole

Commit Changes from Update Above

Image Information

$ docker ps -l

Kali Dockerfile

$ docker images -a

Commit Commands

$ docker commit [id] kalilinux/kali-rolling

Docker Cli Download

$ docker run -t -i kalilinux/kali-rolling /bin/bash

Kafka Docker Image


These notes are kind of rough and based on much of my exploration. They will be updated as I learn more or change the process.