操作步骤

1. 安装 Docker For Windows(安装之前 Windows 需要 开启 Hyper-V 虚拟机功能 

https://store.docker.com/editions/community/docker-ce-desktop-windows

在 Visual Studio 中部署 ASP.NET Core 应用
    





            
另一篇:在 Docker 中手工部署 ASP.NET Core 应用

2. 新建 ASP.NET Core Web 应用程序,编译成功

3. 为项目添加 Docker 支持。 

在 Visual Studio 中部署 ASP.NET Core 应用
    





            
另一篇:在 Docker 中手工部署 ASP.NET Core 应用

4. 更新 Dockerfile 指令。

在 Visual Studio 中部署 ASP.NET Core 应用
    





            
另一篇:在 Docker 中手工部署 ASP.NET Core 应用

5. 切换部署平台为 Docker。 

在 Visual Studio 中部署 ASP.NET Core 应用
    





            
另一篇:在 Docker 中手工部署 ASP.NET Core 应用

6. F5 运行项目,构建并部署镜像。

在 Visual Studio 中部署 ASP.NET Core 应用
    





            
另一篇:在 Docker 中手工部署 ASP.NET Core 应用

7. 打开浏览器访问应用。

在 Visual Studio 中部署 ASP.NET Core 应用
    





            
另一篇:在 Docker 中手工部署 ASP.NET Core 应用

参考资料

https://www.hi-linux.com/posts/60777.html
https://www.cnblogs.com/bluesummer/p/8087326.html

相关文章:

  • 2021-08-20
  • 2021-11-14
  • 2021-05-29
  • 2021-07-28
  • 2021-08-31
  • 2022-02-08
  • 2019-01-28
  • 2021-09-24
猜你喜欢
  • 2021-08-06
  • 2021-11-06
  • 2022-12-23
  • 2020-11-16
  • 2021-06-04
  • 2021-04-06
  • 2019-08-13
相关资源
相似解决方案