I've been interested in learning about the new capabilities and support for Docker and Windows Containers in the Windows 10 Anniversary Update and Windows Server 2016 for a while now. Rather than wait for a customer to ask whether we support these newly available technologies, I decided to take on the question proactively. The fact that I'd wanted an excuse to learn this stuff had nothing to do with the decision. Nothing at all, I tell you!
While I can't go into the results of my efforts (…yet) I wanted to share some of the lessons I learned.
- Docker for Windows (v1.13.0-rc6-beta36) is still a work in progress . Docker support for Windows Containers is in a "beta" form, and unlike many sharing that moniker, it definitely deserves it. It's not quite ready for production deployments, but it's getting close.
- The documentation covers a lot of ground in good detail. If there's one thing I can say was lacking it was in the not-unique-to-docker problem of providing correct command-line invocation patterns for multiple command line parsers and shells. The installation, getting started, and samples are fantastic at educating users without overwhelming them.
- Assuming you're interested in running Windows Containers, make sure that the first thing you do is flip your Docker engine to Windows Containers mode. Do this by right-clicking the Docker icon in the taskbar and selecting the appropriate option. If you don't see that option, then you're probably running the stable branch. Download and install the beta branch to enable Docker support for Windows Containers. The instructions make this clear as well, but I have to admit to missing it the first time around in my fumbling. Once you've made the switch between Linux and Windows containers at least once, the process of changing back and forth seemed to be quick and painless on my system. I didn't have a whole lot of containers of either type, just a couple so that may not be representative of others' experiences.
- Getting started is pretty easy using an image from the Docker Hub registry . Find one that suits your basic needs (e.g., SQL database, IIS, etc) and then customize it using a DOCKERFILE or by committing changes to a container as your custom image.
- Don't get spooked by the 9.6GB image size for windows server core! Although it does seem large, remember that Docker images work on the concept of layers and deltas. This tool provides a visualization of a docker image, showing how every change is committed as a separate layer, or delta. Any image you create FROM the base microsoft/windowsserver-core will only consist of the differences between your image and the base.
- Even though the analogy of a Container to Virtual Machine isn't *quite* accurate, it's close enough for many purposes. Thinking about volumes and managing interactions between host and containers are two places where the analogy is useful. Container instances, file systems, and how docker build works are three that do not.
Finally, knowing Powershell or other CLI scripting framework will make using containers MUCH more smooth and productive. In addition to making you feel Just like a Real Programmer In The Movies, the concepts and scripts you develop from that are likely to useful in other places.
Please leave me a note in the comments if you have questions, comments, or feedback - hope this was helpful and happy Docker-ing!