Bits and bytes of a hacker.

How to Install Docker on Kali Linux

I’ve recently upgraded to Kali 2 2016.2 and decided to run some local web apps to exercise exploiting the MEAN stack. To make things as quick and simple as possible, I decided to run these web apps in Docker.

To install Docker in Kali, these were the steps I followed:

  1. Create a backports file and add the entry for Debian Wheezy:

    echo 'deb wheezy-backports main' > /etc/apt/sources.list.d/backports.list && apt-get update

  2. Install ca-certificates and allow APT to operate via https:

    apt-get install apt-transport-https ca-certificates

  3. Add the appropriate GPG key:

    apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

  4. Add the appropriate Docker source entry:

    echo 'deb debian-wheezy main' > /etc/apt/sources.list.d/docker.list && apt-get update

  5. Install Docker and start its service:

    apt-get install docker-engine && service docker start

  6. Verify that Docker is working:

    docker run hello-world

That’s it, Docker should now be up and running on Kali Linux.