Understanding Docker with Pentester Academy for FREE

Nithin R
4 min readJul 25, 2021

--

Hello, this is Nithin here. I’m a security researcher / enthusiast and I go by the handle @thebinarybot at most of the places online.

“Docker” is a word that we all have come across and is quite a buzz word at the moment. But what exactly is docker and how do I test what it does?

I’ll help you answer the first part, but go register at Pentester Academy (https://www.pentesteracademy.com/) and continue reading this article to explore get answered for the second part.

What is Docker ?

Before trying to understand what Docker is, let’s have a look at what issue Docker is trying to solve. Once you know what problem a particular software package is trying to solve, you’ll get a wider understanding of the package as well.

Whenever we try to create software applications, there are instances where the program I create works absolutely fine in my machine but wouldn’t work as expected when it’s uploaded to a server or tested in my friend’s machine. If you’re a developed you’d have come across this situation as well.

One of reasons why this issue pops up is because of the difference in dependencies. Most of the software applications are dependent upon other packages to work. Simply put, those packages are called as dependencies. You might have installed all the required dependencies in your machine but your friend wouldn’t have and that most likely would’ve caused the issue of not working in his computer.

Docker is a software application that solves the above mentioned issue by creating containers. So essentially, once you create a container it stores your code, your dependencies, your configuration, the processes you’re running and many more necessary details. Once created, you can easily share this docker image with your friend who upon installing this need not go through any hassle of installing custom dependencies, modify config files etc.

Quick shout-out to Pentester Academy

Pentester Academy is a company that teaches you Pentesing practically. One of the best things about Pentester Academy is their browser-built laboratories. I’ve always liked learning things practically and testing them and the labs in Pentester Academy provided a very hassle free experience on exploring and maneuvering. Most of the labs are priced but there are a couple of community (free) labs you can try out as well.

Docker Lab at Pentester Academy

The Docker Lab at Pentester Academy is completely free of cost and you can visit at https://attackdefense.pentesteracademy.com/challengedetails?cid=1342. The instructions for this laboratory is very straight forward. What’s even better is the availability of a detailed Lab Manual that can be downloaded, for free of cost. To add cherry on top of the cake, they also have a detailed video walk through for every lab session which you can refer if stuck at some point.

This particular docker lab doesn’t have any task to complete as such but only practice the commands.

Here are some of the basic things that you might want to try :

  1. Checking version using docker version

The above command displays a detailed version of the application. Alternatively, you can also run another command to just display the version number

2. Downloading image using docker pull

This command is used to pull a docker image. Since docker also acts like a social networking platform where you can download files, this becomes easy.

Once you’ve pulled a couple of images, to list all the images, you can use “docker images”

3. Running in different modes

You can run docker basically in two modes, the background mode and the interactive mode.

To run in background mode, use “docker run -dt name_of_the_image”

To run in interactive mode use “docker run -it name_of_the_package”

4. Inspecting an image

To inspect an image, you need to know the container ID. To get container ID you can run “docker ps” which basically lists all running containers.

Once you have the container ID, you can run docker inspect ID to inspect the docker image

5. Stop container

To start or stop a container, you need the container ID. Once you have the ID, you can run “docker stop ID”.

These are some of the very basic commands you can test with docker. The detailed walk-through and Lab Manual provided by Pentester Academy definitely will teach you a lot on docker. Do check them out.

If there’s any correction to be made in this article or to discuss anything security feel free to contact me at @thebinarybot in twitter. Have a great day !

--

--