docker basics

So right now every one talks about docker. Some of them use it and others just talk about it, but anyway its a hot subject right now. So here is what it is for me right now:

Docker is an an open-source-project that extends and improves your virtualization. You can work with docker on all three main systems like windows, MacOS and Linux. Docker does two nice main parts to me:

    • Change the platform-background-operation
    • Easy to use and control

The platform-background-operation compared to a normal virtualization-process is shown up here:

In docker you do not create a OS for every app you want to virtualize. So that saves you a lot of server-power and server components. Everything you need is a server with a host-OS choosen by you. Than you install docker and there you go. To start you just to install docker and register, because docker works with a docker(-user)-id. After this you can start.

I type my docker statements in powershell. You always have to start by starting docker if it ist not running. If docker is running on your system and you never used it you have to start with the command “docker login”. After this I use the following statement to see what containers are out there. The parameter -a will show me also containers that are not running right now:

docker ps -a

To have a container there are to main-steps: pull & run.
But how ever if you wanna run a std. container that is out there as a image and you do not have it it will check out and pull before running automatic. So to run your first program you can do something like this:

docker run busybox echo "hello world"

After doing this you should see your busybox echo “hello world” container with the docker ps -a command.
If you have lot containers and want to delete all that are status = exited you can do something like this:

docker rm $(docker ps -a -q -f status=exited)

the parameter -q will just display the number and the parameter -f will describe a filter. You also can add –help to every command to see possible parameters for a statement like this:

docker ps -a --help

To have a ubuntu machine you can do something like this:

docker run ubuntu

Now docker will download an ubuntu image and create a container up for you. You can go and and go to the commando line of that linux machine by using:

docker run -ti ubuntu


Again and again I read somethings about the osi-model without knowing it. This cause that I can not understand the things correctly. So I will describe the osi-model hoping to remember it and the different layers:

The user:
– layer 8: the user (this layer is more or less a joke and does not exists)

The application:
– layer 7: application layer (http, ftp, …)
– layer 6: communication layer or presentation layer (http, ftp, …)
– layer 5: session layer (http, ftp, …)

The transport:
– layer 4: transport layer (TCP/UDP, …)
– layer 3: network layer (IP, …)
– layer 2: data link layer (MAC, …)
– layer 1: physical layer (ethernet, …)

Layer 1 to 4 will manage the transport of all packages. Layer 5 to 7 provide the application-data-flow. Layer 8, which does not exists is the user. If it is a layer-8-problem than the it is the faul of the user.

most important ports #tcp/udp

Today I want to describe the most important ports that a developer probably should know about. So check this out:

  • 20: ftp-data (file transfer; default data)
  • 21: ftp (file transfer; control)
  • 22: secure shell
  • 23: telnet
  • 25: simple mail transfer
  • 53: domain name system (DNS)
  • 67: boostrap protocol server (dhcp server)
  • 68: boostrap protocol client
  • 69: tpft (trivial file transfer protocol)
  • 80: http
  • 110: post office protocol – version 3 (pop 3)
  • 119: network news transfer protocol
  • 123: network time protocol
  • 137/138/139: NetBIOS
  • 143: internet message access protocol (imap)
  • 161/162: simple network managment
  • 443: https
  • 445: Microsoft DS
  • 465: smpts (smtp secure)
  • 500: ip-security vpn
  • 587: simple mail transfer submission (smtp)
  • 993: impas (imap4 over tls/ssl)
  • 995: pop3 over tls/ssl
  • 989/990: ftp over tls/ssl
  • 3389: remote desktop