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:
Jan Kiszka 2018-07-17 21:56:13 +02:00 committed by Daniel Wagner
parent ebc2fa7d92
commit 7bca825059

View File

@ -29,7 +29,14 @@ fi
cd /builder
if [ -n "$1" ]; then
exec $GOSU "$@"
case "$1" in
build|shell|-*)
exec $GOSU kas "$@"
;;
*)
exec $GOSU "$@"
;;
esac
else
exec $GOSU bash
fi