Announcing Windows Server 2016 Containers Preview

At DockerCon this year, Mark Russinovich, CTO of Microsoft Azure, demonstrated the first ever application built using code running in both a Windows Server Container and a Linux container connected together. This demo helped demonstrate Microsoft's vision that in partnership with Docker, we can help bring the Windows and Linux ecosystems together by enabling developers to build container-based distributed applications using the tools and platforms of their choice.

Today we are excited to release the first preview of Windows Server Containers as part of our Windows Server 2016 Technical Preview 3 release. We’re also announcing great updates from our close collaboration with Docker, including enabling support for the Windows platform in the Docker Engine and a preview of the Docker Engine for Windows. Our Visual Studio Tools for Docker, which we previewed earlier this year, have also been updated to support Windows Server Containers, providing you a seamless end-to-end experience straight from Visual Studio to develop and deploy code to both Windows Server and Linux containers. Last but not least, we’ve made it easy to get started with Windows Server Containers in Azure via a dedicated virtual machine image.

Windows Server Containers

Windows Server Containers create a highly agile Windows Server environment, enabling you to accelerate the DevOps process to efficiently build and deploy modern applications. With today’s preview release, millions of Windows developers will be able to experience the benefits of containers for the first time using the languages of their choice – whether .NET, ASP.NET, PowerShell or Python, Ruby on Rails, Java and many others.

Today’s announcement delivers on the promise we made in partnership with Docker, the fast-growing open platform for distributed applications, to offer container and DevOps benefits to Linux and Windows Server users alike. Windows Server Containers are now part of the Docker open source project, and Microsoft is a founding member of the Open Container Initiative. Windows Server Containers can be deployed and managed either using the Docker client or PowerShell.

Getting Started using Visual Studio

The preview of our Visual Studio Tools for Docker, which enables developers to build and publish ASP.NET 5 Web Apps or console applications directly to a Docker container, has been updated to include support for today’s preview of Windows Server Containers. The extension automates creating and configuring your container host in Azure, building a container image which includes your application, and publishing it directly to your container host. You can download and install this extension, and read more about it, at the Visual Studio Gallery here: http://aka.ms/vslovesdocker.

Once installed, developers can right-click on their projects within Visual Studio and select “Publish”:

image

Doing so will display a Publish dialog which will now include the ability to deploy to a Docker Container (on either a Windows Server or Linux machine):

image

You can choose to deploy to any existing Docker host you already have running:

image

Or use the dialog to create a new Virtual Machine running either Window Server or Linux with containers enabled.  The below screen-shot shows how easy it is to create a new VM hosted on Azure that runs today’s Windows Server 2016 TP3 preview that supports Containers – you can do all of this (and deploy your apps to it) easily without ever having to leave the Visual Studio IDE:

image

Getting Started Using Azure

In June of last year, at the first DockerCon, we enabled a streamlined Azure experience for creating and managing Docker hosts in the cloud. Up until now these hosts have only run on Linux. With the new preview of Windows Server 2016 supporting Windows Server Containers, we have enabled a parallel experience for Windows users.

Directly from the Azure Marketplace, users can now deploy a Windows Server 2016 virtual machine pre-configured with the container feature enabled and Docker Engine installed. Our quick start guide has all of the details including screen shots and a walkthrough video so take a look here https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/azure_setup.

image

Once your container host is up and running, the quick start guide includes step by step guides for creating and managing containers using both Docker and PowerShell.

Getting Started Locally Using Hyper-V

Creating a virtual machine on your local machine using Hyper-V to act as your container host is now really easy. We’ve published some PowerShell scripts to GitHub that automate nearly the whole process so that you can get started experimenting with Windows Server Containers as quickly as possible. The quick start guide has all of the details at https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/container_setup.

Once your container host is up and running the quick start guide includes step by step guides for creating and managing containers using both Docker and PowerShell.

image

Additional Information and Resources

A great list of resources including links to past presentations on containers, blogs and samples can be found in the community section of our documentation. We have also setup a dedicated Windows containers forum where you can provide feedback, ask questions and report bugs. If you want to learn more about the technology behind containers I would highly recommend reading Mark Russinovich’s blog on “Containers: Docker, Windows and Trends” that was published earlier this week.

Summary

At the //Build conference earlier this year we talked about our plan to make containers a fundamental part of our application platform, and today’s releases are a set of significant steps in making this a reality.’ The decision we made to embrace Docker and the Docker ecosystem to enable this in both Azure and Windows Server has generated a lot of positive feedback and we are just getting started.

While there is still more work to be done, now users in the Window Server ecosystem can begin experiencing the world of containers. I highly recommend you download the Visual Studio Tools for Docker, create a Windows Container host in Azure or locally, and try out our PowerShell and Docker support. Most importantly, we look forward to hearing feedback on your experience.

Hope this helps,

Scott

