- Docker on Windows
- Elton Stoneman
- 367字
- 2021-07-02 19:53:22
Hosting Internet Information Services (IIS) applications in Docker
Complete .NET Framework apps can be easily packaged into Docker images, but there are some limitations you need to be aware of. Microsoft provides Nano Server and Windows Server Core base images on Docker Hub. The complete .NET Framework doesn't run on Nano Server, so to host your existing .NET apps in Docker, you need to use the Windows Server Core base image.
Running from Windows Server Core means your application images will be around 10 GB in size, the bulk of which is in the base image. You have a complete Windows Server operating system, with all the packages available to enable Windows Server features, such as DNS and DHCP, even though you only want to use it for a single application role. It's perfectly reasonable to run containers from Windows Server Core, but you need to be aware of the implications:
- The base image has a large surface area with a lot of software installed, which means it's likely to have more frequent security and functional patches
- The OS runs a lot of its own processes in addition to your application process, as several core parts of Windows run as background Windows services
- Windows has its own application platforms, with high-value feature sets for hosting and management, which do not natively integrate with the Docker approach
You can take an ASP.NET web application and dockerize it in a few hours. It will build into a large Docker image that takes longer to distribute and start up than an application built on a lightweight, modern application stack. But you still have a single package with your whole application deployed, configured, and ready to run. This is a big step in improving quality and reducing deployment time, and it can be the first part of a program to modernize a legacy application.
To integrate an ASP.NET app more closely with Docker, you can modify how IIS logs are written and specify how Docker checks whether the container is healthy without any changes to the application code. If changing code is part of your modernization program, then with minimal changes, you can use the container's environment variables for application configuration.
- C語言程序設(shè)計案例教程
- 深入核心的敏捷開發(fā):ThoughtWorks五大關(guān)鍵實踐
- 編程的修煉
- Python編程完全入門教程
- JavaScript by Example
- MySQL數(shù)據(jù)庫管理與開發(fā)實踐教程 (清華電腦學(xué)堂)
- MATLAB 2020從入門到精通
- Unity 2018 Shaders and Effects Cookbook
- Android傳感器開發(fā)與智能設(shè)備案例實戰(zhàn)
- SQL Server 2016 從入門到實戰(zhàn)(視頻教學(xué)版)
- Web App Testing Using Knockout.JS
- 深入解析Java編譯器:源碼剖析與實例詳解
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)
- 你真的會寫代碼嗎
- Android 5從入門到精通