#HackOnTuesday Episode 7 How to install Docker on Kali Linux 2017.1

In recent years, a growing number of companies have moved their server applications from virtual machines (VM) to containers. According to coscale.com, the number of Dockerized applications has grown 3100% over the last 2 years. This huge success is due in part to the fact that containers require far less resources compared to traditional VMs. For this reason, in this episode of #HackOnTuesday we will learn how to install the most popular container engine on our favorite Linux distribution, Kali.

Here are the steps to install Docker on Kali. First, we have to run apt-get update, then install a server for managing and downloading OpenPGP certificates, ca-certificates and enable APT to access metadata and packages over HTTPS.

apt-get update
apt-get install -y apt-transport-https ca-certificates
apt-get install dirmngr

After that, we can add the appropriate PGP key.

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \ --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

And, add the appropriate Docker source entry.

echo 'deb https://apt.dockerproject.org/repo debian-stretch main' > \/etc/apt/sources.list.d/docker.list

When that’s done, re-run apt-get.

apt-get update

At this point, to install Docker simply type:

apt-get install docker-engine

Once the installation is finished, start the docker service with:

service docker start

To verify that docker is working properly, type:

docker run hello-world

If everything goes well, you should see the following output.

And if something goes wrong, may god have mercy on your soul. Just kidding! Leave a comment and we will try to help you out.