Docker is a great alternative to virtualization, especially in the case of Linux if you don’t need a GUI. Most of the popular Kali Linux pentest tools are command-line based and don’t require a GUI, which makes Docker an excellent alternative. If you’re running Docker on Linux or macOS, it requires less resources than a full blown virtual machine. You can still run it on Windows, but it will use more overhead than Linux and macOS. Offensive Security has created a kalilinux/kali-linux-docker bare bones image, which is what we’ll use to get started.
Install Kali Linux Using Docker
This article assumes you already have Docker installed and running. You can find more information at Docker.com.
Run the following commands to pull the most recent Kali Linux Docker Image, create the Docker Container and start /bin/bash in that container:
docker pull kalilinux/kali-linux-docker
docker run -ti kalilinux/kali-linux-docker /bin/bash
Update Kali Linux
After running the commands above, you’ll be at the /bin/bash prompt. You’ll want to run the following commands to update the Kali packages: