热启用群集容器连接到主机?

我需要使用swarm模式的docker通过我的服务使用一些共享的秘密。

其中一个服务需要在我的计算机上使用本地MS SQL数据库。

这是我的docker-compose文件:

version: '3.2' services: auth_service: build: ./Services/AuthService image: sandhaka/auth_service command: dotnet run --rm ports: - "5000:5000" environment: ASPNETCORE_URLS: http://*:5000 DB_CONNECTION_STRING: 'Server=10.0.0.102,1433; Database=micrs-auth-db; User=sa; Password=Password' secrets: - jwt-pvt-key - jwt-pub-key resource_test_service: build: ./Services/ResourceTestService image: sandhaka/resource_test_service command: dotnet run --rm ports: - "9000:9000" environment: ASPNETCORE_URLS: http://*:9000 secrets: - jwt-pub-key secrets: jwt-pub-key: file: ./keys/jwtRS256.key.pub jwt-pvt-key: file: ./keys/jwtRS256.key 

问题在于,在群集模式configuration下,“auth_service”服务无法连接到主机networking。

我不是一个swarm专家,那么我的问题是:如何configuration群覆盖networking来访问主机的ip:port ? 还有,如何将容器暴露给主机,例如debugging服务?