diff --git a/Dockerfile b/Dockerfile index 5872caa1..20ccac69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ MAINTAINER Peter@ramm-oberhermsdorf.de WORKDIR /opt/panorama COPY Panorama.war run_Panorama_docker.sh /opt/panorama/ +RUN mkdir /var/opt/panorama #RUN echo "Europe/Berlin" > /etc/timezone; dpkg-reconfigure -f noninteractive tzdata EXPOSE 8080 CMD /opt/panorama/run_Panorama_docker.sh diff --git a/run_Panorama_docker.sh b/run_Panorama_docker.sh index a40151e8..2375f10a 100755 --- a/run_Panorama_docker.sh +++ b/run_Panorama_docker.sh @@ -7,11 +7,13 @@ export PANORAMA_HOME=$PWD export HTTP_PORT=8080 # Writable directory for work area, usage-log and client_info-store, used by Panorama internally -export PANORAMA_VAR_HOME=$PANORAMA_HOME +export PANORAMA_VAR_HOME=/var/opt/panorama # Remove all possible old work areas rm -rf $PANORAMA_VAR_HOME/work +echo "Starting Panorama at $PANORAMA_HOME, variable data is stored at $PANORAMA_VAR_HOME" + # Ensure existence of work dir mkdir -p $PANORAMA_VAR_HOME/work @@ -36,7 +38,7 @@ java -Xmx${MAX_JAVA_HEAP_SPACE_MB}m \ -XX:ReservedCodeCacheSize=80M \ -Djruby.compile.fastest=true \ -Djruby.compile.threadless=true \ - -Djava.io.tmpdir=./work \ + -Djava.io.tmpdir=$PANORAMA_VAR_HOME/work \ -Dwarbler.port=$HTTP_PORT \ -jar $PANORAMA_HOME/Panorama.war