Skip to content

spec clarifications#25601

Merged
aevesdocker merged 1 commit into
docker:mainfrom
aevesdocker:pre-start-spec-clarifications
Jul 20, 2026
Merged

spec clarifications#25601
aevesdocker merged 1 commit into
docker:mainfrom
aevesdocker:pre-start-spec-clarifications

Conversation

@aevesdocker

Copy link
Copy Markdown
Contributor

Description

Related issues or tickets

Reviews

  • Technical review
  • Editorial review
  • Product review

Signed-off-by: aevesdocker <allie.sadler@docker.com>
@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit c22a423
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a5dfce96cd02100087544ab
😎 Deploy Preview https://deploy-preview-25601--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the area/compose Relates to docker-compose.yml spec or docker-compose binary label Jul 20, 2026

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION

- `per_replica: false`: Whether the step runs once for the service as a whole before any replica starts.

A `pre_start` container joins the same networks as the service, so it can reach services declared in `depends_on`, and shares the service's declared volume mounts so files it produces in a shared volume are visible to the service. With `per_replica: false` and a scaled service, only mounts that are shared across replicas (named volumes, bind mounts) are usable. Per-instance mounts (`tmpfs`, anonymous volumes) cannot be addressed by a single run.
`pre_start` steps only run once the service's `depends_on` conditions have been satisfied, so a step can rely on those dependencies the same way the main service command does. A`pre_start` container joins the same networks as the service, so it can reach services declared in `depends_on`, and shares the service's declared volume mounts so files it produces in a shared volume are visible to the service.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] Missing space before inline code span

The text reads Apre_start — there is no space between "A" and the opening backtick. In rendered Markdown this will either break the code span or display as a typographical error. It should read `A `pre_start.

A `pre_start` step that has already succeeded for its current definition is not re-run on a subsequent `up`, nor when the service container restarts under its `restart` policy. A step runs again when its definition changes, when the previous run did not succeed, or when the service is recreated.
With `per_replica: false` and a scaled service, only mounts that are shared across replicas (named volumes, bind mounts) are usable. Per-instance mounts (`tmpfs`, anonymous volumes) cannot be addressed by a single run. This is not an error. The steps run without access to per-instance mounts. Data a `per_replica: false` step must share with the service belongs in a named volume or bind mount.

A `pre_start` step that has already succeeded for its current definition is not re-run on a subsequent `up`, nor when the service container restarts under its `restart` policy. A step runs again when its definition changes, when the previous run did not succeed, or when the service is recreated. For example, after a change to the service configuration or an explicit forced recreation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] Sentence fragment

"For example, after a change to the service configuration or an explicit forced recreation." is a sentence fragment — it has no subject or main verb. Consider merging it with the preceding sentence:

A step runs again when its definition changes, when the previous run did not succeed, or when the service is recreated — for example, after a change to the service configuration or an explicit forced recreation.

@akristen akristen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice quick fixes, lgtm

@aevesdocker
aevesdocker marked this pull request as ready for review July 20, 2026 12:35
@aevesdocker
aevesdocker merged commit 6bdcc9d into docker:main Jul 20, 2026
19 checks passed

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION

Two medium-severity issues found in the newly added clarifications: a missing space before an inline code span (rendering issue) and a sentence fragment appended after a full stop.

- `per_replica: false`: Whether the step runs once for the service as a whole before any replica starts.

A `pre_start` container joins the same networks as the service, so it can reach services declared in `depends_on`, and shares the service's declared volume mounts so files it produces in a shared volume are visible to the service. With `per_replica: false` and a scaled service, only mounts that are shared across replicas (named volumes, bind mounts) are usable. Per-instance mounts (`tmpfs`, anonymous volumes) cannot be addressed by a single run.
`pre_start` steps only run once the service's `depends_on` conditions have been satisfied, so a step can rely on those dependencies the same way the main service command does. A`pre_start` container joins the same networks as the service, so it can reach services declared in `depends_on`, and shares the service's declared volume mounts so files it produces in a shared volume are visible to the service.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] Missing space before inline code span: 'Apre_start' should be 'A pre_start'

The new sentence reads ...the same way the main service command does. Apre_start container joins... — there is no space between A and the opening backtick. In rendered Markdown this will display as A followed by inline code, running them together visually. Add a space so it reads A pre_start container joins….

A `pre_start` step that has already succeeded for its current definition is not re-run on a subsequent `up`, nor when the service container restarts under its `restart` policy. A step runs again when its definition changes, when the previous run did not succeed, or when the service is recreated.
With `per_replica: false` and a scaled service, only mounts that are shared across replicas (named volumes, bind mounts) are usable. Per-instance mounts (`tmpfs`, anonymous volumes) cannot be addressed by a single run. This is not an error. The steps run without access to per-instance mounts. Data a `per_replica: false` step must share with the service belongs in a named volume or bind mount.

A `pre_start` step that has already succeeded for its current definition is not re-run on a subsequent `up`, nor when the service container restarts under its `restart` policy. A step runs again when its definition changes, when the previous run did not succeed, or when the service is recreated. For example, after a change to the service configuration or an explicit forced recreation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] 'For example…' is a sentence fragment

The appended text For example, after a change to the service configuration or an explicit forced recreation. has no main verb, making it a fragment. Consider integrating it into the preceding sentence, for example:

A step runs again when its definition changes, when the previous run did not succeed, or when the service is recreated — for example, after a change to the service configuration or an explicit forced recreation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compose Relates to docker-compose.yml spec or docker-compose binary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants