Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Docker on Windows
Docker on Windows

Docker on Windows: From 101 to production with Docker on Windows , Second Edition

Arrow left icon
Profile Icon Elton Stoneman
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (5 Ratings)
Paperback Feb 2019 428 pages 2nd Edition
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial
Arrow left icon
Profile Icon Elton Stoneman
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (5 Ratings)
Paperback Feb 2019 428 pages 2nd Edition
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Docker on Windows

Getting Started with Docker on Windows

Docker is an application platform. It's a new way of running applications in isolated, lightweight units called containers. Containers are a very efficient way of running apps – much more efficient than virtual machines (VMs) or bare-metal servers. Containers start in seconds, and they don't add any overhead to the memory and compute requirements of an app. Docker is completely agnostic to the type of apps it can run. You can run a brand new .NET Core app in one container and a 10-year old ASP.NET 2.0 WebForms app in another container on the same server.

Containers are isolated units, but they can integrate with other components. Your WebForms container can access a REST API hosted in your .NET Core container. Your .NET Core container can access a SQL Server database running in a container, or a SQL Server instance running...

Technical requirements

Docker and Windows containers

Docker was originally developed on Linux, taking advantage of core Linux features, but making it simple and efficient to use containers for application workloads. Microsoft saw the potential and worked closely with the Docker engineering team to bring the same functionality to Windows.

Windows Server 2016 was the first version of Windows built to run Docker containers; Windows Server 2019 continues the innovation with significantly improved features and performance for Windows containers. You can run the same Docker containers on Windows 10 for development and testing that you run on Windows Server in production. Right now, you can only run Windows applications in containers on Windows, but Microsoft is adding support for Linux application containers to run on Windows too.

The first thing you need to know is that there is no integration between containers...

Understanding the key Docker concepts

Docker is a very powerful but very simple application platform. You can get started with running your existing apps in Docker in just a few days, and be ready to move to production in another few days. This book will take you through lots of examples of .NET Framework and .NET Core applications running in Docker. You'll learn how to build, ship, and run applications in Docker and move on to advanced topics such as solution design, security, administration, instrumentation, and continuous integration and continuous delivery (CI/CD).

To start with, you need to understand the core Docker concepts: images, registries, containers, and orchestrators – and understand how Docker actually runs.

The Docker Engine and Docker command-line

...

Running Docker on Windows

It's easy to install Docker on Windows 10, using Docker Desktop – a Windows package that sets up all the prerequisites, deploys the latest version of the Docker Community Engine, and gives you a UI with some useful options to manage image repositories and remote clusters.

In production, you should ideally use Windows Server 2019 Core, the installation with no UI. This reduces the attack surface and the amount of Windows updates your server will need. If you move all your apps to Docker, you won't need any other Windows features installed; you'll just have Docker Engine running as a Windows service.

I'll walk through both of these installation options and show you a third option using a VM in Azure, which is useful if you want to try Docker but don't have access to Windows 10 or Windows Server 2019.

There is a fantastic...

Learning about Docker with this book

Every code listing in this book is accompanied by a full code sample on my GitHub repository at https://github.com/sixeyed/docker-on-windows. There's a branch for this edition of the book, called second-edition. The source tree is organized into a folder for each chapter, and for each chapter there's a folder for each code sample. In this chapter, I've used three samples to create Docker images, which you'll find in ch01\ch01-whale, ch01\ch01-az, and ch01\ch01-dockertls.

The code listings in this book may be condensed, but the full code can always be found in the GitHub repository.

I prefer to follow along with code samples when I'm learning a new technology, but if you want to use working versions of the demo applications, every sample is also available as a public Docker image on Docker Hub. Wherever you see a docker...

Summary

In this chapter I introduced Docker, an application platform which can run new and old apps in lightweight units of compute called containers. Companies are moving to Docker for efficiency, security, and portability. I covered the following topics:

  • How Docker works on Windows and how containers are licensed.
  • The key Docker concepts: images, registries, containers, and orchestrators.
  • The options to run Docker on Windows 10, Windows Server 2019, or Azure.

If you're planning to work along with the code samples in the rest of the book, you should have a working Docker environment by now. In Chapter 2, Packaging and Running Applications as Docker Containers, I'll move onto packaging more complex apps as Docker images and show how to manage states in containers with Docker volumes.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Run .NET Framework and .NET Core apps in Docker containers for efficiency, security and portability
  • Design distributed containerized apps, using enterprise-grade open source software from Docker Hub
  • Build a CI/CD pipeline with Docker, going from source to a production Docker Swarm in the cloud

Description

