Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions compose/compose-file/compose-file-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,21 +738,19 @@ options and tags it with the specified tag.
> [Added in version 2.2 file format](compose-versioning.md#version-22).

Run an init inside the container that forwards signals and reaps processes.
Either set a boolean value to use the default `init`, or specify a path to
a custom one.
Set this option to `true` to enable this feature for the service.

version: "{{ site.compose_file_v2 }}"
services:
web:
image: alpine:latest
init: true

> The default init binary that is used is [Tini](https://github.com/krallin/tini),
> and is installed in `/usr/libexec/docker-init` on the daemon host. You can
> configure the daemon to use a custom init binary through the
> [`init-path` configuration option](/engine/reference/commandline/dockerd/#daemon-configuration-file).

version: "{{ site.compose_file_v2 }}"
services:
web:
image: alpine:latest
init: /usr/libexec/docker-init

### isolation

Expand Down
14 changes: 5 additions & 9 deletions compose/compose-file/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,7 @@ options and tags it with the specified tag.
> [Added in version 3.7 file format](compose-versioning.md#version-37).

Run an init inside the container that forwards signals and reaps processes.
Either set a boolean value to use the default `init`, or specify a path to
a custom one.
Set this option to `true` to enable this feature for the service.

```yaml
version: "{{ site.compose_file_v3 }}"
Expand All @@ -1266,13 +1265,10 @@ services:
init: true
```

```yaml
version: '2.2'
services:
web:
image: alpine:latest
init: /usr/libexec/docker-init
```
> The default init binary that is used is [Tini](https://github.com/krallin/tini),
> and is installed in `/usr/libexec/docker-init` on the daemon host. You can
> configure the daemon to use a custom init binary through the
> [`init-path` configuration option](/engine/reference/commandline/dockerd/#daemon-configuration-file).

### isolation

Expand Down