- Docker on Windows
- Elton Stoneman
- 273字
- 2021-07-02 12:47:58
Summary
In this chapter I took a closer look at Docker images and containers. Images are packaged versions of applications, and containers are instances of an application, run from an image. You can use containers to do simple fire-and-forget tasks, work with them interactively, or have them running in the background. As you start to use Docker more, you'll find yourself doing all three.
The Dockerfile is the source script for building an image. It's a simple text file with a small number of instructions to specify a base image, copy files, and run commands. You use the Docker command-line to build the image, which is very easy to add as a step to your CI build. When a developer pushes code that passes all the tests, the output of the build will be a versioned Docker image, which you can deploy to any host knowing that it will always run in the same way.
I looked at a few simple Dockerfiles in this chapter, and finished with a real-world application. NerdDinner is a legacy ASP.NET MVC app that was built to run on Windows Server and IIS. Using multi-stage builds, I packaged that legacy app into a Docker image and ran it in a container. This shows that the new model of compute which Docker offers isn't just for greenfield projects using .NET Core and Nano Server - you can migrate existing apps to Docker and put yourself in a good position to start modernizing them.
In the next chapter I'll use Docker to modernize the architecture of NerdDinner, breaking features out into separate components, and using Docker to plug them all together.
- pcDuino開發實戰
- Learning Windows Server Containers
- Ubuntu Linux操作系統
- 新手學電腦從入門到精通(Windows 10+Office 2016版)
- Linux就該這么學
- 嵌入式系統及其應用(第三版)
- 無蘋果不生活 The New iPad隨身寶典
- Learning Magento 2 Administration
- RHCSARHCE 紅帽Linux認證學習指南(第7版)EX200 & EX300
- Cassandra 3.x High Availability(Second Edition)
- Linux軟件管理平臺設計與實現
- Linux網絡操作系統項目教程(RHEL 7.4/CentOS 7.4)(第3版)(微課版)
- Android Telephony原理解析與開發指南
- 鴻蒙應用開發實戰
- 微信小程序項目開發實戰:用WePY、mpvue、Taro打造高效的小程序