Cannot instantiate docker image using tomcat:9.0.65-jdk17-temurin
aaditya8383 opened this issue · 2 comments
I am using official tomcat:9.0.65-jdk17-temurin
image from https://hub.docker.com/layers/tomcat/library/tomcat/9.0.65-jdk17-temurin/images/sha256-cc64730eb8cc23761987927379cddfb440711e5c15c60ae4012a9ad62bb6fefb?context=explore
and following is my Dockerfile -
FROM tomcat:9.0.65-jdk17-temurin
LABEL APP_NAME="MYAPP"
#Copying server.xml file
COPY my-build/server.xml /usr/local/tomcat/conf
COPY my-build/context.xml /usr/local/tomcat/conf
#Create a directory for SSL certificates
RUN mkdir -p /home/my_secrets
#Copying SSL certificates
COPY my-build/MyCertTrustStore.jks /home/my_secrets
#Copying the WAR file
COPY my-build/libs/my-lib.war /usr/local/tomcat/webapps
ENTRYPOINT ["catalina.sh", "run"]
the deployment is done via Jenkins Pipeline to an RHEL server.
RHEL Server Information:
# uname -a
Linux aadi-myserver-02.w3-969.mds.com 3.10.0-1160.71.1.el7.x86_64 #1 SMP Wed Jun 15 08:55:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
Docker Information (on RHEL Server):
# docker info
Client:
Debug Mode: false
Server:
Containers: 9
Running: 8
Paused: 0
Stopped: 1
Images: 22
Server Version: 19.03.14
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: local
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: ea765aba0d05254012b0b9e595e995c09186427f
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-1160.71.1.el7.x86_64
Operating System: Red Hat Enterprise Linux
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.66GiB
Name: aadi-myserver-02.w3-969.mds.com
ID: HIPE:HYBZ:H3AQ:CO6B:VSM6:REO6:AAOD:BYGG:DTUO:2YVW:ZJWT:53WO
Docker Root Dir: /monitoring/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: true
Failure while starting Docker container is -
# docker logs dec0151cb928
Cannot find /usr/local/tomcat/bin/setclasspath.sh
This file is needed to run this program
Cannot find /usr/local/tomcat/bin/setclasspath.sh
This file is needed to run this program
Cannot find /usr/local/tomcat/bin/setclasspath.sh
This file is needed to run this program
NOTE:
-
This is working fine with
tomcat:9.0.58-jdk17-temurin,
tomcat:9.0.58-jre17-temurin and
tomcat:9.0.58-jdk17-openjdk -
Surprisingly, above reported issue is not observed when we create an image using tomcat:9.0.65-jdk17-temurin and tomcat:9.0.65-jre17-temurin on Windows and Mac laptops.
Guys,
Before others jump to help, here is an update.
The issue is related to - #269
I have identified that my Windows and Mac laptops have Docker version 20.x whereas the RHEL machine had Docker 19.x
Therefore using a 'tomcat:9.0.65-jre17-temurin-focal' is a workaround for now but the larger goal ahead will be to upgrade Docker versions.
Kindly add comments and suggestions to increase my understanding..
Yeah looks like you're running into #269 (comment)
jammy
based images definitely require newer versions ofdocker
andlibseccomp
which is the issue here. So either update those packages on the hosts or use thefocal
based variants. See also tianon/docker-brew-ubuntu-core#236
The non-jammy variants should work fine for you 9.0.65-jdk17-corretto
or 9.0.65-jdk17-temurin-focal