SvenDowideit / dockerfiles

dockerfiles that I use
http://fosiki.com
MIT License
212 stars 60 forks source link

Ambassador fix to allow multiple ports #37

Closed gaborcsardi closed 8 years ago

gaborcsardi commented 8 years ago

The little shell script in the ambassador image breaks if there are multiple ports that need to be forwarded. The problem is that you have a wait after every socat line, and then the script stops running at the first wait and the other ports won't be forwarded.

This came up in the dokku-rabbitmq project, that exposes 4 ports using the ambassador image: https://github.com/dokku/dokku-rabbitmq/issues/27

This is the problematic line: https://github.com/SvenDowideit/dockerfiles/blob/5bfe59de304fe6f1489e42ddceb37bb980f38a9e/ambassador/Dockerfile#L19

My fix calls wait only once, after all socat processes have started in the background.

So I guess whether you want this fix depends on whether you want to support multiple ports. If not, then I suggest to document this somewhere, because it causes a lot of confusion and delay. :)

josegonzalez commented 8 years ago

Would be :+1: if we could get this in, as it breaks any dokku plugins that rely on the ambassador dockerfile.

sumanmukherjee03 commented 8 years ago

:+1: would be great to get this in

aidanhs commented 8 years ago

Sorry, this is my fault. Ping @SvenDowideit, I have a PR to fix the docker docs when this is merged.

SvenDowideit commented 8 years ago

I am getting too many notifications - sorry for the delay :(

SvenDowideit commented 8 years ago

LGTM - thank you!