Installing Docker on Kali Linux (updated for 2021.1)

  • These instructions have been tested and are working on Kali Linux 2021.01
  • At the same time, Docker version that is available through Kali repositories is now quite fresh, so the easiest way to install Docker, unless you absolutely need the latest version, is:
    sudo apt-get update && sudo apt-get install -y docker.io
    at the time of writing, you actually get the same version (20.10.3) using both methods, which might diverge in the future.
  • Instructions below also make use of the new way of adding package signing keys to the system as apt-key is being deprecated (note, Docker documentation hasn’t been appropriately updated yet). More details here: https://github.com/docker/docker.github.io/issues/11625

Why?

docker run -it ztgrace/changeme /bin/bash

Preparation

curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker-archive-keyring.gpg >/dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian buster stable' | sudo tee /etc/apt/sources.list.d/docker.list
echo 'deb [arch=armhf signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian buster stable' | sudo tee /etc/apt/sources.list.d/docker.list
echo 'deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian buster stable' | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update

Install Docker

sudo apt-get remove -y docker docker-engine docker.io
sudo apt-get install -y docker-ce
sudo apt-get install -y --no-install-recommends docker-ce
sudo docker run hello-world
sudo usermod -aG docker $USER

References

--

--

--

Random rumblings about #InfoSec. The opinions expressed here are my own and not necessarily those of my employer.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Airman

Airman

Random rumblings about #InfoSec. The opinions expressed here are my own and not necessarily those of my employer.

More from Medium

Everything About Path Traversal Vulnerability

Attach Payload to an Executable File

Reverse Shell vs Bind Shell

Powershell troubleshooting/forensics