Docker on Windows
图书信息
| 作者 | Elton Stoneman |
| 出版社 | Packt Publishing |
| ISBN | 9781789610604 |
| 出版时间 | 2019-02-28 |
| 字数 | 57.2万 |
| 分类 | 进口书,外文原版书,电脑,网络 |
读书简介
Learn how to run new and old applications in Docker containers on Windows - modernizing the architecture, improving security and maximizing efficiency. Key Features * 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 Book 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. 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 Who this book is 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.
目录
Title Page
Copyright and Credits
Docker on Windows Second Edition
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Understanding Docker and Windows Containers
Getting Started with Docker on Windows
Technical requirements
Docker and Windows containers
Windows versions
Windows licensing
Understanding the key Docker concepts
The Docker Engine and Docker command-line
Docker images
Image registries
Docker containers
Docker Swarm
A note on Kubernetes
Running Docker on Windows
Docker Desktop
Docker Engine
Docker in an Azure VM
Learning about Docker with this book
Summary
Packaging and Running Applications as Docker Containers
Technical requirements
Running a container from an image
Doing one thing with a task container
Connecting to an interactive container
Keeping a process running in a background container
Building a Docker image
Understanding Dockerfiles
Building an image from a Dockerfile
Examining how Docker builds an image
Packaging your own applications
Compiling the application during the build
Compiling the application before the build
Compiling with multi-stage builds
Using the main Dockerfile instructions
Understanding temporary containers and image state
Working with data in Docker images and containers
Data in layers and the virtual C drive
Sharing data between containers with volumes
Sharing data between the container and host with volumes
Mounting volumes from host directories
Using volumes for configuration and state
Packaging a traditional ASP.NET web app as a Docker image
Writing a Dockerfile for NerdDinner
Summary
Developing Dockerized .NET Framework and .NET Core Applications
Building good citizens for Docker
Hosting Internet Information Services (IIS) applications in Docker
Configuring IIS for Docker-friendly logging
Managing application configuration
Mounting configuration files in Docker volumes
Promoting environment variables
Building Docker images that monitor applications
Separating dependencies
Creating Docker images for SQL Server databases
Managing database files for SQL Server containers
Running databases in containers
Connecting to database containers from application containers
Breaking up monolithic applications
Extracting high-value components from monoliths
Hosting a UI component in an ASP.NET Core application
Connecting to application containers from other application containers
Summary
Sharing Images with Docker Registries
Understanding registries and repositories
Examining image repository names
Building, tagging, and versioning images
Pushing images to a registry
Running a local image registry
Building the registry image
Running a registry container
Pushing and pulling images with a local registry
Configuring Docker to allow insecure registries
Storing Windows image layers in a local registry
Using a commercial registry
Docker Hub
Docker Trusted Registry
Other registries
Summary
Section 2: Designing and Building Containerized Solutions
Adopting Container-First Solution Design
Technical requirements
Design goals for NerdDinner
Dockerizing NerdDinner's configuration
Splitting out the create dinner feature
Packaging .NET console apps in Docker
Running a message queue in Docker
Starting a multi-container solution
Modernizing legacy applications
Adding a REST API to expose data
Routing HTTP requests between containers with a reverse proxy
Proxying traffic from Docker containers with Traefik
Adding new features in containers
Using Elasticsearch with Docker and .NET
Building hybrid .NET Framework and .NET Core solutions in Docker
Compiling the hybrid NerdDinner solution
Packaging .NET Core console apps in Docker
Providing analytics with Kibana
From monolith to distributed solution
Managing build and deployment dependencies
Summary
Organizing Distributed Solutions with Docker Compose
Technical requirements
Defining applications with Docker Compose
Capturing service definitions
Defining infrastructure services
Elasticsearch
Traefik
Kibana
Configuring application services
Specifying application resources
Managing applications with Docker Compose
Running applications
Scaling application services
Stopping and starting application services
Upgrading application services
Monitoring application containers
Managing application images
Configuring application environments
Specifying external resources
Using Docker Compose overrides
Summary
Orchestrating Distributed Solutions with Docker Swarm
Technical requirements
Creating a swarm and managing nodes
Initializing the swarm
Adding workers to the swarm
Promoting and removing swarm nodes
Running Docker Swarm in the cloud
Docker Certified Infrastructure
Creating and managing services in swarm mode
Running services across many containers
Global services
Load-balancing and scale in swarm mode
Managing application configuration in Docker Swarm
Storing configuration in Docker config objects
Using Docker config objects in swarm services
Storing sensitive data in Docker secrets
Deploying stacks to Docker Swarm
Defining a stack using Docker Compose files
Defining swarm resources in Docker Compose files
Deploying a swarm stack from a Docker Compose file
Deploying updates with zero downtime
Updating application services
Rolling back service updates
Configuring update behavior
Updating swarm nodes
Mixing hosts in hybrid swarms
Summary
Section 3: Preparing for Docker in Production
Administering and Monitoring Dockerized Solutions
Technical requirements
Managing containers with Windows tools
IIS Manager
SQL Server Management Studio (SSMS)
Event logs
Server manager
Managing containers with Docker tools
Docker visualizer
Portainer
CaaS with Docker Enterprise
Understanding Universal Control Plane
Navigating the UCP UI
Managing nodes
Volumes
Images
Networks
Deploying stacks
Creating services
Monitoring services
RBAC
Summary
Understanding the Security Risks and Benefits of Docker
Understanding container security
Container processes
Container user accounts and ACLs
Running containers with resource constraints
Running containers with restricted capabilities
Windows containers and Active Directory
Isolation in Hyper-V containers
Securing applications with secure Docker images
Building minimal images
Docker Security Scanning
Managing Windows updates
Securing the software supply chain with DTR
Repositories and users
Organizations and teams
Image promotion policies in DTR
Image signing and content trust
Golden images
Understanding security in swarm mode
Nodes and join tokens
Encryption and secrets
Node labels and external access
Integration with container security technologies
Summary
Powering a Continuous Deployment Pipeline with Docker
Technical requirements
Designing CI/CD with Docker
Running shared development services in Docker
Packaging a Git server into a Windows Docker image
Running the Gogs Git server in Docker
Packaging a CI server into a Windows Docker image
Running the Jenkins automation server in Docker
Committing images from running containers
Configuring CI/CD using Jenkins in Docker
Setting up Jenkins credentials
Configuring the Jenkins CI job
Building the solution using Docker in Jenkins
Running and verifying the solution
Running end-to-end tests in Docker
Tagging and pushing Docker images in Jenkins
Deploying to a remote Docker Swarm using Jenkins
Summary
Section 4: Getting Started on Your Container Journey
Debugging and Instrumenting Application Containers
Technical requirements
Working with Docker in integrated development environments
Docker in Visual Studio 2017
Debugging with Docker Compose in Visual Studio 2017
Docker in Visual Studio 2015
Docker in Visual Studio Code
Instrumentation in Dockerized applications
Instrumentation with Prometheus
Exposing .NET application metrics to Prometheus
Adding a Prometheus exporter alongside existing apps
Running a Prometheus server in a Windows Docker container
Building application dashboards in Grafana
The bug fixing workflow in Docker
Bug fixing before Docker
Bug fixing with Docker
Summary
Containerize What You Know - Guidance for Implementing Docker
Dockerizing what you know
Selecting a simple Proof-of-Concept app
Generating an initial Dockerfile with Image2Docker
Engaging other stakeholders
Case studies for implementing Docker
Case study 1 – an in-house WebForms app
Case study 2 – a database integration service
Case study 3 – an Azure IoT app
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
- 儿童英语启蒙——从绘本、游戏到分级读物(施乐遥)
- GBT 51338-2018 分布式电源并网工程调试与验收标准(电力企业联合会)
- 犹忆武林人未远——民国武林忆旧及安慰武学遗录(安慰)
- 足够遥远(张尺)
- 五灯会元校注(第二册)(曾琦云 校注)
- AutoCAD 2018中文版完全自学手册(龙马高新教育 策划 教传艳)
- 全国名校二外英语考研真题详解(圣才电子书)
- 365夜亲子共读:写给男孩子的经典智慧故事全集(秦茵)
