In this lab, we will learn to work with the fundamental aspects of Docker.

Start by installing docker.io (Let’s use Kali)

image.png

apt install docker.io

image.png

Although it is possible to build a Docker image from scratch, you will usually find a preconfigured Docker image and add whatever you need from there. The place to go for all things Docker is here:

<https://hub.docker.com/>

Creating an account isn’t necessary. You can search for images from the front page.

image.png

In either case, we’ll end up searching for Apache2.

image.png

Before we download anything, let’s take a look at the ‘tags’ section. Every docker image will always provide the ability to download previous versions/releases. These ‘tags’ simply allow us to specify which version we want to download. If you are interested in spinning up vulnerable software at home so you can try to exploit it, pulling down a docker version of the application using an old version number (or tag) is usually a good way to get that done.

image.png

In this case, we’ll be using the ‘docker pull’ command to download the ‘latest’ version.

image.png

docker pull ubuntu/apache2:latest