How to get tomcat log from docker container running in atomic host

I am working on Log monitoring, I have requirement of getting tomcat application server logs(example: catalina.log) running in the docker container(container is running in atomic host) and passing it to Logstash server using rsyslog.
I am able to get the docker container related logs, but not able to get the tomcat server and application logs from the docker container where tomcat is running.
Any suggestion on this is appreciated.

Thanks,
Praveen

  • All job data lost when running Jenkins in Docker and when Jenkins container is stopped
  • Docker + SSL + apache2 + x509
  • Where does Elixir/erlang fit into the microservices approach? [closed]
  • docker host rebooted automatically when running docker build/run
  • update running docker container
  • Docker Deamon on Debian 7 inappropriate ioctl for device
  • Docker volume mount doesn't exist
  • docker: having trouble running npm install after creating a new user
  • Where are docker images and containers stored when we use it with Windows?
  • Boot2docker i/o timeout when opening a new terminal session in MacOs X
  • Linux / Fedora sandboxing processes and filesystem changes
  • ImageMagick Go API HTTP Hangs on ReadImageBlob
  • One Solution collect form web for “How to get tomcat log from docker container running in atomic host”

    You could mount the local host when initializing the container. You just pass -v flag for mounting to the local host.

    docker run -v /tmp may/hello-world.py

    This will allow you to mount the directory of the tomcat logs to the local host.

    Here is the Docker Docs that talks about it.

    https://docs.docker.com/engine/userguide/containers/dockervolumes/

    -Bruce

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.