From 1f02b65c63f2fc650311c45e67dd589d15c06dd0 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 12 Sep 2024 11:36:17 -0400 Subject: [PATCH] Document how entrypoint is configured in buildah config Fixes: https://github.com/containers/buildah/issues/5598 Signed-off-by: Daniel J Walsh --- docs/buildah-config.1.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/buildah-config.1.md b/docs/buildah-config.1.md index 43cadf2d7ce..ad40a1ea127 100644 --- a/docs/buildah-config.1.md +++ b/docs/buildah-config.1.md @@ -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 is appended to the `sh -c` command as the entrypoint. The array form +replaces entrypoint entirely. + +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