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

  • Php7 Redis Client on Alpine OS
  • How to remove port from docker container?
  • Can't access Heapster's InfluxDB port 8083
  • Elastic Beanstalk CLI - Not replacing instance on deploy
  • Docker Hub Login Without Password
  • Nginx Docker build failing on Ubuntu
  • docker: is it possible to run containers from an other container?
  • Docker network issue: Server misbehaving
  • Multiple static IPs for Docker containers
  • Docker localhost IP
  • Why are my non-volume data in Docker container persistence after restarting the container?
  • Pig `Failed to create DataStorage` to Hadoop cluster in Docker ENV
  • 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.