有谁知道如何获得一个免费的AspNetCore 3.0图像我的迷你飞船项目。提前谢谢你。
发布于 2020-04-30 03:28:58
我不确定我是否正确理解了您的问题,但微软的ASP.NET核心运行时容器镜像可在此处获得:https://hub.docker.com/_/microsoft-dotnet-core-aspnet/
docker pull mcr.microsoft.com/dotnet/core/aspnet:3.1
让镜像在OpenShift上运行有点棘手,因为容器镜像使用80端口。因此,要部署示例应用程序,我们需要添加额外的步骤来创建ServiceAccount
并分配SCC
# Deploy the DeploymentConfig
oc new-app --name aspnetcore-sample mcr.microsoft.com/dotnet/core/samples:aspnetapp
# Create a ServiceAccount, give it the "anyuid" SCC and assign it to the DeploymentConfig
oc create serviceaccount aspnetcore-sample-sa
oc adm policy add-scc-to-user anyuid -z aspnetcore-sample-sa
oc set serviceaccount dc aspnetcore-sample aspnetcore-sample-sa
# Expose the application to the outside world via a route
oc expose dc aspnetcore-sample --port=80
oc expose service aspnetcore-sample
# See the route with the following command
oc get route
https://stackoverflow.com/questions/61433714
复制相似问题