The First DockerCon with Windows Containers

DockerCon 2017 is only a few weeks away, and the schedule is available now on the DockerCon Agenda Builder. This will be the first DockerCon since Server 2016 was released, bringing native support for containers to Windows. There will be plenty of content for Windows developers and admins &; here are some of the standouts.

Windows and .NET Sessions
On the main stages, there will be hours of content dedicated to Windows and .NET.
Docker for .NET Developers
Michele Bustamante, CIO of Solliance, looks at what Docker can do for .NET applications. Michele will start with a full .NET Framework application and show how to run it in a Windows container. Then Michele will move on to .NET Core and show how the new cross-platform framework can build apps which run in Windows or Linux containers, making for true portability throughout the data center and the cloud.
Escape From Your VMs with Image2Docker
I’ll be presenting with Docker Captain Jeff Nickoloff, covering the Image2Docker tool, which automates app migration from virtual machines to Docker images. There’s Image2Docker for Linux, and Image2Docker for Windows. We’ll demonstrate both, porting an app with a Linux front end and a Windows back end from VMs to Docker images. Then we’ll run the whole application in containers on one Docker swarm, a cluster with Linux and Windows nodes.
Beyond “” &8211; the Path to WIndows and Linux Parity in Docker
Taylor Brown and Dinesh Govindasamy from Microsoft will talk about how Docker support was built for Windows Server 2016. Their session will cover the technical implementation in Windows, the current gaps between Docker on Linux and Docker on Windows, and the plans to bring parity to the Windows experience. This session is from the team at Microsoft who actually delivered the kernel changes to support Windows containers running in Docker.
Creating Effective Images
Abby Fuller from AWS will talk about making efficient Docker images. Optimized Docker images build quickly, are as small as possible, and include only the components needed to run the app. Abby will talk about image layers, caching, Dockerfile best practices, and Docker Security Scanning, in a cross-platform session which looks at Linux and Windows Docker images.
Other Sessions
Check out the topics in the Agenda Builder for sessions from speakers who have been using Docker in production, and seen a huge change in their ability to deliver quality software, quickly. These are Linux case studies, but the principles equally apply to Windows projects.

In Architecture, Cornell University use Docker Datacenter to run monolithic legacy apps alongside greenfield microservice apps &8211; with consistent monitoring and management
In Production, PayPal are on a  journey migrating all their legacy apps to Docker, and using Docker as their production application platform
In Enterprise, MetLife delivered a new microservice application running on Docker in 5 months, embracing new approaches to design, test and engineering.

 
Workshops
Workshops are instructor-led sessions, which run on the Monday of DockerCon. There are a lot of great sessions to choose from, but for Windows folks these two are particularly well-suited:
Learn Docker. Get to grips with the basics of Docker, learning about the basics of images and containers, and moving on to networking, orchestration, security and volumes. This session will focus on Linux containers, which you can run with Docker for Windows, but the principles you’ll learn apply equally to Windows containers.
Modernizing Monolithic ASP.NET Applications with Docker. A workshop focused on Windows and ASP.NET. You’ll learn how to run a monolithic ASP.NET app in Docker without changing code, and then see how to break features out from the main app and run them in separate Docker containers, giving you a path to modernize your app without rebuilding it.
Hands-On Labs
As well as the main sessions and guided workshops, there will be hands-on labs for you to experience Docker on Windows. We’ll provision a Docker environment for you in Azure, and provide self-paced learning guides. The hands-on labs will cover:
Docker on Windows 101. Get started with Docker on Windows, and learn why the world is moving to containers. You’ll start by exploring the Windows Docker images from Microsoft, then you’ll run some simple applications, and learn how to scale apps across multiple servers running Docker in swarm mode
Modernize .NET Apps &8211; for Ops. An admin guide to migrating .NET apps to Docker images, showing how the build, ship, run workflow makes application maintenance fast and risk-free. You’ll start by migrating a sample app to  Docker, and then learn how to upgrade the application, patch the Windows version the app uses, and patch the Windows version on the host &8211; all with zero downtime.
Modernize .NET Apps &8211; for Devs. A developer guide to app migration, showing how the Docker platform lets you update a monolithic application without doing a full rebuild. You’ll start with a sample app and see how to break components out into separate units, plumbing the units together with the Docker platform and the tried-and-trusted applications available on Docker Hub.
Book Your Ticket Now!
DockerCon is always a sell-out conference, so book your DockerCon tickets while there are still spaces left. If you follow the Docker Captains on Twitter, you may find they have discount codes to share.

