Hot to enable swarm containers to connect to the host machine?

I need to use docker in swarm mode to use some shared secrets through my services.

One of these services needs to use a local MS SQL database on my computer.

  • Docker 1.9.0 “bridge” versus a custom bridge network results in difference in hosts file and SSH_CLIENT env variable
  • Configuring external access to the GAE app under the google/cloud-sdk docker container
  • How to figure out if docker master or agent running
  • Permissions inside docker
  • Docker limit memory usage is not working
  • Is there any way to override the “network/ipc” container in the kubernetes pod declaration?
  • This is my docker-compose file:

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

    The problem is that, with the swarm mode configuration, the ‘auth_service’ service is unable to connect to the host network.

    I am not a swarm expert, then my question is:
    How to configure the swarm overlay network to access a ip:port of the host?
    And also, how to expose the containers to the host, for example to debug the services ?

  • What is the limitation with one-node Cassandra cluster?
  • Setting Stackdriver Logging log level for Docker's gcplogs log driver
  • docker exec -it returns “cannot enable tty mode on non tty input”
  • Simulate different network condition in docker
  • Running gunicorn on ubuntu based image using docker-compose
  • Jenkins publish HTML from docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.