Skip to content

Commit 1726789

Browse files
committed
ENGDOCS-2282
1 parent 2d8475d commit 1726789

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

content/manuals/compose/how-tos/lifecycle.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ desription: How to use lifecycle hooks with Docker Compose
66
keywords: cli, compose, lifecycle, hooks reference
77
---
88

9+
{{< introduced compose 2.30.0 "../releases/release-notes.md#2300" >}}
10+
911
## Services lifecycle hooks
1012

1113
When Docker Compose runs a container, it uses two elements,

content/reference/compose-file/services.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,9 +1507,11 @@ ports:
15071507

15081508
## post_start
15091509

1510+
{{< introduced compose 2.30.0 "../../manuals/compose/releases/release-notes.md#2300" >}}
1511+
15101512
`post_start` defines a sequence of lifecycle hooks to run after a container has started. The exact timing of when the command is run is not guaranteed.
15111513

1512-
- `command`: The command to run after the container has started. This attribute is required.
1514+
- `command`: Specifies the command to run once the container starts. This attribute is required, and you can choose to use either the shell form or the exec form.
15131515
- `user`: The user to run the command. If not set, the command is run with the same user as the main service command.
15141516
- `privileged`: Lets the `post_start` command run with privileged access.
15151517
- `working_dir`: The working directory in which to run the command. If not set, it is run in the same working directory as the main service command.

0 commit comments

Comments
 (0)