This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/docker-entrypoint.sh
m.nabokikh 3241fd4ae2 Move downloading gomplate to separate stage
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2021-01-29 13:48:40 +04:00

27 lines
489 B
Bash
Executable file

#!/bin/sh -e
### Usage: /docker-entrypoint.sh <command> <args>
command=$1
case "$command" in
serve)
for file_candidate in $@ ; do
if test -f "$file_candidate"; then
tmpfile=$(mktemp /tmp/dex.config.yaml-XXXXXX)
gomplate -f "$file_candidate" -o "$tmpfile"
args="${args} ${tmpfile}"
else
args="${args} ${file_candidate}"
fi
done
exec dex $args
;;
--help|-h|version)
exec dex $@
;;
*)
exec $@
;;
esac