Docker for .net developers

Until or unless you are living in a cave, it is hard to not to know about docker. Microsoft has made sure it is marketing the technology with a various possible channel. The problem with this approach people often tends to read between the lines and understood docker as another Virtual machine. So in this blog post, I am going to explain it with three use cases where it fits appropriately and how to make an informed decision when it comes to docker.

Use Case 1: General Use/Ops.

Lets us take an example of installing Elastic Search/Kibana for adding a search to the application. It may be a daunting task. You need to download two MSI from the elastic search website and make sure it is on a right operating system, and possible the folders and IP are in allowed to created and so on.

Let’s take the docker world as an example, all you need to do is go to docker hub and search elastic search. There is a docker image where somebody else has already downloaded and preconfigured the application for the best setting and made it available for us to use. 
So all you need to do is

docker pull nshou/elasticsearch-kibana

This pulls/download the latest search of software and makes it available for local use.Next step you can run the application by running the below command.

docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana

That’s it and now you can elastic search and kibana running on the machine with the optimal setting. This easiness which docker brings in makes it Play store/App store for distributing the application which is hard for doing before.

So if you have 10-page deployment manual for application its time you need to move to docker to make the ops team happy.

Use Case 2: Works on my machine.

In this use case let’s take a simple scenario where a developer uses file logging and stores the log file in a C:\logs drive, but we forgot to create a folder or not have permission to create it. Now, this is a classic problem of the developer saying Works in my machine.

Now in the classic scenario, Developer has to get permission to see if the application server and need to verify if the folder is present. Imagine if we have 1000 servers, and it didn’t work for 100 servers, and it’s going to be a nightmare for the developer.

With Docker, the developer can download his copy of an image easily as we did with elastic search and verified the same. A better way is also to use Docker for debugging which make If it works on your system, it should work anywhere.

Use Case 3: Modernizing the application platform

As I told docker differs from VM in a way that Virtual machines are Hardware partitions where is docker is an OS partition.

As this topic is too big to provide an example , I like to point to a important source for learning more about it . Elon Stoneman course on Pluralsight explains how to achieve this.

I have taken these use case where I found a Wow moments when using docker and hope this blog will trigger you do the same.