Error simply trying to run docker-compose project
I download the source and opened within VS Studio 2017. I set the docker-compose project as the Startup Project and attempt to run it to see the in container debugging feature. I am getting the error below. Any tips or clues on what to examine would be greatly appreciated.
ERROR: for web Cannot create container for service web: invalid bind mount spec "/remote_debugger:ro": invalid volume specification: '/remote_debugger:ro'
which opens the following file C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets
Full Error Stack:
Severity Code Description Project File Line Suppression State
Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: The NUGET_PACKAGES variable is not set. Defaulting to a blank string.
The VSDBG_PATH variable is not set. Defaulting to a blank string.
Creating network "dockercompose556412278_default" with the default driver
Building web
Building api
Creating dockercompose556412278_web_1
Creating dockercompose556412278_api_1
**ERROR: for web Cannot create container for service web: invalid bind mount spec "/remote_debugger:ro": invalid volume specification: '/remote_debugger:ro'
ERROR: for api Cannot create container for service api: invalid bind mount spec "/remote_debugger:ro": invalid volume specification: '/remote_debugger:ro'**
Encountered errors while bringing up the project..
For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: The NUGET_PACKAGES variable is not set. Defaulting to a blank string.
The VSDBG_PATH variable is not set. Defaulting to a blank string.
Creating network "dockercompose556412278_default" with the default driver
Building web
Building api
Creating dockercompose556412278_web_1
Creating dockercompose556412278_api_1
**ERROR: for web Cannot create container for service web: invalid bind mount spec "/remote_debugger:ro": invalid volume specification: '/remote_debugger:ro'
ERROR: for api Cannot create container for service api: invalid bind mount spec "/remote_debugger:ro": invalid volume specification: '/remote_debugger:ro'**
Encountered errors while bringing up the project.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.<ExecuteAsync>d__18.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DotNet.Docker.DockerComposeClient.<ExecuteAsync>d__18.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.DotNet.Docker.DockerWorkspace.<PrepareForLaunchAsync>d__14.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.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 192
I rebuilt the solution from scratch and copied your source files over. It seems that some paths have changed in the VS 2017 latest release. In the docker-compose.vs.debug.yml the paths:
${NUGET_PACKAGES}:/root/.nuget/packages:ro
${VSDBG_PATH}:/remote_debugger:ro
are now
~/.nuget/packages:/root/.nuget/packages:ro
~/clrdbg:/clrdbg:ro
and in docker-compose.vs.release.yml the path :
${VSDBG_PATH}:/remote_debugger:ro
is now
~/clrdbg:/clrdbg:ro
docker-compose.vs.debug.yml.txt docker-compose.vs.release.yml.txt