Loading docker/Dockerfile +18 −12 Original line number Diff line number Diff line Loading @@ -17,13 +17,6 @@ ENV HOME /root RUN apt-get -y update \ && apt-get -y install apt-utils unzip ENV WEBAPP_DIR=/webapps/vlkb-siav2 RUN mkdir -p ${WEBAPP_DIR} ARG VLKB_VERSION COPY vlkb-siav2-${VLKB_VERSION}.war ${WEBAPP_DIR}/ RUN cd ${WEBAPP_DIR} && unzip vlkb-siav2-${VLKB_VERSION}.war # Tomcat must load postgresql DB driver, vlkb-siav2 does not explicitely load it COPY deps/postgresql-*.jar ${CATALINA_BASE}/lib/ Loading @@ -37,17 +30,30 @@ COPY deps/setenv.sh ${CATALINA_BASE}/bin/ WORKDIR ${CATALINA_BASE} RUN chmod -R a+rwX conf # enable config at start-up RUN chmod a+rw ${WEBAPP_DIR}/WEB-INF/web.xml \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/search.properties \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/formatresponsefilter.properties # set default env DISCOVERY_CONTEXT_ROOT=datasets # configure during start-up COPY start-siav2.sh /root # create empty to be able to volume-bind at start-up ENV STARTUP_LOG=/tmp/start-siav2.log RUN echo " " > ${STARTUP_LOG} # install webapp ENV WEBAPP_DIR=/webapps/vlkb-siav2 RUN mkdir -p ${WEBAPP_DIR} ARG VLKB_VERSION COPY vlkb-siav2-${VLKB_VERSION}.war ${WEBAPP_DIR}/ RUN cd ${WEBAPP_DIR} && unzip vlkb-siav2-${VLKB_VERSION}.war # enable config at start-up RUN chmod a+rw ${WEBAPP_DIR}/WEB-INF/web.xml \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/search.properties \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/formatresponsefilter.properties # run RUN chmod +rx /root && chmod +rx /root/start-siav2.sh Loading docker/start-siav2.sh +2 −3 Original line number Diff line number Diff line #!/bin/bash set +e set -eux { date whoami env # configure CONTEXT_ROOT Loading Loading @@ -38,7 +37,7 @@ sed -i "s/.*DbObstap\.level.*=.*/DbObstap.level = $DBG_LEVEL/g" $CATALINA_BASE/c ################################################################### date } 1> /tmp/start-siav2.log 2>&1 } 1> $STARTUP_LOG $CATALINA_HOME/bin/catalina.sh run Loading
docker/Dockerfile +18 −12 Original line number Diff line number Diff line Loading @@ -17,13 +17,6 @@ ENV HOME /root RUN apt-get -y update \ && apt-get -y install apt-utils unzip ENV WEBAPP_DIR=/webapps/vlkb-siav2 RUN mkdir -p ${WEBAPP_DIR} ARG VLKB_VERSION COPY vlkb-siav2-${VLKB_VERSION}.war ${WEBAPP_DIR}/ RUN cd ${WEBAPP_DIR} && unzip vlkb-siav2-${VLKB_VERSION}.war # Tomcat must load postgresql DB driver, vlkb-siav2 does not explicitely load it COPY deps/postgresql-*.jar ${CATALINA_BASE}/lib/ Loading @@ -37,17 +30,30 @@ COPY deps/setenv.sh ${CATALINA_BASE}/bin/ WORKDIR ${CATALINA_BASE} RUN chmod -R a+rwX conf # enable config at start-up RUN chmod a+rw ${WEBAPP_DIR}/WEB-INF/web.xml \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/search.properties \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/formatresponsefilter.properties # set default env DISCOVERY_CONTEXT_ROOT=datasets # configure during start-up COPY start-siav2.sh /root # create empty to be able to volume-bind at start-up ENV STARTUP_LOG=/tmp/start-siav2.log RUN echo " " > ${STARTUP_LOG} # install webapp ENV WEBAPP_DIR=/webapps/vlkb-siav2 RUN mkdir -p ${WEBAPP_DIR} ARG VLKB_VERSION COPY vlkb-siav2-${VLKB_VERSION}.war ${WEBAPP_DIR}/ RUN cd ${WEBAPP_DIR} && unzip vlkb-siav2-${VLKB_VERSION}.war # enable config at start-up RUN chmod a+rw ${WEBAPP_DIR}/WEB-INF/web.xml \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/search.properties \ && chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/formatresponsefilter.properties # run RUN chmod +rx /root && chmod +rx /root/start-siav2.sh Loading
docker/start-siav2.sh +2 −3 Original line number Diff line number Diff line #!/bin/bash set +e set -eux { date whoami env # configure CONTEXT_ROOT Loading Loading @@ -38,7 +37,7 @@ sed -i "s/.*DbObstap\.level.*=.*/DbObstap.level = $DBG_LEVEL/g" $CATALINA_BASE/c ################################################################### date } 1> /tmp/start-siav2.log 2>&1 } 1> $STARTUP_LOG $CATALINA_HOME/bin/catalina.sh run