Check out all the Docker content for Windows at To Tweet

The post The First DockerCon with Windows Containers appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

Docker for Windows Server and Image2Docker

In December we had a live webinar focused on Server Docker containers. We covered a lot of ground and we had some great feedback &; thanks to all the folks who joined us. This is a brief recap of the session, which also gives answers to the questions we didn’t get round to.
Webinar Recording
You can view the webinar on YouTube:

The recording clocks in at just under an hour. Here’s what we covered:

00:00 Introduction
02:00 Docker on Windows Server 2016
05:30 Windows Server 2016 technical details
10:30 Hyper-V and Windows Server Containers
13:00 Docker for Windows Demo &8211; ASP.NET Core app with SQL Server
25:30 Additional Partnerships between Docker, Inc. and Microsoft
27:30 Introduction to Image2Docker
30:00 Demo &8211; Extracting ASP.NET Apps from a VM using Image2Docker
52:00 Next steps and resources for learning Docker on Windows

Q&A
Can these [Windows] containers be hosted on a Linux host?
No. Docker containers use the underlying operating system kernel to run processes, so you can’t mix and match kernels. You can only run Windows Docker images on Windows, and Linux Docker images on Linux.
However, with an upcoming release to the Windows network stack, you will be able to run a hybrid Docker Swarm &8211; a single cluster containing a mixture of Linux and Windows hosts. Then you can run distributed apps with Linux containers and Windows containers communicating in the same Docker Swarm, using Docker’s networking layer.
Is this only for ASP.NET Core apps?
No. You can package pretty much any Windows application into a Docker image, provided it can be installed and run without a UI.
The first demo in the Webinar showed an ASP.NET Core app running in Docker. The advantage with .NET Core is that it’s cross-platform so the same app can run in Linux or Windows containers, and on Windows you can use the lightweight Nano Server option.
In the second demo we showed ASP.NET WebForms and ASP.NET MVC apps running in Docker. Full .NET Framework apps need to use the WIndows Server Core base image, but that gives you access to the whole feature set of Windows Server 2016.
If you have existing ASP.NET applications running in VMs, you can use the Image2Docker tool to port them across to Docker images. Image2Docker works on any Windows Server VM, from Server 2003 to Server 2016.

How does licensing work?
For production, licensing is at the host level, i.e. each machine or VM which is running Docker. Your Windows licence on the host allows you to run any number of Windows Docker containers on that host. With Windows Server 2016 you get the commercially supported version of Docker included in the licence costs, with support from Microsoft and Docker, Inc.
For development, Docker for Windows runs on Windows 10 and is free, open-source software. Docker for Windows can also run a Linux VM on your machine, so you can use both Linux and Windows containers in development. Like the server version, your Windows 10 licence allows you to run any number of Windows Docker containers.
Windows admins will want a unified platform for managing images and containers. That’s Docker Datacenter which is separately licensed, and will be available for Windows soon.
What about Windows updates for the containers?
Docker containers have a different life cycle from full VMs or bare-metal servers. You wouldn’t deploy an app update or a Windows update inside a running container &8211; instead you update the image that packages your app, then just kill the container and start a new container from the updated image.
Microsoft are supporting that workflow with the two Windows base images on Docker Hub &8211; for Windows Server Core and Nano Server. They are following a monthly release cycle, and each release adds an incremental update with new patches and security updates.
For your own applications, you would aim to have the same deployment schedule &8211; after a new release of the Windows base image, you would rebuild your application images and deploy new containers. All this can be automated, so it’s much faster and more reliable than manual patching. Docker Captain Stefan Scherer has a great blog post on keeping your Windows containers up to date.
Additional Resources

Get everything Docker and Microsoft here
Windows and Docker case-study: Tyco’s life-safety applications 
Self-paced labs for Windows Containers from Docker
Packaging ASP.NET 4.5 Applications in Docker
Subscribe to Docker’s weekly newsletter

Our Windows containers webinar is on YouTube for you to To Tweet

The post Docker for Windows Server and Image2Docker appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

Build and run your first Docker Windows Server container

