Thursday, August 10, 2017

Deconstructing Docker on Windows



“A problem well stated is a problem half solved.” –Charles Kettering[1]

Docker gained much traction during the last period, and it seems it is the right time to start learning it, especially after it became natively supported in Windows.
All my knowledge about docker and containers world is vague, I read a bunch of articles and watched few videos here and there about the topic but didn't have a solid understanding or practical usage yet.

My Goal

I have many .NET 4.x web applications, read: .NET 4.x not .NET Core, and I have some pain in automating their deployment. I want to start hosting these applications in Docker hoping to relieve my pains and gain all the benefits promised by Docker world.

From Where to start?

Well, I have read an interesting book about rapid skills aquisition named: The First 20 Hours: How to Learn Anything . . . Fast!  (You can read its summary here). The author of the book mentioned some steps to acquire any new skill quickly:

  1. Deconstruct it into the smallest possible sub-skills.
  2. Learn enough about each sub-skill to be able to practice effectively and self-correct.
  3. Remove any physical, mental, or emotional barriers that get in the way of practice.
  4. Practice the most important sub-skills for at least 20 hours.

And from step 1 I will start with listing all the skills I think will help me in understanding and applying Docker to achieve my goal.

The Plan

I hope I can find enough time to write about each of these skills in detail, but unfortunately, I am a busy developer, but I will try to -at least- updating this article with useful links that may help.

Docker Skills Deconstructed

Basic Concepts

  • What are containers? And how do they work?
  • What is the difference between containers and virtual machines?
  • What is Docker? And how does it work?
  • What is the difference between Docker on Linux and Docker on Windows?
  • What are the jargon needed to work with containers/docker?
  • What is the benefits of using containers/Docker for development, operations, security, etc.?
  • What are other alternatives to Docker?
  • What are containers available on Windows?

Maturity

  • Who uses Docker?
  • Who uses Docker on Windows in production?

Installation

  • Which Windows version supports containers/Docker?
  • What are the prerequisites to install Docker?
  • How to install Docker on Windows?

Interacting with Docker


  • Do we have UI to work with Docker or we must use command line?
  • Can we integrate with Visual Studio?

Installing Software

  • How can I install a software inside Docker? Like IIS, SQL Server, etc?
  • How to create a base image that contains all the software I need (IIS, SQL Server, .NET Framework, etc)?
  • Can I install development tools on containers, like Visual Studio, SQL Server Management Studio, IIS Manager, etc?

Development

  • Create a Hello World ASP.NET 4.6 application and host it on docker.
  • How to host an existing large web application in docker?
  • How can I debug issues on containers?

Deployment

  • How can I host my web application inside docker?
  • How can I host a windows service in Docker?
  • How can I host my database inside Docker?
  • How can I host my files inside Docker?
  • Can I host all the layers of my application in one Docker image? 
  • How can Docker help me in automating deployment?
  • Can I use Windows Explorer, IIS Manager, and SQL Server Management Studio in my machine to manage files, web applications, and databases hosted in containers?

Networking

  • How to assign an IP to a docker image?
  • How containers can talk to each other?
  • How to add this image to an existing Web Farm?
  • How to create a web farm using only containers?

Infrastructure

  • How resources are managed by the image? i.e. what if my application hosted in Docker needs more CPU or memory, how the host manages it?
  • Does Containers restarts automatically with Windows?
  • can I build my private cloud with Docker?


Managing Docker Images

  • How can I copy downloaded images to other machines?
  • How can I create my own private docker hub?
  • How can I add images to source control?

Side Skills To Learn

  • PowerShell

Misc

  • Create a cheat sheet for Docker commands - if not exists -

-------
[1] Source: The first 20 Hours book

No comments:

Post a Comment