onFailure hooks? #115
Unanswered
agardnerIT
asked this question in
Q&A
Replies: 1 comment
-
Currently, Dev Container spec does not provide a built-in way to hook into the failure event of a container creation. However, you can achieve this by using Docker event monitoring and a script to send a cloudevent when a container fails to start. Here is a high-level approach:
Here is a simple example using a bash script:
This script will monitor Docker events and print a message when a container fails to start. You can replace the echo command with your code to send a cloudevent. Please note that this is a workaround and might not cover all scenarios. For a more robust solution, you might need to use a Docker monitoring tool or service. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to hook into the failure event for a devcontainer? I'd like to send a cloudevent if a container creation fails.
Beta Was this translation helpful? Give feedback.
All reactions