Today, Microsoft announced the general availability of Server 2016, and with it, Docker engine running containers natively on Windows. This blog post describes how to get setup to run Docker Windows Containers on Windows 10 or using a Windows Server 2016 VM. Check out the companion blog posts on the technical improvements that have made Docker containers on Windows possible and the post announcing the Docker Inc. and Microsoft partnership.
Before getting started, It’s important to understand that Windows Containers run Windows executables compiled for the Windows Server kernel and userland (either windowsservercore or nanoserver). To build and run Windows containers, you have to have a Windows system with container support.
Windows 10 with Anniversary Update
For developers, Windows 10 is a great place to run Docker Windows containers and containerization support was added to the the Windows 10 kernel with the Anniversary Update (note that container images can only be based on Windows Server Core and Nanoserver, not Windows 10). All that’s missing is the Windows-native Docker Engine and some image base layers.
The simplest way to get a Windows Docker Engine is by installing the Docker for Windows public beta (direct download link). Docker for Windows used to only setup a Linux-based Docker development environment (slightly confusing, we know), but the public beta version now sets up both Linux and Windows Docker development environments, and we’re working on improving Windows container support and Linux/Windows container interoperability.
With the public beta installed, the Docker for Windows tray icon has an option to switch between Linux and Windows container development. For details on this new feature, check out Stefan Scherers blog post.
Switch to Windows containers and skip the next section.

Windows Server 2016
Windows Server 2016 is the where Docker Windows containers should be deployed for production. For developers planning to do lots of Docker Windows container development, it may be worth setting up a Windows Server 2016 dev system (in a VM, for example), at least until Windows 10 and Docker for Windows support for Windows containers matures.
For Microsoft Ignite 2016 conference attendees, USB flash drives with Windows Server 2016 preloaded are available at the expo. Not at ignite? Download a free evaluation version and install it on bare metal or in a VM running on Hyper-V, VirtualBox or similar. Running a VM with Windows Server 2016 is also a great way to do Docker Windows container development on macOS and older Windows versions.
Once Windows Server 2016 is running, log in and install the Windows-native Docker Engine directly (that is, not using &;Docker for Windows&;). Run the following in an Administrative PowerShell prompt:
# Add the containers feature and restart
Install-WindowsFeature containers
Restart-Computer -Force

# Download, install and configure Docker Engine
Invoke-WebRequest “https://download.docker.com/components/engine/windows-server/cs-1.12/docker.zip” -OutFile “$env:TEMPdocker.zip” -UseBasicParsing

Expand-Archive -Path “$env:TEMPdocker.zip” -DestinationPath $env:ProgramFiles

# For quick use, does not require shell to be restarted.
$env:path += “;c:program filesdocker”

# For persistent use, will apply even after a reboot.
[Environment]::SetEnvironmentVariable(“Path”, $env:Path + “;C:Program FilesDocker”, [EnvironmentVariableTarget]::Machine)

# You have to start a new PowerShell prompt at this point
dockerd –register-service
Start-Service docker
Docker Engine is now running as a Windows service, listening on the default Docker named pipe. For development VMs running (for example) in a Hyper-V VM on Windows 10, it might be advantageous to make the Docker Engine running in the Windows Server 2016 VM available to the Windows 10 host:
# Open firewall port 2375
netsh advfirewall firewall add rule name=”docker engine” dir=in action=allow protocol=TCP localport=2375

# Configure Docker daemon to listen on both pipe and TCP (replaces docker –register-service invocation above)
dockerd.exe -H npipe:////./pipe/docker_engine -H 0.0.0.0:2375 –register-service
The Windows Server 2016 Docker engine can now be used from the VM host  by setting DOCKER_HOST:
$env:DOCKER_HOST = “<ip-address-of-vm>:2375″
See the Microsoft documentation for more comprehensive instructions.
Running Windows containers
First, make sure the Docker installation is working:
> docker version
Client:
Version:      1.12.1
API version:  1.24
Go version:   go1.6.3
Git commit:   23cf638
Built:        Thu Aug 18 17:32:24 2016
OS/Arch:      windows/amd64
Experimental: true

