Docker for Windows Beta announced
I'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.
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:
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.
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.
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.
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.
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?
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.
(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)
** (yes, redis is on windows - I use it all the time)
Look at the graphics on this page and you immediately will see what's the advantage of this solution.
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.
Has anyone got a download link to the new beta?
No go :(
Comments are closed.