前提 说明:已发布文件为可移植
下面来看dockerfile文件内容
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
# 上方为运行环境
WORKDIR /app
#工作目录
EXPOSE 12123
#开开放口
WORKDIR /app
#切换到工作目录
COPY . /app
#复制当前文件夹内容到/app目录下
ENTRYPOINT ["dotnet", "wedapp.dll"]
wedapp.dll 为启动文件