diff --git a/Dockerfile b/Dockerfile index db4517c..0953068 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ ARG ISSO_VER=0.12.2 ENV GID=1000 UID=1000 +COPY run.sh /usr/local/bin/run.sh + RUN apk -U upgrade \ && apk add -t build-dependencies \ python3-dev \ @@ -18,16 +20,13 @@ RUN apk -U upgrade \ tini \ && pip3 install --no-cache "isso==${ISSO_VER}" \ && apk del build-dependencies \ + && chmod +x /usr/local/bin/run.sh \ && rm -rf /tmp/* /var/cache/apk/* -COPY run.sh /usr/local/bin/run.sh - -RUN chmod +x /usr/local/bin/run.sh - EXPOSE 8080 VOLUME /db /config LABEL maintainer="Wonderfall " -CMD ["run.sh"] +CMD ["run.sh"] \ No newline at end of file diff --git a/run.sh b/run.sh index 7b6416a..c06a36e 100644 --- a/run.sh +++ b/run.sh @@ -1,3 +1,9 @@ #!/bin/sh chown -R $UID:$GID /db /config -exec su-exec $UID:$GID /sbin/tini -- isso -c /config/isso.conf run +CONFIGFILE=/config/isso.conf +if test -f "$CONFIGFILE"; then + exec su-exec $UID:$GID /sbin/tini -- isso -c $CONFIGFILE run +else + echo "The configuration file $CONFIGFILE was not found." + exit +fi