diff --git a/.gitignore b/.gitignore index 1c191ac..945ed42 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ vendor/ docker.lock bin/ !bin/dcv +!bin/entry_script.sh diff --git a/Dockerfile b/Dockerfile index beb5636..d101d8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,5 +19,5 @@ USER dcv VOLUME /input WORKDIR /input -ENTRYPOINT ["/dcv/bin/dcv"] +ENTRYPOINT ["/dcv/bin/entry_script.sh"] CMD ["render", "-m", "image", "-f"] diff --git a/bin/entry_script.sh b/bin/entry_script.sh new file mode 100755 index 0000000..c1159a2 --- /dev/null +++ b/bin/entry_script.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +set -e + +CURRENT_DIR=$(dirname $0) + +if [ "$1" = "render" ] +then + $("$CURRENT_DIR/dcv" "$@") +else + exec "$@" +fi