Merge pull request #19 from artospaj/feature/entry-script

Bash-scripting-enabling entry script.
This commit is contained in:
Julien BIANCHI 2017-07-12 16:16:04 +02:00 committed by GitHub
commit cb072b3711
3 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View file

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

View file

@ -19,5 +19,5 @@ USER dcv
VOLUME /input VOLUME /input
WORKDIR /input WORKDIR /input
ENTRYPOINT ["/dcv/bin/dcv"] ENTRYPOINT ["/dcv/bin/entry_script.sh"]
CMD ["render", "-m", "image", "-f"] 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