11 Comments

  • The face of VM and deployments are changing as I write this response. Amazing...how do you keep up?

  • Yet another wonderful feature i can't use because of ridiculous lack of support for vb.net in asp.net 5. I'll be waiting until almost 2017 before i can use this.

    The asp.net team don't give a rats about the vb dev community. They needed to begged and pleaded to just support vb in the first place.

  • And I for once agree with the ASP.NET team to finally drop VB.NET. It needs to be eradicated.

  • I've installed the Plugin but the "docker containers" target doesn't show up for publish? (I've installed it, repaired it restarted it etc) Windows 8.1 Visual Studio 2015 RTM/

    P.s. If you watch Aaron if you follow along at https://live.asp.net/ you'll see that VB.Net support is coming it's just not priority atm

  • I have the same problem with David, after installing the plugin and restart, I can't see the option for docker containers in publish wizard. Win 7/VS 2015 RTM English

  • Yes, VB.Net is nearly duplicative uselessness. If I were Microsoft, I'd sunset the technology as well.

  • Hey folks. I've reached out to Tony to help with the problems you're having. If your still having issues, please feel free to contact me @ http://blogs.msdn.com/b/stevelasker/contact.aspx
    One thing I was wondering was whether you were attempting to publish a .NET 4.6 app. Because Windows Server Core and Linux only support the Core CLR, the Publish to Docker option will only show up for ASP.NET 5 apps.

    If you're trying to publish to both Linux and Windows with the same project, this blog post will help out: http://blogs.msdn.com/b/stevelasker/archive/2015/08/24/deploying-to-linux-amp-windows-docker-containers.aspx
    Steve

  • From my point of view it's the impossible to read and ultra-quirky C# that should be retired. Who knows how many person years are wasted per project just sorting out those damn brackets.

  • 0 days are wasted sorting out brackets. The fact you say this means you need to learn to pay your code out.

    You'll also moan about semicolons but you will get used to it.

    Good article btw. Is good to see ms keeping up with current trends, even when it out is too increase azure profits.

  • Thanks for this post. Very cool stuff! :)

    I have created an empty ASP.NET5 project in VS2015 and I am trying to publish it to a Docker host running Windows Server 2016 in Azure. VS can connect to the docker host, succesfully sends the build context to Docker and starts building the container. However, progress stalls and after a couple of minutes and the Docker daemon log shows that VS has been disconnected.

    Relevant log snippets:

    The VS Azure App Service Activity log:

    Executing command [docker --tlsverify --tlscacert=\cert\ca.pem --tlscert=\cert\cert.pem --tlskey=\cert\key.pem -H xxxxx.northeurope.cloudapp.azure.com:2376 ps -a | select-string -pattern "80_80" | foreach { Write-Output $_.ToString().split()[0] }]
    VERBOSE: Building Docker image: contentfulgallery
    Executing command [docker --tlsverify --tlscacert=\cert\ca.pem --tlscert=\cert\cert.pem --tlskey=\cert\key.pem -H xxxxx.northeurope.cloudapp.azure.com:2376 build -t contentfulgallery -f "C:\Users\lschrijvers\AppData\Local\Temp\PublishTemp\approot\src\EmptyProject\Properties\Dockerfile" "C:\Users\lschrijvers\AppData\Local\Temp\PublishTemp"]
    VERBOSE: Sending build context to Docker daemon 557.1 kB
    [...]
    VERBOSE: Sending build context to Docker daemon 130.2 MB
    VERBOSE:
    VERBOSE: Step 0 : FROM windowsservercore
    VERBOSE: ---> 0d53944cb84d
    VERBOSE: Step 1 : ADD . /app
    [Progress stops here, and after a while VS freezes]

    Docker daemon log:

    time="2015-09-01T08:35:11.302493600Z" level=info msg="GET /v1.20/version"
    time="2015-09-01T08:35:17.472113500Z" level=info msg="GET /v1.20/info"
    time="2015-09-01T08:35:17.537133600Z" level=error msg="Error opening /proc/3272/fd: open /proc/3272/fd: The system cannot find the path specified."
    time="2015-09-01T08:35:46.557115000Z" level=info msg="GET /v1.20/containers/json?all=1"
    time="2015-09-01T08:35:51.525047500Z" level=info msg="POST /v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=approot%2Fsrc%2FEmptyProject%2FDockerfile&memory=0&memswap=0&rm=1&t=emptyproject&ulimits=null"
    time="2015-09-01T08:42:09.049433300Z" level=info msg="Client disconnected, cancelling job: build"

    The error related to /proc/3272/fd is strange, because that is obviously no valid Windows path.

    Does someone have any pointers how to proceed? Thanks in advance!

    Regards,
    Leon

  • Great to see the Windows Server 2016 Preview, and particularly your support for Docker Files. Another step forward in bringing Docker support to the .NET community is coming from http:www.windocks.com who announced Docker Engine for Windows Server 2012, with an October Beta. The site includes some interesting observations on Server 2012 Containers, and the ins/outs of running SQL Server within a Docker compatible container! They're also comitted to ensuring that this provides a smooth upgrade to Server 2016 as well. check it out at <a href="www.windocks.com"> windocks.com </a>

Comments have been disabled for this content.