Docker Community Forums

Share and learn in the Docker community.

REST web service deployed to Docker will only give 404 errors

I have a simple REST web service with one endpoint that works when deployed to a local Tomcat 9.0.12 instance:



When I deploy it to Tomcat 9.0.16 in a Docker container all I get are 404 errors. Here is my command to deploy to Docker:

docker run -v /FULL_PATH_TO_PROJECT/target/ -it -p 8080:8080 tomcat:9.0.16-jre11

The output from Docker indicates that the .war file deployed correctly, and when I check with

sudo docker exec -it CONTAINER_NAME bash

I can see the deployment and logs/ directory with no problems indicated.

When I check with


I get a 404 error (same thing if I use the docker container IP address). If I do


I see the Tomcat splash screen for the dockerized version of Tomcat

What am I missing?

I ran into the same issue and couldn’t find any solution yet on this.
Did you by any chance got this figured out ?


I am having the same issue. Any solutions?