Docker basics and Images

This chapter will cover some basic commands of docker. It will also show you some examaples where you can find and install docker images to train and sharp your security skills :)

1. Docker Images

Check out: https://hub.docker.com/

2. Useful Docker commands

Docker Repository file:

cat /etc/apt/sources.list.d/docker.list

Check docker service:

sudo service docker status

Download and run Docker Image

sudo docker pull hello-world

sudo docker run hello-world

List and remove Docker Images

sudo docker images

sudo docker ps -a

sudo docker rmi -f opensecurity/mobile-security-framework-mobsf

Interact with docker image

sudo docker pull ubuntu

sudo docker run --name customUbuntu -itd ubuntu /bin/bash

sudo docker exec -it custumUbuntu /bin/bash

Docker service manage ip adresses:

First container get's the ip address 172.17.0.2

Portforwarding to docker container

sudo docker create --name customUbuntu2 -p 8090:80 -p 88:443 -it ubuntu /bin/bash

docker start customUbuntu2

docker ps

If you have want to pull multiple docker images, it's usefull to register a free account on https://hub.docker.com

docker login

3. Docker Images for Security training

Last updated