docker-library/tomcat

Latest image incompatible with old versions of docker engine ?

thomasmarech opened this issue · 7 comments

Hi,
With the latest images of tomcat:9-jdk8 and tomcat:9-jdk17 we are facing issues when deploying the container on servers running old versions of docker engine (ie. Docker version 18.09.7, build 2d0083d).
The container fails to start with the following error:

docker run -it --rm -p 8888:8080 tomcat:9-jdk17
Cannot find /usr/local/tomcat/bin/setclasspath.sh
This file is needed to run this program

Image is running on newer versions of docker engine (ie. Docker version 20.10.11, build dea9396)
Are you aware of any incompatibility ?

Thanks
Thomas

Somewhere after focal, the docker image contains bash 5.1.16, which seems to use an internal [ (aka test) rather than /bin/[ or /usr/bin/[ - this one seems to have broken -r, -w and -x.

At this moment I'm bisecting to see where the problem lies.

Workaround:
alias [=/usr/bin/[
or the slightly better readable
alias '['=/usr/bin/test

It's not bash itself, a built-from-source 5.1.16 on focal works fine (also after moving /usr/bin/[ out of the way).

@thomasmarech Falling back to Focal did the trick for me. Luckily there're Focal versions available: tomcat:9-jdk8-temurin-focal and tomcat:9-jdk17-temurin-focal.

Ok, just did a jammy install from scratch (in Virtualbox)- there everything is fine.

I.e., something is wrong with the docker image (built by dockerhub) specifically. I'll let them sort that out by themselves.

Note that the ubuntu/apache2 image (built by Canonical (aka Ubuntu)) suffers from the same issue, but possibly that is based on the dockerhub-built image.

jammy based images definitely require newer versions of docker and libseccomp which is the issue here. So either update those packages on the hosts or use the focal based variants. See also tianon/docker-brew-ubuntu-core#236

@yosifkit Confirmed, at least for the test in ubuntu:latest. Thanks for that.

Time to update dockerd everywhere...

getting this error like : Cannot find /usr/local/tomcat/bin/setclasspath.sh
This file is needed to run this program
during tomcat container installtion