jwilder / docker-register

Service registration for docker containers
197 stars 74 forks source link

Ignore unmapped exposed ports #5

Closed bettse closed 8 years ago

bettse commented 9 years ago

I have some images from third parties that have EXPOSE lines in their Dockerfile, and I haven't yet seen anything online to 'un-expose' them. Since they have more than 1 port exposed (but, say, only a single port mapped), docker-register doesn't work with them.

I have only 'Hello World' level experience with Go, but looking through the source of docker-register and docker-gen, I wondered if changing "Addresses" in the template to "PublishedAddresses" (https://github.com/jwilder/docker-register/blob/master/etcd.tmpl#L30) would fix this, and if it would do so without breaking existing uses of docker-register?

jwilder commented 9 years ago

I think running docker-gen w/ -only-published along w/ using PublishedAddresses might be the way to fix this.

bettse commented 9 years ago

That seems simple enough, shall I create a PR for it?