Skip to content

Commit

Permalink
Document how entrypoint is configured in buildah config
Browse files Browse the repository at this point in the history
Fixes: #5598

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Sep 12, 2024
1 parent 18d09f0 commit 8deea29
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/buildah-config.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,28 @@ ignore the `cmd` value of the container image. However if you use the array
form, then the cmd will be appended onto the end of the entrypoint cmd and be
executed together.

Note: The string form will be added executed via `sh -c`, where the array form
will not use the containers shell.

String Format:
```
$ buildah from scratch
$ buildah config --entrypoint "/usr/bin/notashell" working-container
$ buildah inspect --format '{{ .OCIv1.Config.Entrypoint }}' working-container
[/bin/sh -c /usr/bin/notshell]
$ buildah inspect --format '{{ .Docker.Config.Entrypoint }}' working-container
[/bin/sh -c /usr/bin/notshell]
```

Array Format:
```
$ buildah config --entrypoint '["/usr/bin/notashell"]' working-container
$ buildah inspect --format '{{ .OCIv1.Config.Entrypoint }}' working-container
[/usr/bin/notashell]
$ buildah inspect --format '{{ .Docker.Config.Entrypoint }}' working-container
[/usr/bin/notashell]
```

**--env**, **-e** *env[=value]*

Add a value (e.g. env=*value*) to the environment for containers based on any
Expand Down

0 comments on commit 8deea29

Please sign in to comment.