From e90b9c6c962fa1a7d1d0051fb2f35e81cb5d341b Mon Sep 17 00:00:00 2001 From: Artur Wolny Date: Fri, 30 Jun 2017 09:40:14 +0200 Subject: [PATCH] added entry script --- .gitignore | 1 + Dockerfile | 2 +- bin/entry_script.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 bin/entry_script.sh 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