I am working on building a container for a very old version of JSPWiki so that we can remove it from an on-prem VM. When I build the image and just run it a daemon mode ( -d ), the application doesn’t start. But, if I run it interactively ( -it … /bin/bash ), I can execute the startup script and it runs as desired.
I’ve tried using --log-level “debug” to see if that would help and I get:
Using CATALINA_BASE: /usr/local/apache-tomcat-5.5.17
Using CATALINA_HOME: /usr/local/apache-tomcat-5.5.17
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.17/temp
Using JRE_HOME: /usr/lib/jvm/java-8-openjdk-amd64/jre
EBU[0000] Error resize: Error response from daemon: bad file descriptor: unknown
DEBU[0000] Error resize: Error response from daemon: bad file descriptor: unknown
DEBU[0000] [hijack] End of stdout
EBU[0002] Error resize: Error response from daemon: Container 27cc310ec3e249fb26ad9130b16f38ffa2ab8e9f3ca0295646e6779dcbcbdc1d is not running
The Dockerfile contains the following:
FROM ubuntu:latest
ENV TOMCAT_VER apache-tomcat-5.5.17
ENV TOMCAT_DIR /usr/local/$TOMCAT_VER
ENV TOMCAT_TAR $TOMCAT_VER.tar.gz
ENV WIKIFILES_DIR /apps/wikifiles
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jreCOPY $TOMCAT_TAR /tmp/
COPY JSPWiki.war /tmp/RUN apt-get update --allow-unauthenticated ; apt-get upgrade -y --allow-unauthenticated ;
apt-get install -y openjdk-8-jre --allow-unauthenticated ;
mkdir $TOMCAT_DIR ; tar xzvf /tmp/$TOMCAT_TAR -C /usr/local/ ;
groupadd -g 1000 tomcat ; useradd -g tomcat -d $TOMCAT_DIR -s /usr/sbin/nologin -u 1000 tomcat ;
mv /tmp/JSPWiki.war $TOMCAT_DIR/webapps ;
$TOMCAT_DIR/bin/startup.sh ; sleep 20 ; ps -ef | grep tomcat ;
sed -i -e ‘s//p/web/www-data/jspwiki///apps/wikifiles/g’ $TOMCAT_DIR/webapps/JSPWiki/WEB-INF/jspwiki.properties ;
mkdir -p $WIKIFILES_DIR ;
chown -R tomcat.tomcat $TOMCAT_DIR ;
chown -R tomcat.tomcat $WIKIFILES_DIR ;
rm -f /tmp/$TOMCAT_TARWORKDIR $TOMCAT_DIR
CMD $TOMCAT_DIR/bin/startup.sh
EXPOSE 8080
The above-mentioned errors were viewed by running:
docker --log-level “debug” run -it -v /home/dan/docker/wikipgmr/wikifiles:/apps/wikifiles -p 127.0.0.1:8080:8080 wikipgmr:1.2
The container itself is at dcarrington/wikitest:1.2
I appreciate any help or advice that can be offered.