Docker on Windows, Second Edition teaches you all you need to know about Docker on Windows, from the 101 to running highly-available workloads in production. You’ll be guided through a Docker journey, starting with the key concepts and simple examples of .NET Framework and .NET Core apps in Docker containers on Windows. Then you’ll learn how to use Docker to modernize the architecture and development of traditional ASP.NET and SQL Server apps. The examples show you how to break up legacy monolithic applications into distributed apps and deploy them to a clustered environment in the cloud, using the exact same artifacts you use to run them locally. You’ll see how to build a CI/CD pipeline which uses Docker to compile, package, test and deploy your applications. To help you move confidently to production, you’ll learn about Docker security, and the management and support options. The book finishes with guidance on getting started with Docker in your own projects. You’ll walk through some real-world case studies for Docker implementations, from small-scale on-premises apps to very large-scale apps running on Azure.

Who is this book for?

If you want to modernize an old monolithic application without rewriting it, smooth the deployment to production, or move to DevOps or the cloud, then Docker is the enabler for you. This book gives you a solid grounding in Docker so you can confidently approach all of these scenarios.

What you will learn

  • Understand key Docker concepts: images, containers, registries and swarms
  • Run Docker on Windows 10, Windows Server 2019, and in the cloud
  • Deploy and monitor distributed solutions across multiple Docker containers
  • Run containers with high availability and failover with Docker Swarm
  • Master security in-depth with the Docker platform, making your apps more secure
  • Build a Continuous Deployment pipeline, running Jenkins and Git in Docker
  • Debug applications running in Docker containers using Visual Studio
  • Plan the adoption of Docker in your organization

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 28, 2019
Length: 428 pages
Edition : 2nd
Language : English
ISBN-13 : 9781789617375
Vendor :
Docker
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Feb 28, 2019
Length: 428 pages
Edition : 2nd
Language : English
ISBN-13 : 9781789617375
Vendor :
Docker
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 186.97
Docker High Performance
S$36.99
Docker on Windows
S$74.99
Mastering Docker
S$74.99
Total S$ 186.97 Stars icon

Table of Contents

17 Chapters
Section 1: Understanding Docker and Windows Containers Chevron down icon Chevron up icon
Getting Started with Docker on Windows Chevron down icon Chevron up icon
Packaging and Running Applications as Docker Containers Chevron down icon Chevron up icon
Developing Dockerized .NET Framework and .NET Core Applications Chevron down icon Chevron up icon
Sharing Images with Docker Registries Chevron down icon Chevron up icon
Section 2: Designing and Building Containerized Solutions Chevron down icon Chevron up icon
Adopting Container-First Solution Design Chevron down icon Chevron up icon
Organizing Distributed Solutions with Docker Compose Chevron down icon Chevron up icon
Orchestrating Distributed Solutions with Docker Swarm Chevron down icon Chevron up icon
Section 3: Preparing for Docker in Production Chevron down icon Chevron up icon
Administering and Monitoring Dockerized Solutions Chevron down icon Chevron up icon
Understanding the Security Risks and Benefits of Docker Chevron down icon Chevron up icon
Powering a Continuous Deployment Pipeline with Docker Chevron down icon Chevron up icon
Section 4: Getting Started on Your Container Journey Chevron down icon Chevron up icon
Debugging and Instrumenting Application Containers Chevron down icon Chevron up icon
Containerize What You Know - Guidance for Implementing Docker Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(5 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
treesa Dec 16, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is interdisciplinary. The concepts are amazing but the devil’s in the details. Not possible to work with the book alone. You need the associated code and then a lot of internet research on top of that. It’s been a few months and only just finished Chapter 6. Learning tons, though.
Amazon Verified review Amazon
Ferran May 07, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you are planning to move your existing Windows application into Docker containers, this book will help you gain knowledge to support it. In the book the author takes a monolithic .NET based application, containerizes it and subsequently breaks it down into micro-services. He then provides guidance as to how to share it, and setup a secure and continuous delivery pipeline.The book is very hands-on and meant to be used in conjunction with the source code (provided for free on Github), so get ready to get your coding going on!
Amazon Verified review Amazon
Lilian Sep 02, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I had the privilege of attending a couple of Elton's presentations @Live conference. This book is a must have for anyone going through the journey of breaking up the monolith, learning how to solve typical problems using Docker. Elton's expertize in the subject matter is expressed throughout the book with clear hands on examples. His advice is invaluable.
Amazon Verified review Amazon
Steven Follis May 15, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a perfect introduction to running Docker Containers within the Microsoft Windows ecosystem. From applications themselves to integrations such as persistent storage, I felt confident in being able to work with containers. Having read the first edition, this 2nd edition expands and provides more detail around the recently released Windows Server 2019 operating system. Recommended for anyone interacting with Windows Containers on a regular basis.
Amazon Verified review Amazon
Pav May 20, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am a Docker Captain and have been working with Docker on Linux for years. I am new however to Docker on Windows ecosystem. This book is a great way to get started running containers on windows. Whether you are running a single container in dev or supporting production environment -- you will find relevant information in this book. Not at all intimidating to a beginner and still full of useful info for a more experienced user. Tips and tricks and windows idiosyncrasies are well covered throughout the book. Highly recommend as the reference guide for anyone running Docker on Windows.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.