Server:
Version:      1.12.2-cs2-ws-beta-rc1
API version:  1.25
Go version:   go1.7.1
Git commit:   62d9ff9
Built:        Fri Sep 23 20:50:29 2016
OS/Arch:      windows/amd64
Next, pull a base image that’s compatible with the evaluation build, re-tag it and to a test-run:
docker pull microsoft/windowsservercore:10.0.14393.206
docker tag microsoft/windowsservercore:10.0.14393.206 microsoft/windowsservercore
docker run microsoft/windowsservercore hostname
69c7de26ea48
Building and pushing Windows container images
Pushing images to Docker Cloud requires a free Docker ID. Storing images on Docker Cloud is a great way to save build artifacts for later user, to share base images with co-workers or to create build-pipelines that move apps from development to production with Docker.
Docker images are typically built with docker build from a Dockerfile recipe, but for this example, we’re going to just create an image on the fly in PowerShell.
“FROM microsoft/windowsservercore `n CMD echo Hello World!” | docker build -t <docker-id>/windows-test-image –
Test the image:
docker run <docker-id>/windows-test-image
Hello World!
Login with docker login and then push the image:
docker push <docker-id>/windows-test-image
Images stored on Docker Cloud available in the web interface and public images can be pulled by other Docker users.
Using docker-compose on Windows
Docker Compose is a great way develop complex multi-container consisting of databases, queues and web frontends. Compose support for Windows is still a little patchy and only works on Windows Server 2016 at the time of writing (i.e. not on Windows 10).
To try out Compose on Windows, you can clone a variant of the ASP.NET Core MVC MusicStore app, backed by a SQL Server Express 2016 database. If running this sample on Windows Server 2016 directly, first grab a Compose executable and make it is in your path. A correctly tagged microsoft/windowsservercore image is required before starting. Also note that building the SQL Server image will take a while.
git clone https://github.com/friism/Musicstore

cd Musicstore
docker build -t sqlserver:2016 -f .dockermssql-server-2016-expressDockerfile .dockermssql-server-2016-express.

docker-compose -f .srcMusicStoredocker-compose.yml up

Start a browser and open http://<ip-of-vm-running-docker>:5000/ to see the running app.
Summary
This post described how to get setup to build and run native Docker Windows containers on both Windows 10 and using the recently published Windows Server 2016 evaluation release. To see more example Windows Dockerfiles, check out the Golang, MongoDB and Python Docker Library images.
Please share any Windows Dockerfiles or Docker Compose examples your build with @docker on Twitter using the tag windows. And don’t hesitate to reach on the Docker Forums if you have questions.
More Resources:

Sign up to be notified of GA and the Docker Datacenter for Windows Beta
Register for a webinar: Docker for Windows Server
Learn more about the Docker and Microsoft partnership

The post Build and run your first Docker Windows Server container appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

Docker SF Meetup #47; Docker 1.12, Docker for Mac and Tugbot

On Wednesday members of the  SF  community joined us at Docker HQ for our 47th Docker meetup in San Francisco! It was a great evening with talks and demos from Docker’s own Ben Bonnefoy, Nishant Totla, as well as Neil Gehani from HPE.

Ben Bonnefoy is currently working on Docker for and Docker for , which were released in beta in March. At the meetup, he gave an insight into the new features as well as the open source components used under the hood namely:

HyperKit ™: A lightweight virtualization toolkit on OSX
DataKit ™: A modern pipeline framework for distributed components
VPNKit ™: A library toolkit for embedding virtual networking

 
.@FrenchBen talking at the SF @docker meetup on Insight into Docker for Mac and Docker for Windows! pic.twitter.com/oQ0pkD6P8k— Docker (@docker) August 4, 2016
In case you missed it, Docker 1.12 was made generally available on July 28! Nishant Totla, who works on the core open source team and is currently working on Docker Swarm, spoke after Ben and gave attendees all the latest updates on Docker 1.12. Take a look at his slides on the new features below.

 
.@nishanttotla talks updates on Docker 1.12 at SF @Docker meetup! pic.twitter.com/f9Lx7QeXDI— Docker (@docker) August 4, 2016
The third talk and final talk of the evening was by a guest speaker, Neil Gehani, from HPE. Neil’s talk was on ‘Tugbot’, an in-cluster testing framework. To find out more, view Neil’s slides below.

 
.@gehaniNeil of @HPE at @docker meetup introduces "Tugbot" in-cluster container testing! pic.twitter.com/REstXvopgR— Docker (@docker) August 4, 2016
For those of you who would like to watch the talks and see the demos in full, we also recorded the meetup so feel free to watch and share!

 
Thank you speakers @FrenchBen @nishanttotla @GehaniNeil @HPE & the attendees who joined our @docker meetup 2night! pic.twitter.com/BjW0WVXItw— Docker (@docker) August 4, 2016

New blog post w/ video & slides from meetup w/ @frenchben @Nishanttotla @GehaniNeilClick To Tweet

Quelle: https://blog.docker.com/feed/