Elton Stoneman

Author Archives: Elton Stoneman

Getting Started with Istio Using Docker Desktop

This is a guest post from Docker Captain Elton Stoneman, a Docker alumni who is now a freelance consultant and trainer, helping organizations at all stages of their container journey. Elton is the author of the book Learn Docker in a Month of Lunches, and numerous Pluralsight video training courses – including Managing Apps on Kubernetes with Istio and Monitoring Containerized Application Health with Docker.

Istio is a service mesh – a software component that runs in containers alongside your application containers and takes control of the network traffic between components. It’s a powerful architecture that lets you manage the communication between components independently of the components themselves. That’s useful because it simplifies the code and configuration in your app, removing all network-level infrastructure concerns like routing, load-balancing, authorization and monitoring – which all become centrally managed in Istio.

There’s a lot of good material for digging into Istio. My fellow Docker Captain Lee Calcote is the co-author of Istio: Up and Running, and I’ve just published my own Pluralsight course Managing Apps on Kubernetes with Istio. But it can be a difficult technology to get started with because you really need a solid background in Kubernetes Continue reading

How to Get Your Apps off Windows 2003 and Into the Cloud with Docker Enterprise

Docker Windows Containers with Docker Enterprise

 

A huge number of companies are still running apps on Windows Server 2003 and 2008 in the data center. They want to move to a modern, secure, supported platform which gives them the flexibility to run in the data center today – and in any cloud tomorrow. Docker gives them that flexibility, and you can move your apps to Docker without changing any code.

That was the focus of our recent webinar, where we showed several apps currently running on Windows Server 2003, and packaged them to run as Docker Windows containers. We showed all the steps to migrate the apps with no code changes, and then we ran them in Docker Enterprise on a Windows Server 2016 VM running in Azure.

You can watch the full video of the webinar here – it comes in at just over 60 minutes:

In the webinar, you see the portability that Docker Enterprise gives you. The applications we move are a mixture of older web technologies – static HTML, classic ASP and ASP.NET WebForms. The apps from the demo and the Dockerfiles are on GitHub here. They could be 15-year old apps and you Continue reading

Webinar Recap: The Docker Platform on Windows – from 101 to Modernizing .NET Apps

 Windows

Our live Docker webinars are always hugely popular. Last month we hosted a session on Docker and Windows containers, covering everything from the basics to how you can use the  Docker platform (Docker Enterprise Edition and Docker Desktop)  to modernize existing .NET apps and move them to the cloud.

The recording is available now – it clocks in at 60 minutes and has lots of demos showing you how to build and run Windows applications in containers with Docker for Windows:

The sample code, Dockerfiles and Docker Compose files for all the demos are here on GitHub.

In fact there were so many demos, I ran out of time for the Q&A part – so here are the unanswered questions we had from viewers:

Q. Are there any best practices or tutorial to architect sql databases in containers? What about data persistence, database references etc? How can we use SSDT with containers?

SQL Server running in a container is just like any remote SQL Server – you can connect with SSDT or Visual Studio or VS Code or any SQL client. There’s a good SQL Server in Docker tutorial on GitHub which walks through the build and deployment process with containers, and Continue reading

Video Series: Modernizing .NET Apps for Developers

MTA for Devs

 Docker Enterprise Edition (EE)  is the container platform for modernizing your existing applications, and running them in the cloud or on-premises. You can take monoliths and run them in containers with no code changes, and that gets you portability, security and efficiency.

Running in Docker is also a great starting point for modernizing the application architecture. You can breaking down the monolith into smaller, independent components which makes it easier to deploy updates, manage scale and introduce new technologies.

This new video series covers app modernization, for .NET developers and architects. It walks through the evolution of a monolithic ASP.NET 3.5 app to a distributed application running across multiple containers, using the Docker platform to plug everything together and adding features with great open-source software from the Docker ecosystem.

This is not a full re-architecture to microservices – for large .NET apps that would be a 12 month project. This series uses a feature-driven approach, taking key features out of the monolith to fix performance issues, add new functionality and support fast application updates.

Part 1 introduces the series, talks about what “modernization” means and then gets started – this is a very demo-heavy video series, where you’ll see lots Continue reading

Yes to databases in containers – Microsoft SQL Server available on Docker Store

Microsoft SQL Server 2017 is now available for the first time on multiple platforms: Windows, Linux and Docker. Your databases can be in containers with no lengthy setup and no prerequisites, and using Docker Enterprise Edition (EE) to modernize your database delivery. The speed and efficiency benefits of Docker and containerizing apps that IT Pros and developers have been enjoying for years are now available to DBAs.

 

Try the Docker SQL Server lab now and see how database containers start in seconds, and how you can package your own schemas as Docker images.

 

If you’ve ever sat through a SQL Server install, you know why this is a big deal: SQL Server takes a while to set up, and running multiple independent SQL Server instances on the same host is not simple. This complicates maintaining dev, test and CI/CD systems where tests and experiments might break the SQL Server instance.

With SQL Server in Docker containers, all that changes. Getting SQL Server is as simple as running `docker image pull`, and you can start as many instances on a host as you want, each of them fresh and clean, and tear them back down when you’re done.

Database engines Continue reading

Video Series: Modernizing .NET Apps for IT Pros

 mta-it-pro.jpg

This is a new 5-part video series in Docker’s Modernize Traditional Apps (MTA) program, aimed at Microsoft IT Pros. The video series shows you how to move a .NET 3.5 app from Windows Server to a Windows Docker container and deploy it to a scalable, highly-available environment in the cloud – without any changes to the app.

