Docker: Allow to use image like kas command
This adds a bit heuristic to the docker entrypoint in order to move our API towards "docker run [...] kasproject/kas build kas.yml" - without breaking existing users. And now you can also do docker run --rm kasproject/kas --version Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
ebc2fa7d92
commit
7bca825059
@ -29,7 +29,14 @@ fi
|
|||||||
|
|
||||||
cd /builder
|
cd /builder
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
|
case "$1" in
|
||||||
|
build|shell|-*)
|
||||||
|
exec $GOSU kas "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
exec $GOSU "$@"
|
exec $GOSU "$@"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
else
|
else
|
||||||
exec $GOSU bash
|
exec $GOSU bash
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user