在Visual Studio更新之后,将docker-compose设置为启动项目时,无法以调试模式启动该项目。 失败
到目前为止已尝试:
User
文件夹下的vs调试文件夹docker system prune -a
,从而删除所有正在运行或未运行的图像除了再次重新安装整个VS2017之外,我完全没有主意,但这似乎是一个过大的选择。
有人知道此映像名称在哪里缓存以及如何刷新/删除它,以便它不会尝试查找该映像再次运行
这是docker控制台中的启动输出:
========== Debugging ==========
docker-compose -f "C:\dev\src\ps-projectname-service\docker-compose.yml" -f "C:\dev\src\ps-projectname-service\docker-compose.override.yml" -f "C:\dev\src\ps-projectname-service\obj\Docker\docker-compose.vs.debug.g.yml" -p dockercompose5497340922178811047 --no-ansi config
services:
integration-db:
container_name: projectname-integration-db
environment:
POSTGRES_DB: dm
POSTGRES_PASSWORD: pguser
POSTGRES_USER: pguser
image: postgres
ports:
- published: 5432
target: 5432
volumes:
- /tmp/customer/data/postgres:/var/lib/postgresql/data:rw
customer.projectname.api.webhost:
build:
context: C:\dev\src\ps-projectname-service
dockerfile: Customer.projectname.Api.WebHost/Dockerfile
target: base
entrypoint: tail -f /dev/null
environment:
ASPNETCORE_ENVIRONMENT: Development
DB_CONNECTION_STRING: Host=integration-db;Port=5432;Username=pguser;Password=pguser;Database=dm;MaxPoolSize=150;
DOTNET_USE_POLLING_FILE_WATCHER: '1'
NUGET_FALLBACK_PACKAGES: /root/.nuget/fallbackpackages
image: customer.projectname.api.webhost:dev
labels:
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages
--additionalProbingPath /root/.nuget/fallbackpackages bin/Debug/netcoreapp2.1/Customer.projectname.Api.WebHost.dll'
com.microsoft.visualstudio.debuggee.killprogram: /bin/bash -c "if PID=$$(pidof
-x dotnet); then kill $$PID; fi"
com.microsoft.visualstudio.debuggee.program: dotnet
com.microsoft.visualstudio.debuggee.workingdirectory: /app
ports:
- target: 80
volumes:
- C:\dev\src\ps-projectname-service\Customer.projectname.Api.WebHost:/app:rw
- C:\Users\ZaakSlezak\vsdbg\vs2017u5:/remote_debugger:ro
- C:\Program Files\dotnet\sdk\NuGetFallbackFolder:/root/.nuget/fallbackpackages:ro
- C:\Users\ZaakSlezak\.nuget\packages:/root/.nuget/packages:ro
test:
build:
context: C:\dev\src\ps-projectname-service
dockerfile: ./dockerfile-test
command: ./devops/scripts/test.sh
volumes:
- C:\dev\src\ps-projectname-service:/app:rw
version: '3.4'
docker ps --filter "status=running" --filter "name=dockercompose5497340922178811047_customer.projectname.api.webhost_" --format {{.ID}} -n 1
答案 0 :(得分:0)
事实证明,我陷入了这个循环,因为docker-compose中用于运行单元测试的一项服务没有与之关联的映像。 从docker-compose中删除它或添加图像:解决了问题。