Part 1 introduces the series, explaining what is meant by “traditional” apps and the problems they present. Traditional apps are built to run on a server, rather than on a modern application platform. They have common traits, like being complex to manage and difficult to deploy. A portfolio of traditional applications tends to under-utilize its infrastructure, and over-utilize the humans who manage it. Docker Enterprise Edition (EE) fixes that, giving you a consistent way to package, release and manage all your apps, without having to re-write them.

Part 2 shows how easy it is to move traditional apps to Docker EE. I start with an ASP.NET 3.5 WebForms application running on Windows Server 2003, and use Image2Docker to extract the app and package it as a Docker image. Then I run the application in a Docker Windows container on Continue reading

Docker on Windows Webinar Q&A

Docker on Windows

Recently I presented Docker on Windows: from 101 to Modernizing .NET Apps, a live webinar on using Docker with Windows, and running .NET Framework apps in containers. The session was recorded and you can watch it on the Docker YouTube channel:

I start with the basics of Windows Docker containers, showing how to you can run containers from public images, and write Dockerfiles to package your own apps to run in containers.

Then I move onto Dockerizing a traditional ASP.NET WebForms app, showing you how to take existing apps and run them in Docker with no code changes, and then use the Docker platform to modernize the app – breaking features out of the monolithic codebase, running them in separate containers and using Docker to connect them.

I maxed out the session time (just like Mike with his Docker for the Sysadmin webinar), so here are the answers to questions raised in the session.

Q:  We have several servers hosting our frontend, some as middle tier hosting the services and we have some for the database. Shall we have a container for each service?

A: Docker doesn’t mandate any particular design, you can architect your move to Continue reading

Docker at Microsoft Build 2017

Build is Microsoft’s premier developer event, run annually. This year Docker, Inc. and containers were everywhere, starting with a dedicated container pre-day, then with constant traffic to the Docker booth, and many shared container success stories.

Docker for Windows

Container Fest Pre-Day

Build is usually a three-day event, but this year saw the very first pre-day – run jointly by Docker and Microsoft. “Container Fest” was a whole-day event focused on containers and Docker, running on Windows and Linux, on-premises and in Azure.

There were 12 sessions throughout the day, presented by engineers and architects from Microsoft and Docker, Inc. They covered everything from the internals of Docker on Windows Server, through modernizing .NET Framework apps with Docker, to the options for running Docker containers on Azure.

A popular first step for modernizing traditional Windows applications is to use Image2Docker, which we demonstrated at the event. Image2Docker can extract existing applications from Windows machines into Dockerfiles, so you can automate the conversion of your app landscape to Docker. You can see Image2Docker in action from our session at DockerCon:

Over 300 people were at the Container Fest pre-day, and when the sessions had finished, they stayed on to run through the Hands-On Labs Continue reading

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 Windows Server 2016 was released, bringing native support for Docker 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 Continue reading

Docker for Windows Server and Image2Docker

In December we had a live webinar focused on Windows 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 – ASP.NET Core app with SQL Server
  • 25:30 Additional Partnerships between Docker, Inc. and Microsoft
  • 27:30 Introduction to Image2Docker
  • 30:00 Demo – 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 Continue reading

Convert ASP.NET Web Servers to Docker with Image2Docker

A major update to Image2Docker was released last week, which adds ASP.NET support to the tool. Now you can take a virtualized web server in Hyper-V and extract a Docker image for each website in the VM – including ASP.NET WebForms, MVC and WebApi apps. 

image2docker

Image2Docker is a PowerShell module which extracts applications from a Windows Virtual Machine image into a Dockerfile. You can use it as a first pass to take workloads from existing servers and move them to Docker containers on Windows.

The tool was first released in September 2016, and we’ve had some great work on it from PowerShell gurus like Docker Captain Trevor Sullivan and Microsoft MVP Ryan Yates. The latest version has enhanced functionality for inspecting IIS – you can now extract ASP.NET websites straight into Dockerfiles.

In Brief

If you have a Virtual Machine disk image (VHD, VHDX or WIM), you can extract all the IIS websites from it by installing Image2Docker and running ConvertTo-Dockerfile like this:

Install-Module Image2Docker
Import-Module Image2Docker
ConvertTo-Dockerfile -ImagePath C:\win-2016-iis.vhd -Artifact IIS -OutputPath c:\i2d2\iis

That will produce a Dockerfile which you can build into a Windows container image, using docker build.

How It Works

The Image2Docker Continue reading

Learn Docker with More Hands-On Labs

Docker Labs is a rich resource for technical folks from any background to learn Docker. Since the last update on the Docker Blog, three new labs have been published covering Ruby, SQL Server and running a Registry on Windows. The self-paced, hands-on labs are a popular way for people to learn how to use Docker for specific scenarios, and it’s a resource which is growing with the help of the community.

Docker hands-on labs

New Labs

  • Ruby FAQ. You can Dockerize Ruby and Ruby on Rails apps, but there are considerations around versioning, dependency management and the server runtimes. The Ruby FAQ walks through some of the challenges in moving Ruby apps to Docker and proposes solutions. This lab is just beginning, we would love to have your contributions.
  • SQL Server Lab. Microsoft maintain a SQL Server Express image on Docker Hub that runs in a Windows container. That image lets you attach an existing database to the container, but this lab walks you through a full development and deployment process, building a Docker image that packages your own database schema into an image.
  • Registry Windows Lab. Docker Registry is an open-source registry server for storing Docker images, which you can run Continue reading