I am checking a new Visual Studio 2017 with built in connectivity to Docker. Once done all things installed and solved a number of issues on establishing connection between Visual Studio and Docker running in VirtualBox VM i am facing and issue when VS is unable to run container due to volumes mapping. Having read a number of posts for similar issues, i still cant run it..
Its fully default .NET core sample-template app from VS 2017 with Docker support.
docker-compose.ci.build.yml
version: '2'
services:
ci-build:
image: microsoft/aspnetcore-build:1.0-1.1
volumes:
- .:/src
working_dir: /src
command: /bin/bash -c "dotnet restore ./WebApplication1.sln && dotnet publish ./WebApplication1.sln -c Release -o ./obj/Docker/publish"
docker-compose.yml
version: '2'
services:
webapplication1:
image: webapplication1
environment:
- COMPOSE_CONVERT_WINDOWS_PATHS=1
build:
context: ./WebApplication1
dockerfile: Dockerfile
docker-compose.override.yml
version: '2'
services:
webapplication1:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "80"
docker-compose.vs.debug.yml
version: '2'
services:
webapplication1:
image: webapplication1:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./WebApplication1:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
Dockerfile
FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "WebApplication1.dll"]
Error:
ERROR: for webapplication1 Cannot create container for service webapplication1: invalid bind mount spec "C:\Users\UserName\Documents\Visual Studio 2017\Projects\WebApplication1\WebApplication1:/app:rw": invalid volume specification: 'C:\Users\UserNameDocuments\Visual Studio 2017\Projects\WebApplication1\WebApplication1:/app:rw'
Where the problem is? I tried escaping slashes and on and off COMPOSE_CONVERT_WINDOWS_PATHS, but result is all the time same. Please help out!
