docker-gen icon indicating copy to clipboard operation
docker-gen copied to clipboard

Allow docker-gen to be used as a library

Open md5 opened this issue 10 years ago • 3 comments
trafficstars

As discussed briefly at https://github.com/jwilder/docker-gen/pull/130 and https://github.com/jwilder/nginx-proxy/pull/254, it could be beneficial to restructure docker-gen to be usable both as a standalone binary and as an embedded library.

I'm opening this issue as a place to discuss the details of such a change.

md5 avatar Oct 30 '15 15:10 md5

+1 I would like to make a plugin to another go app so it can reconfigure itself.

captncraig avatar Oct 31 '15 01:10 captncraig

I would love an api that notifies me anytime the set of running containers changes. Perhaps I can provide a callback that will receive []*RunningContainer anytime something new happens, or on an interval.

captncraig avatar Oct 31 '15 04:10 captncraig

FYI, I've started some work on this change here: https://github.com/appropriate/docker-gen/tree/generator

It's currently not compiling due to being in an intermediate state. I still need to figure out how to deal with the GeneratorConfig struct and I haven't had time to work on this in the last week.

md5 avatar Nov 09 '15 17:11 md5