Is this a docs issue?
Type of issue
Information is incorrect
Description
The doc describing the lifecycle provides completely irrelevant examples.
The post-start hook cannot be used to fix a volume permissions because there is no guarantee that it will finish before a containerized application starts.
The pre-stop hook example offers to use it for flushing caches. Taking into account that "these hooks won't run if the container stops by itself or gets killed suddenly", it doesn't make sense to flush caches in the hook because: 1) if a "normal" container stop is ok, then caches are already flushed by a containerized application; 2) if the container gets killed, then the hook will be skipped anyway.
These inaccuracies make the lifecycle feature look like doubtful...
Thank you!
Location
https://docs.docker.com/compose/how-tos/lifecycle/
Suggestion
No response
Is this a docs issue?
Type of issue
Information is incorrect
Description
The doc describing the lifecycle provides completely irrelevant examples.
The
post-starthook cannot be used to fix a volume permissions because there is no guarantee that it will finish before a containerized application starts.The
pre-stophook example offers to use it for flushing caches. Taking into account that "these hooks won't run if the container stops by itself or gets killed suddenly", it doesn't make sense to flush caches in the hook because: 1) if a "normal" container stop is ok, then caches are already flushed by a containerized application; 2) if the container gets killed, then the hook will be skipped anyway.These inaccuracies make the lifecycle feature look like doubtful...
Thank you!
Location
https://docs.docker.com/compose/how-tos/lifecycle/
Suggestion
No response