1.添加Dockfile文件
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
COPY . .
ENTRYPOINT ["dotnet", "MvcMovie.dll"]
2.制作镜像
docker build -t mvcmovie .
3.运行镜像
docker run --name mvcmovie -p 6666:80 -d mvcmovie:latest
标签:core,asp,mvcmovie,build,net,docker From: https://www.cnblogs.com/huangkai00000/p/17601408.html