10

I am using docker container/image here. After running the docker container, everything is OK. but if I run /usr/local/tomcat/bin# ./catalina.sh stop or /usr/local/tomcat/bin# ./shutdown.sh, the running docker container will stop and exit.

Why? How to change it?

Thanks. Any comment welcomed.

ShaharT
  • 442
  • 5
  • 13
BAE
  • 8,550
  • 22
  • 88
  • 171

1 Answers1

7

This is by definition, see https://github.com/docker-library/tomcat/blob/master/Dockerfile.template in which the latest line is CMD ["catalina.sh", "run"]

Once you manually do catalina stop you cause the above CMD to terminate, hence the container stops.

ShaharT
  • 442
  • 5
  • 13