0

I have built my docker java webapp image by adding war file to webapps folder of docker official tomcat image which is my base image in the dockerfile. I tested one small application and ran image. I can see pages in my web browser. But when i built another image by adding different war file. When i ran the image i can see tomcat running and in manager app i can see my project. But my jsp pages are not showing. I know there is something going wrong. Normally i check tomcat logs for error. But here my tomcat is running inside a docker container. When i run locate tomcat i saw its running inside this location.

/var/lib/docker/aufs/diff/c87241d8699b97e33dd37d3472cf87e3d289eaa479362dd77e4e6b9b5a767a98/usr/local/tomcat/

If i go inside and check logs, nothing registered. How can i check logs or where i can see errors are logged in docker? I need suggestions because i am not able to proceed further because of this issue.

Kadir
  • 1,664
  • 2
  • 19
  • 22
user2451997
  • 561
  • 3
  • 8
  • 16

1 Answers1

2

Check with the docker logs command what is happening in your container, see the doc http://docs.docker.com/reference/commandline/cli/#logs

and you can always enter your container with docker exec and do whatever you do to debug when your are not in a container, see the doc https://docs.docker.com/reference/commandline/cli/#exec

and check also what docker events has to say about your container or any container, see the doc http://docs.docker.com/reference/commandline/cli/#events

user2915097
  • 30,758
  • 6
  • 57
  • 59