Reputation: 65
One of the java application running in a docker container require java 1.8 but the container has java 1.7 . Right now it is failing with the error "Unsupported major.minor version 52.0"
The dockerfile content is
FROM tomcat:8.0
COPY webapps/abc /usr/local/tomcat/webapps/abc
COPY webapps/*.war /usr/local/tomcat/webapps/
#COPY ...........
COPY tomcat-users.xml /usr/local/tomcat/conf/
COPY server.xml /usr/local/tomcat/conf/
I tried to use another base image "FROM tomcat:8.5.51-jdk8-openjdk " but getting errors with xdx parser.
How can I install/upgrade to the java version 1.8 on that container. I am a DOTNET-Windows guy. One of the lab that our company acquired has this application. The original dev team is not available now. Any help in this regarded is much appreciated.
Upvotes: 0
Views: 1948
Reputation: 1661
According to
this image is indeed using java 7u181.
I would recommend to upgrade your tomcat docker container to 8.5 or 9 which come with newer jdk versions. Tomcat 8.0 is from mid 2018 and outdated. Jdk 7 and also jdk 8 are already legacy software and should not be used any more, too.
Upvotes: 0
Reputation: 950
Maybe you do not want to hear this, but the best way is that you change the base image and not try to modify the original for that purpose. Perhaps is better solve the trouble with the parser that you mentioned.
Did you try use the base image tomcat:8.0-jre8, is exactly the same that tomcat:8.0 but with with jre8. This base image didn't change de minor version number and likely you will not have the problem with the parser.
Upvotes: 5