Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen for network (dis)connect events (API v1.22+) #190

Open
AHelper opened this issue May 8, 2016 · 1 comment · May be fixed by #610
Open

Listen for network (dis)connect events (API v1.22+) #190

AHelper opened this issue May 8, 2016 · 1 comment · May be fixed by #610

Comments

@AHelper
Copy link
Contributor

AHelper commented May 8, 2016

If a container's network config changes, docker-gen should trigger the generator.

  • v1.20 and below don't support networks
  • v1.21 supports networks but has no events for network config changing
  • v1.22+ supports network events (and container update event, not sure what exactly triggers that)

Right now, v1.20+ needs either an interval, a restart of docker-gen, or a restart of the changed container.

@outdooracorn
Copy link

This feature would be really helpful for me. I'm wanting to use nginx-proxy with several different docker compose projects. Currently, the process would be:

  • Start the nginx-proxy container
  • Start one of the docker compose projects (docker compose up -d)
    • This triggers the config to be recreated, but due to the nginx-proxy container and the docker compose project containers not (yet) being on the same network it only results in # Cannot connect to network 'NAME_OF_NETWORK' of this container comments being created
  • Attach the network created by docker compose to the nginx-proxy container (docker network connect ...)
  • Restart the nginx-proxy container to force docker-gen to recreate and reload the config

I'm hoping to avoid the last step and think that docker-gen listening for changes to the nginx-proxy container would solve this. Starting the docker compose project before the nginx-proxy container isn't possible for me, as each project is created and destroyed at different times.

@buchdag, any chance of adding this feature?
Thanks

@buchdag buchdag linked a pull request May 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants