added entry script

This commit is contained in:
Artur Wolny 2017-06-30 09:40:14 +02:00
parent 0f197f1251
commit e90b9c6c96
3 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ vendor/
docker.lock
bin/
!bin/dcv
!bin/entry_script.sh

View file

@ -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"]

12
bin/entry_script.sh Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env sh
set -e
CURRENT_DIR=$(dirname $0)
if [ "$1" = "render" ]
then
$("$CURRENT_DIR/dcv" "$@")
else
exec "$@"
fi