Intro

Recently I’ve seen the question pop-up a lot: Do you use your native operating system for hacking or a VM? The answer might surprise you dear hacker, i use neither. What i use is containers.

What is docker?

Docker enables you to seperate your applications from your infrastructures. It consists of a daemon that manages several components of the docker ecosystem. This consists of:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/16ef4695-cde0-4b7d-b348-9decfcfa0577/05C5F6F5-4262-4DFD-B4BA-8583D3051CDD.png

The daemon manage these components via a REST api. We can use a docker client to communicate with the daemon, which does all the heavy lifting for us. Keen eyed readers might notice that this resembles a client-server architecture and they would be right, that’s exactly what docker is trying to implement.

The Docker client and daemon CAN run on the same server but they don’t have to.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8fad5750-15c2-40c4-996c-81bb5bbbc40e/603D9F12-65F0-4FFC-A2F7-58AF6B4BDEF0.png

Docker components

Before we go any further it’s important we go over some terms. These terms are docker specific and will help us understand the architecture and how we can use docker.

Daemon

The daemon takes input from the docker client. When docker users run a command like docker run, it gets sent from the client to the daemon which carries them out. The daemon does this using the docker API.

A docker daemon can also communicate with other daemons on the same server or on the network.

Docker Client