Scott Hanselman

Docker for Windows Beta announced

March 26, '16 Comments [25] Posted in VS2015
Sponsored By

Docker Desktop AppI'm continuing to learn about Docker and how it works in a developer's workflow (and Devops, and Production, etc as you move downstream). This week Docker released a beta of their new Docker for Mac and Docker for Windows. They've included OS native apps that run in the background (the "tray") that make Docker easier to use and set up. Previously I needed to disable Hyper-V and use VirtualBox, but this new Docker app automates Hyper-V automatically which more easily fits into my workflow, especially if I'm using other Hyper-V features, like the free Visual Studio Android Emulator.

I signed up at http://beta.docker.com. Once installed, when you run the Docker app with Hyper-V enabled Docker automatically creates the Linux "mobylinux" VM you need in Hyper-V, sets it up and starts it up.

"Moby" the Docker VM running in Hyper-V

After Docker for Windows (Beta) is installed, you just run PowerShell or CMD and type "docker" and it's already set up with the right PATH and Environment Variables and just works. It gets setup on your local machine as http://docker but the networking goes through Hyper -V, as it should.

The best part is that Docker for Windows supports "volume mounting" which means the container can see your code on your local device (they have a "wormhole" between the container and the host) which means you can do a "edit and refresh" type scenarios for development. In fact, Docker Tools for Visual Studio uses this feature - there's more details on this "Edit and Refresh "support in Visual Studio here.

The Docker Tools for Visual Studio can be downloaded at http://aka.ms/dockertoolsforvs. It adds a lot of nice integration like this:

Docker in VS

This makes the combination of Docker for Windows + Docker Tools for Visual Studio pretty sweet. As far as the VS Tools for Docker go, support for Windows is coming soon, but for now, here's what Version 0.10 of these tools support with a Linux container:

  • Docker assets for Debug and Release configurations are added to the project
  • A PowerShell script added to the project to coordinate the build and compose of containers, enabling you to extend them while keeping the Visual Studio designer experiences
  • F5 in Debug config, launches the PowerShell script to build and run your docker-compose.debug.yml file, with Volume Mapping configured
  • F5 in Release config launches the PowerShell script to build and run your docker-compose.release.yml file, with an image you can verify and push to your docker registry for deployment to other environment

You can read more about how Docker on Windows works at Steve Lasker's Blog and also watch his video about Visual Studio's support for Docker in his video on Ch9 and again, sign up for Docker Beta at http://beta.docker.com.


Sponsor: Thanks to Seq for sponsoring the feed this week! Need to make sense of complex or distributed apps? Structured logging helps your team cut through that complexity and resolve issues faster. Learn more about structured logging with Serilog and Seq at https://getseq.net.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Saturday, 26 March 2016 20:40:55 UTC
"Docker for Mac and Docker" - is that a typo?
Will
Saturday, 26 March 2016 21:15:07 UTC
Great ! What about integration of Hyper-V containers / Nano ? From Windows 10 dev machine into a Nano machine with debug experience...
Gaetan
Saturday, 26 March 2016 22:25:08 UTC
It supported hyper-v for a while. Perhaps the installation required minor command lining.
Sunday, 27 March 2016 03:03:09 UTC
Do you the spike spanish
Sunday, 27 March 2016 03:03:13 UTC
Do you the spike spanish
Sunday, 27 March 2016 03:41:30 UTC
I would be great if they could release Windows nano and the IIS module for developers to create windows docker images/containers. Without a server 2016 licence. Perhaps under VS or Windows 10 licensing?
Ideally... I think Microsoft should open source nano and make it freely available.
Otherwise your going to see a large market arise based on .net core running on alpine linux based docker containers.

I have reservations about enabling hyper-v on my home pc. It drops frame rates by 10%ish on computer games that have a high frequency of draw calls. I'm not sure there is any solution to that. Maybe if games gained in other ways, perhaps somehow from the gpu being enabled for virtual memory (which hyper-v enables)?
I used virtual box for when I need vm's.
Michael Simmons
Sunday, 27 March 2016 14:23:27 UTC
Did you have to wait long for to get access to the beta? I signed up almost immediately - but nothing yet.
Kieren Johnstone
Sunday, 27 March 2016 15:54:12 UTC
Can't wait 'til this gets sorted out with Windows containers, 'cause it feels a bit disjointed at the moment. I've been using them on Win Server 2016 TP4 and I'd like to move forward.
Scott Rudy
Monday, 28 March 2016 12:03:54 UTC
I have had several show stoppers during my install.

