Added flag -restart-container to allow restarting of docker containers. #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continued from #24 (code is moved from master branch)
...
The main purpose of this patch is too be able to run docker-gen by itself in a container. Therefore I think it is vital that this functionality is built into docker-gen and not provided by an external dependency (script/program). The external dependency provides an additional tool to maintain (ensuring the docker end point is available, ensure API calls are up to date etc.) and package.
I would really like to see this patch accepted, as it would make docker-gen much more usable (certainly for me and cnf!).
I agree with the syntax being funky, and have thought a bit more about the additional flag, and perhaps it is the only way to go. If we can agree, I will rewrite the patch to include a new flag: -restart-container=CONTAINER_ID.
So either the flag or old flag, both or none can be specified and all behaves as it did before. If both are specified then it issues the restart and the notify.