Sau*_*rni 4 azure docker dockerhub asp.net-core
我正在学习 docker 和容器。我正在尝试通过 Visual Studio 2019 在 Docker Hub 上发布我的 .Net Core 3.1 Web App。我在 Windows PC 上,但 Visual Studio 部署环境设置为 Linux,Docker 也设置为 Linux。我也安装了 WSL2(Linux 2 的 Windows 子系统)。此外,Web 应用程序运行良好,同时我可以看到容器和图像已成功创建到 Docker 仪表板(正在运行)中。但是,在尝试将其发布到 Docker Hub 时,出现以下错误。
你能帮我找出我的电脑(它是 azure windows 10 VM)上缺少哪个部分吗?
注意:我也可以毫无问题地运行 linux 容器。Ubuntu 20 也是从 Windows 商店安装的。
2021-07-01 10:19:58 AM
Microsoft.WebTools.Azure.Publish.Docker.DockerCommandException: Running the docker.exe tag command failed.
Current context "desktop-linux" is not found on the file system, please check your config file at C:\Users\kulkarnis009\AppData\Local\Temp\7961a412d485473395194d8ad39fe785\config.json
at Microsoft.WebTools.Azure.Publish.Docker.DockerOperations.ThrowDockerCommandError(String dockerCommand)
at Microsoft.WebTools.Azure.Publish.Docker.DockerOperations.<DockerTagAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.WebTools.Azure.Publish.Docker.DockerPublish.<DockerPublishAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.WebTools.Azure.Publish.ContainerRegistry.ManageContainerRegistry.<PushImageAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.WebTools.Azure.Publish.PublishProviders.ContainerRegistryProfileVisual.<PostPublishAsync>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Publish.Framework.Nexus.PublishProfilesServiceImpl.ServerProjectProfilesManager.<RunPublishTaskAsync>d__53.MoveNext()
===================
Run Code Online (Sandbox Code Playgroud)
小智 16
在文件中
file:///C:/Users/UserName/AppData/Local/Temp/c69e796a148440f18675b80111e06796/config.json
Run Code Online (Sandbox Code Playgroud)
换桌面-linux
{
"auths": {},
"credsStore": "desktop",
"currentContext": "default",
"stackOrchestrator": "swarm",
"HttpHeaders": {
"X-Meta-Source-Client": "vs/web/publish"
}
}
Run Code Online (Sandbox Code Playgroud)
currentContext 有桌面 Linux,我只是把“默认”
| 归档时间: |
|
| 查看次数: |
967 次 |
| 最近记录: |