iamdork / compose

Command line replacement for docker-compose, adding dork magics.
MIT License
2 stars 2 forks source link

[Proxy] Don't remove every exposed port. #7

Closed sepal closed 8 years ago

sepal commented 8 years ago

Currently the proxy plugin removes every exposed port, regardless if they are proxied or not. Sometimes, especially when working from a local machine, you may wan't to expose a spefic port though. In my case I would like to export the postgres port, so that i can use pycharm to connect to the database directly instead of using a somehting like phppgadmin (haven't found a good image for that yet).

This pull request fixes the issue, by removing only the ports the where exposed to the proxy.

pmelab commented 8 years ago

Starting a second instance of this setup will fail, because the port is already bound. And if you are running only one instance at a time, you don't need a proxy.

The removal of all exposed ports is there to avoid clashes, and should stay the default behavior. But perhaps we find another solution. Whitelisting certain ports by configuration or switching non-proxied ports to dynamic port mappings.

sepal commented 8 years ago

Currently dork-compose proxies every port which is specified with an external and an internal port. This means only ports where only the internal port is specified are not proxied and docker assigns a random external port to them. Therefore there should be no claches.

pmelab commented 8 years ago

Sorry, thats true.