Skip to content
DevOps AI ToolKit
Newsletter
Learning path · 16 lessons · Beginner → Intermediate

Kali Linux on Docker

Build a portable Kali Linux security and troubleshooting toolbox using Docker, Docker Compose, custom images, networking, volumes, and DevSecOps workflows.

Docker provides the environment. Kali provides the tools. DevOps provides the methodology.

New to Kali? Start with Kali Linux for DevOps Engineers: Getting Started.

Why Kali + Docker?

A disposable, reproducible toolbox

  • Disposable

    Spin up a fresh, clean toolbox and throw it away when you are done.

  • Portable

    The same tools, same versions, on any machine that runs Docker.

  • Reproducible

    Rebuild an identical environment from a Dockerfile, every time.

  • Isolated

    Keep security tooling off your workstation and production hosts.

  • Automation-friendly

    Drop the same container into a CI/CD job or an incident.

What you'll build

One project, progressively enhanced

You build a single kali-devops-lab/ project across the series — by the last lesson it's your reusable toolbox.

Kali DevOps Toolbox

A custom, minimal Kali image with just the diagnostics you use.

Docker Security Lab

An isolated user-defined network with Kali + target services.

Docker Compose Lab

A one-command, reproducible lab defined in compose.yaml.

Reusable Scripts

DNS, HTTP, TLS and port checks you can run anywhere.

Course curriculum

The 16-lesson path

Architecture

The Docker security lab you'll build

             Docker Host

    +---------------------------+
    |                           |
    |     security-lab          |
    |                           |
    |   +------+    +------+     |
    |   | Kali | -> | Web  |     |
    |   +------+    +------+     |
    |                           |
    +---------------------------+
Prerequisites

What you need before you start

  • Basic Linux and command-line familiarity
  • Docker installed (containers helpful but not required)
  • The Getting Started series recommended
  • New to Docker? See Docker Academy
Additional Kali Linux resources

Recommended Reading

Optional references. The tutorials are the primary learning path.

Affiliate Disclosure: Some links on this page are affiliate links. If you purchase through one of these links, DevOps AI Toolkit may earn a commission at no additional cost to you. See our affiliate disclosure.

FAQ

Kali Linux on Docker — common questions

Can Kali Linux run in Docker?

Yes. There is an official Kali image (kalilinux/kali-rolling) you can pull and run in seconds, which makes a great disposable, containerized toolbox.

Is the Kali Linux Docker image official?

Yes — kalilinux/kali-rolling is the official image maintained by the Kali team.

Is running Kali in Docker safe?

For disposable diagnostics on infrastructure you own or are authorized to test, yes. This series teaches container security throughout — least privilege, avoiding --privileged, network isolation, and image hygiene.

Is Kali Docker the same as running a Kali VM?

No. A container shares the host kernel and offers less isolation than a VM, but starts instantly and is disposable by default. Part 1 compares VM, Docker, WSL, and bare metal.

Can Kali Docker use Nmap?

Yes. Nmap works well inside a Kali container for validating your own lab services and deployments.

Can Kali Docker use tcpdump?

Yes, with the minimum required capability (typically NET_RAW/NET_ADMIN) — not --privileged. Part 13 covers capturing packets safely.

Should I run Kali Docker with --privileged?

Almost never. --privileged removes most container isolation. Prefer adding only the specific Linux capability a task needs. Part 14 explains why.

Can I use Kali Docker in CI/CD?

Yes — a purpose-built Kali image is ideal for defensive validation in a pipeline: DNS, HTTP, TLS, and expected-port checks after a deploy.

Is Kali Linux Docker useful for DevOps?

Very. It gives you a portable, reproducible troubleshooting and infrastructure-validation toolbox without cluttering your workstation or production hosts.

Turn Kali Linux Into Your DevOps Toolbox

Start with a simple Kali container, then progressively build a reusable Docker environment for networking, DNS, HTTP, TLS, packet analysis, and infrastructure validation.

Start Part 1: Why Run Kali Linux in Docker? →