First of all I have 64 bit Virtualization On, Win 10 Ent. Build 1511

When I installed the Docker Toolbox 1.10.3 it uninstalled my existing Git for Windows and installed a different one on C:\Users\<username>\AppData\Local\Programs\Git

I also had a previous version of Virtual Box which it uninstalled and installed version 5.0.16

When I tried to run C:\Program Files\Docker Toolbox\start.sh, the script started looking for bash.exe which was installed on my C:\Users\<username>\AppData\Local\Programs\Git\bin

So I edited my system variable paths and added this bin path

I also made the default for .sh files to be the bash.exe on the Git path

When I ran start.sh again, I got the following message:

Hyper-V is installed. VirtualBox wont boot a 64 bit VM when Hyper-V is activated.

It then suggested that I add --virtualbox-no-vtx-check to bypass the issue.

I edited start.sh and changed it to: #!/bin/bash --virtualbox-no-vtx-check

I still get the same error.

BTW Docker from PowerShell and CMD runs fine in command line.

Dusty


Dusty
Monday, 28 March 2016 14:11:05 UTC
Guess now ppl will add a volume in the asp.net container to share the app code between guest and host?
Luiz
Monday, 28 March 2016 16:52:04 UTC
Can i run my win32 app inside a container with this new beta version of Docker?
Monday, 28 March 2016 20:09:27 UTC
Thanks for the article, very informative.
Tuesday, 29 March 2016 00:48:25 UTC
Hi Scott,

could you please add some extra commentary in the opening paragraph about WHY we want to care/use docker for anything?

I keep reading about 'Docker this, Docker that' but no one has given us some real world examples of WHY I would want to do this?

eg.

I make websites with .NET on windows. But maybe we want to use REDIS on linux**? Have a linux docker and someone how i can access this linux-only-software from my .NET code.

etc..

(I have no idea what are some scenarios -> so the above is just a wild guess. Would love to see plenty of other scenario's listed, too)

-PK-

** (yes, redis is on windows - I use it all the time)
Pure Krome
Tuesday, 29 March 2016 08:23:07 UTC
hi everybody, can someone access to the beta version ? i can't log to https://beta.docker.com/
Sofiane
Tuesday, 29 March 2016 10:51:40 UTC
@Pure Krome
Look at the graphics on this page and you immediately will see what's the advantage of this solution.
Marco W.
Tuesday, 29 March 2016 12:22:53 UTC
Michael Simmons: Just 10%? You're lucky.

The difference for me was to get 60Hz in most games with Hyper-V I had to run in 1080p with lowest settings, while without Hyper-V I could run on mid-high at 2160p, given a Skylake and a GTX970.

Kind of hard to profile too, as it seems to be a rather constant penalty. I could not observe any primary culprits in profiling my own code.
Lars Viklund
Wednesday, 30 March 2016 06:18:42 UTC
@Kieren Johnstone: I signed up yesterday, and got an e-mail with subject "Welcome to Docker's private Beta". It said "We've added you to our waiting list and will be in touch shortly." About an hour later, I got a new e-mail with subject "Welcome aboard", but that linked to the old, VirtualBox, beta.

Has anyone got a download link to the new beta?
Henrik Olsson
Wednesday, 30 March 2016 16:57:34 UTC
The "Welcome aboard" email links to the "Docker for Windows" WITH VirtualBox.
No go :(
Manuel Alves
Monday, 04 April 2016 06:43:40 UTC
Can i run my win32 app inside a container with this new beta version of Docker? Thanks fort to share article.
Wednesday, 06 April 2016 15:22:46 UTC
Nice Post,
Thanks for sharing........
Tuesday, 12 April 2016 11:41:06 UTC
Great Post... nice
Wednesday, 27 April 2016 17:54:57 UTC
I still don't know what I can expect from docker for Windows. Is it a more convenient integration of Linux, so that users can run Linux images or Windows or will it be possible to execute native Windows application (without an UI) in containers? Can you give a some more details? Thanks for your post so far!
Thorsten
Saturday, 14 May 2016 08:14:08 UTC
I have reservations about usenabling hyper-v on my home pc. It drops frame rates by 10%ish on computer games that have a high frequency of draw calls. I'm not sure there is any solution to that. Maybe if games gained in other ways, perhaps somehow from the gpu being enabled for virtual memory (which hyper-v enables)?


jack
Wednesday, 22 June 2016 13:02:59 UTC
great post and thanks for sharing these type of informative articles
Wednesday, 22 June 2016 13:03:21 UTC
great post and thanks for sharing these type of informative articles
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.