java - How to bind a port from Host system in Docker where already a service is running to a docker containers port. -


i'm new consul , docker please bear me if question seems vague.

i have multiple web services run in own docker containers. want use consul(by hashicorp) service discovery tool. consul agent runs on port 8500 default. running consul on host system docker containers running (because being service discovery tool cannot have each container have own consul) , docker service running in docker container interact 8500 port running on host system.

initially assumed using docker port forwarding (-p) work after trying below error

docker: error response daemon: driver failed programming external connectivity on endpoint practical_lamarr (dd21827e00a3218f9e090986c09f875a82yurd04b76d8a2528f0bccb854e05a3): error starting userland proxy: listen tcp 0.0.0.0:8500: bind: address in use.

can tell me how can consul running on host system port bound containers port.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -