当您阅读标题时,我在通过docker映像部署Web应用程序时遇到问题。
我尝试了许多教程,但这是使我最接近目标的教程: http://www.frankysnotes.com/2018/09/what-happen-when-you-mix-aspnet-core.html
现在,即使镜像指南也对我不起作用。我能够完成所有步骤,而没有一个错误,但是结果是“应用程序错误”消息。
我尝试做完全相同的事情,除了我创建了自己的带有Docker支持的MVC Core Web应用程序,该应用程序带有生成的Dockerfile。我能够再次构建该图像,完成所有步骤,但是得到的结果与以前相同。
Sending build context to Docker daemon 6.811MB
Step 1/3 : FROM microsoft/dotnet:2.1-aspnetcore-runtime
---> db366d73508b
Step 2/3 : WORKDIR /app COPY /app /app
---> Using cache
---> 0af8c7cfd781
Step 3/3 : ENTRYPOINT [ "dotnet" , "dotnetcoredockerappservicedemo.dll"]
---> Using cache
---> 395a32b96d8e
Successfully built 395a32b96d8e
Successfully tagged dotnetcoredockerappservicedemo:latest
[
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"slotSetting": false,
"value": null
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"slotSetting": false,
"value": "https://mycontainer.azurecr.io"
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"slotSetting": false,
"value": "mycontainer"
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"slotSetting": false,
"value": "false"
},
{
"name": "DOCKER_CUSTOM_IMAGE_NAME",
"value" "DOCKER|mycontainer.azurecr.io/dotnetcoredockerappservicedemo:v1"
}
]
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: false
只有这么少的信息,我还是无法解决这个问题。甚至这篇文章都是相对较新的,这是迄今为止我所能找到的最简单的文章。
我希望你们能为我指明正确的方向,因为我对云领域的经验并不丰富。
谢谢!