hands-on lab

Getting Started with Docker on Windows

Difficulty: Beginner
Duration: Up to 2 hours
Students: 752
Rating: 4.5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Lab Overview

Docker has taken DevOps by storm and ignited interest in containers. Containers offer many of the benefits of virtual machines, but in a much more efficient, less resource-intensive system. Containers allow you to package up an application in an isolated environment that can be executed across machines in a reproducible manner. No more "well, it worked on my machine" syndrome when you leverage Docker for your application development and deployment.

Until recently, Docker has been limited to running Linux containers, but now Docker is making waves into Windows circles. Microsoft's improvements to containerize Windows has allowed Windows 10 and Windows Server 2016 to run Docker Windows containers. All the benefits of containers now for Windows! Examples of popular Windows applications available as containers on Windows include: IIS web server, SQL Server database, and .NET applications. 

In this lab you will get up and running with Docker on Windows using a Microsoft Azure virtual machine. You will work with images from the public Docker registry, and create several images to create containers from.

Lab Objectives

Upon completion of this lab you will be able to:

  • Use Docker on Windows
  • Create Windows container images for:
    • IIS web sites
    • .NET applications
    • Python applications
  • Understand the options for Windows base images

Lab Prerequisites

You should be familiar with the following:

  • What containers are
  • Working at the command line in Windows
  • Using a Remote Desktop client installed on your machine

Lab Environment

Before completing the lab instructions the environment will look as follows:

After completing the lab instructions the environment should look similar to:

Updates

May 26th, 2023 - Resolved environment error and flask advisor app issue

September 7th, 2021 - Updated to use the latest image names for docker hub and updated content to reflect the changes to the image name 

February 4th, 2020 - Updated to use the latest Windows Server 2019 with Containers image and updated content

May 17th, 2018 - Improved Lab startup performance and robustness

Covered topics

Lab steps

Getting Docker on Windows
Getting Docker Help from the Command Line
Running Your First Docker Windows Container
Understanding Docker Images and Dockerfiles
Creating an ASP.NET Docker Image
Cleaning Up Your Docker Windows Containers and Images