待验证
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 5000
FROM base AS final
WORKDIR /app
COPY requirements.txt requirements.txt
RUN apt-get install yum
RUN apt-get install pip
RUN pip install -r requirements.txt
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApplication1.dll"]
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 5000
COPY requirements.txt requirements.txt
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApplication1.dll"]
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 5000
FROM base AS final
WORKDIR /app
COPY requirements.txt requirements.txt
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApplication1.dll"]
docker build -t dotnetcore-demo2 .
docker build -t dotnetcore-demo1 .
docker build -t dotnetcore-demo1 /opt/apps/webs/dotnetdemo/
docker build -t dotnetcore-demo7 /opt/apps/webs/dotnetdemo/
docker run -it dotnetcore-demo7 -p 5000:5000
docker run -it dotnetcore-demo1 -p 5000:5000
docker run -it mcr.microsoft.com/dotnet/sdk
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
docker login -u chenbigui -p dckr_pat_VNeG3zlf4ZcpsKwsXUM-v131D
docker build -t dotnetcore-demo1 /opt/apps/webs/dotnetdemo/
docker build -t dotnetcore-demo1 .
1. Run docker login -u chenbigui
2. At the password prompt, enter the personal access token.
```asp
dckr_pat_VNeG3zlf4ZcpsKwsXUM-v131DP8
文档更新时间: 2023-08-26 21:34 作者:admin