Skip to content

Commit b10d1fb

Browse files
committed
edit
1 parent f6d2d55 commit b10d1fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/reference/compose-file/services.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,13 @@ If the value is `[]` (empty list) or `''` (empty string), the default command de
263263

264264
> [!NOTE]
265265
>
266-
> Unlike the `CMD` instruction in a Dockerfile, the `command` field doesn't automatically run within the context of the [`SHELL`](/reference/dockerfile/#shell-form) instruction defined in the image. If your `command` relies shell-specific features, such as environment variable expansion, you need to explicitly run it within a shell. For example:
266+
> Unlike the `CMD` instruction in a Dockerfile, the `command` field doesn't automatically run within the context of the [`SHELL`](/reference/dockerfile.md#shell-form) instruction defined in the image. If your `command` relies on shell-specific features, such as environment variable expansion, you need to explicitly run it within a shell. For example:
267267
>
268268
> ```yaml
269269
> command: /bin/sh -c 'echo "hello $$HOSTNAME"'
270270
> ```
271271
>
272-
> If the `entrypoint`, (or the image's `ENTRYPOINT`) is configured to invoke a shell, use the exec form syntax for `command` to ensure proper processing. For example:
272+
> If the `entrypoint` (or the image's `ENTRYPOINT`) is configured to invoke a shell, use the exec form syntax for `command` to ensure proper processing. For example:
273273
>
274274
> ```yaml
275275
> command: [ "bundle", "exec", "thin", "-p", "3000" ]

0 commit comments

Comments
 (0)