docker / docker/compose

A new lifecycle hook which executes after service becomes healthy

Open
#13,203 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Go
Stars
38.2k
Forks
5.8k
Avg merge
2d 14h
Merged PRs (30d)
55

Description

Description

Hello there!

Not sure about the idea because I don't have the whole background behind lifecycle hooks.

I have use cases where I need to run a command with specific user/env after initialization, i.e. when the container is healthy. Doing so with external tools feels hackish; lifecycle hooks feels elegant to me in that case.

post_start probably shouldn't wait for healthiness when used as an entrypoint, right? So it could be either another hook or an option.

Do you think it could be a relevant, general use case? If so, what approach would you prefer?

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reviewing the existing lifecycle-hook behavior, especially post_start and entrypoint handling, alongside how service healthiness is determined. Done would require an agreed approach and clearly defined semantics for a hook that runs after a container becomes healthy.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.