Docker on Windows
Elton Stoneman
- 309 páginas
- English
- ePUB (apto para móviles)
- Disponible en iOS y Android
Docker on Windows
Elton Stoneman
Información del libro
Learn how to run new and old Windows applications in Docker containers.About This Book• Package traditional.NET Frameworks apps and new.NET Core apps as Docker images, and run them in containers for increased efficiency, portability, and security• Design and implement distributed applications that run across connected containers, using enterprise-grade open source software from public Docker images• Build a full Continuous Deployment pipeline for a.NET Framework application, and deploy it to a highly-available Docker swarm running in the cloudWho This Book Is ForIf 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• Comprehend key Docker concepts: images, containers, registries, and swarms• Run Docker on Windows 10, Windows Server 2016, and in the cloud• Deploy and monitor distributed solutions across multiple Docker containers• Run containers with high availability and fail-over with Docker Swarm• Master security in-depth with the Docker platform, making your apps more secure• Build a Continuous Deployment pipeline by running Jenkins in Docker• Debug applications running in Docker containers using Visual Studio• Plan the adoption of Docker in your own organizationIn DetailDocker is a platform for running server applications in lightweight units called containers. You can run Docker on Windows Server 2016 and Windows 10, and run your existing apps in containers to get significant improvements in efficiency, security, and portability.This book teaches you all you need to know about Docker on Windows, from 101 to deploying highly-available workloads in production. This book takes you on a Docker journey, starting with the key concepts and simple examples of how to run.NET Framework and.NET Core apps in Windows Docker containers. Then it moves on to more complex examples—using Docker to modernize the architecture and development of traditional ASP.NET and SQL Server apps.The examples show you how to break up monoliths into distributed apps and deploy them to a clustered environment in the cloud, using the exact same artifacts you use to run them locally. To help you move confidently to production, it then explains Docker security, and the management and support options.The book finishes with guidance on getting started with Docker in your own projects, together with some real-world case studies for Docker implementations, from small-scale on-premises apps to very large-scale apps running on Azure.Style and approachUsing a step-by-step approach, this book shows you how to use Docker on Windows. It includes practical examples and real-world technical and business scenarios that will help you effectively implement Docker in your environment.There are over 50 examples of Dockerized applications, using C#.NET projects as the source and packaging them into Docker images.
Preguntas frecuentes
Información
Packaging and Running Applications as Docker Containers
- Running containers from images
- Building images from Dockerfiles
- Packaging your own applications as Docker images
- Working with data in images and containers
- Packaging legacy ASP.NET web apps as Docker images
Running a container from an image
Doing one thing with a task container
> docker container run dockeronwindows/ch02-powershell-env
Name Value
---- -----
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Users\ContainerAdministrator\AppData\Roaming
CommonProgramFiles C:\Program Files\Common Files
CommonProgramFiles(x86) C:\Program Files (x86)\Common Files
CommonProgramW6432 C:\Program Files\Common Files
COMPUTERNAME 361CB712CB4B
...
> docker container ls --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
361cb712cb4b dockeronwindows/ch02-powershell-env "powershell.exe c:..." 30 seconds ago Exited
Connecting to an interactive container
> docker container run --interactive --tty dockeronwindows/ch02-powershell-env `
powershell
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS C:\> Write-Output 'This is an interactive container'
This is an interactive container
PS C:\> exit
Keeping a process running in a background container
> docker container run --detach dockeronwindows/ch02-powershell-env `
powershell Test-Connection 'localhost' -Count 100
ce7b2604f681871a8dcd2ffd8898257fad26b24edec7135e76aedd47cdcdc427
> docker container logs ce7
Source Destination IPV4Address IPV6Address
------ ----------- ----------- -----------
CE7B2604F681 localhost
CE7B2604F681 localhost