Docker CentOS 7 cannot write to /var/logs/

I am trying to create an ELK container on CentOS which runs fine, however, no logs are created and I dunno why, my guess it is because of the SELinux, however, the Docker log is empty (nothing which suggests this).

I am mounting the directory as follows: /var/logs:/var/logs:Z

  • getting python and react component based container to work
  • cant start SonarQube docker container via Marathon with port mapping
  • Docker with WebHDFS
  • How to prevent docker containers from consuming all CPU?
  • trapping signal from “docker stop” in bash
  • Migrating Established TCP connection with docker containers
  • What I am doing wrong? Please help

  • Run `docker-php-ext-install` FROM container other than php
  • Having nosetests watch files from outside container and rerun tests inside container
  • Can't get remote Hazelcast client to connect to cluster running in docker containers
  • Create new MongoDB instance based on existing data
  • Docker with pm2-docker app not accessible
  • Docker Nginx 502 Bad Gateway ipv6
  • 2 Solutions collect form web for “Docker CentOS 7 cannot write to /var/logs/”

    We have resolved this issue by passing –privileged argument at the runtime of the container

    If you have SELinux enabled, then it must be reason you cannot write into that folder.

    Check your /var/log/audit/audit.log for SELinux logs.

    For instance, you could execute the following command in order to get reports about SELinux denies:

    sealert -a /var/log/audit/audit.log

    It will tell you what to do to allow any missing privileges.

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