Originally created by @satyabratabharati on GitHub (Mar 16, 2022).
I have developed a tool which can monitor another container and provide the memory/cpu/disk statistics of a running container.
I need to pass the dockerID of a container as input to my program. But the issue is how do I know if the container being monitor is restated. in this case the dockerID has changed.
How do I know if a container is restarted and fetch the dockerID every time the container is starts/restart.
Originally created by @satyabratabharati on GitHub (Mar 16, 2022).
I have developed a tool which can monitor another container and provide the memory/cpu/disk statistics of a running container.
I need to pass the dockerID of a container as input to my program. But the issue is how do I know if the container being monitor is restated. in this case the dockerID has changed.
How do I know if a container is restarted and fetch the dockerID every time the container is starts/restart.
Hey @satyabratabharati, i hope you can understand that this repository is not ment to provide support for specific implementation-problems for Docker and also should not be used for that.
Nevertheless you may use a mount to the Docker socket for adding an event listener to changes of containers you listen to (e.g. like in the nginx reverse proxy) when a container is started/stopped with a specific env var value.
All the best for the implementation!
@mashb1t commented on GitHub (Mar 16, 2022):
Hey @satyabratabharati, i hope you can understand that this repository is not ment to provide support for specific implementation-problems for Docker and also should not be used for that.
Nevertheless you may use a mount to the Docker socket for adding an event listener to changes of containers you listen to (e.g. like in the nginx reverse proxy) when a container is started/stopped with a specific env var value.
All the best for the implementation!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @satyabratabharati on GitHub (Mar 16, 2022).
I have developed a tool which can monitor another container and provide the memory/cpu/disk statistics of a running container.
I need to pass the dockerID of a container as input to my program. But the issue is how do I know if the container being monitor is restated. in this case the dockerID has changed.
How do I know if a container is restarted and fetch the dockerID every time the container is starts/restart.
@welcome[bot] commented on GitHub (Mar 16, 2022):
Thanks for opening your first issue here!
@mashb1t commented on GitHub (Mar 16, 2022):
Hey @satyabratabharati, i hope you can understand that this repository is not ment to provide support for specific implementation-problems for Docker and also should not be used for that.
Nevertheless you may use a mount to the Docker socket for adding an event listener to changes of containers you listen to (e.g. like in the nginx reverse proxy) when a container is started/stopped with a specific env var value.
All the best for the implementation!