我的aspnetcore docker项目构建,但是当我单击Docker按钮(或按F5)运行时,我得到了
Severity Code Description Project File Line Suppression State
Error MSB4018 The "PrepareForLaunch" task Failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose1627893588_default" with the default driver
Building pswebapi
Service 'pswebapi' Failed to build: Get https://registry-1.docker.io/v2/microsoft/aspnetcore/manifests/1.1: unauthorized: incorrect username or password.
For more troubleshooting information,go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose1627893588_default" with the default driver
Building pswebapi
Service 'pswebapi' Failed to build: Get https://registry-1.docker.io/v2/microsoft/aspnetcore/manifests/1.1: unauthorized: incorrect username or password
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.IoUs location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerWorkspace.IoUs location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.dio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 192
我有C:使用Docker设置共享.
我正在使用linux容器
Dockerfile是
FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet","PsWebApi.dll"]
我正在研究Scott Allen的Pluralsight课程
“Microsoft Azure for .NET开发人员 – 构建安全的服务和应用程序”
我已升级到最新的nuget包.
最佳答案
原文链接:https://www.f2er.com/docker/435994.html