Anusha
Anusha

Reputation: 673

Docker image for tomcat 7.0.55

We have one of our Java projects with Tomcat 7.0.55 dependency, I have no liberty to upgrade this.

I want to run this in a container. But when I run, I get Apache Tomcat 7.0.55 not found in the browser.

In the official tomcat docker hub, I couldn't find this version, is it not supported? Do I have to create that image from scratch? If so, please point me to a good tutorial.

Here is my sample Dockerfile

FROM openjdk:7-jdk
COPY . /app
WORKDIR  /app
RUN javac ... # compilation step

EXPOSE 8088

FROM tomcat:8.0 # I Have tried 7.0.92-jre7 as well
WORKDIR /app
COPY --from=0 /app .
CMD  java ... # run the project

Any help is appreciated.

Thanks!

Upvotes: 1

Views: 4133

Answers (1)

VonC
VonC

Reputation: 1324103

As mentioned here, your Dockerfile should copy your war in the webapps folder of the Tomcat image, instead of trying to run it.

However, there is no tomcat 7.0.55: the first image was for 7.0.70.

You would need to try and build your own Tomcat image (using a similar tomcat Dockerfile) to be sure to run the exact Tomcat version you want.
See also "Dockerfile for tomcat" as an example.

Upvotes: 2

Related Questions