-
Notifications
You must be signed in to change notification settings - Fork 0
Access your services on localhost
Olivier Berthonneau edited this page Jul 17, 2016
·
1 revision
While in production you will want to expose only the necessary ports to the outside world, in development opening is the key to avoid spending time in docker file configuration.
In your docker-compose-dev.yml
, add the following instruction to all your services:
network_mode: host
This will run your container on the host's network, skipping the sub network configuration and port binding.
Be careful however that your application is ready to deal with it. If you have hard-coded value of other services hostname in your code, we might want to look at environment variables to configure this.