ASP.Net Core Angular项目使用Docker进行容器化部署(1)-- 发布文件容器化
一、介绍
本文将介绍如何将ASP.Net Core Angular项目通过Docker进行容器化部署,主要的方式是将发布的文件进行容器化部署
二、环境
- Window 10
- Visual Studio 2019
- Angular cli 9.1.3
- Docker
三、部署
1、安装
下载Docker desktop并安装
1、发布
将项目发布到项目的/bin/Release/netcoreapp3.1/publish
目录,具体操作可参考ASP.Net Core程序发布一文
2、创建Dockerfile
在项目文件上右键,选择【添加】–【Docker支持…】
在弹出的Docker文件选项选择框中选择【Linux】选项,然后点击【确定】即可