From ab4f93d8287a269be0ad2a4b2935a1de1b8c6554 Mon Sep 17 00:00:00 2001 From: Micah Sandusky Date: Tue, 11 Dec 2018 19:10:39 +0000 Subject: [PATCH] adding a docker entrypointn script and changing the umask in the bashrc to fix issue #3 --- Dockerfile | 10 +++++++--- docker-entrypoint.sh | 12 ++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) mode change 100644 => 100755 Dockerfile create mode 100755 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 index 4f06a06..08608b4 --- a/Dockerfile +++ b/Dockerfile @@ -154,6 +154,10 @@ RUN apt-get clean \ && rm -rf $WNSCRIPTS -#ENTRYPOINT ["/code/katana/run_katana"] -ENTRYPOINT ["run_katana"] -CMD ["/bin/bash"] +# ENTRYPOINT ["/code/katana/run_katana"] +# ENTRYPOINT ["run_katana"] +# CMD ["/bin/bash"] +COPY ./docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh +RUN echo "umask 0002" >> /etc/bash.bashrc +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..93d28e9 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +run_katana='python3 /code/katana/scripts/run_katana' + +if [ $# -eq 0 ]; then + exec "/bin/bash" +else + echo "Running katana with" + echo "$@" + exec $run_katana "$@" +fi