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
What I am doing wrong? Please help
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.