Why would I need to run docker privileged to access host log4j2.yaml

I’ve got a centos 7 image in a centos 7 host.
My entrypoint uses -Dlog4j.configurationFile=file:/opt/foo/bar/log4j2.yaml
I use a -v switch to share /home/fooser/log4j2.yaml:/opt/foo/bar/log4j2.yaml
When I just use –cap-add SYS_ADMIN (I need samba access), log4j is unable to access it’s config file; however, if I use –privileged, everything works. I understand I must need an additional capability, but have no idea what it would be.

  • Starting Xserver in Docker Ubuntu container
  • Trying to build openface docker container
  • Not able to access Flask Web application running inside a Docker container
  • Docker build npm error logs
  • Unable to access Docker Nanoserver container web app
  • Can't pull image from docker repo
  • How to get my docker centos sshd passwordless server running?
  • How to delete a docker image in dockerhub with a particular tag or set of tags using CLI?
  • Privileges in an Ubuntu Docker container after USER statement in Dockerfile
  • Access hosts zfs from docker container
  • How to access an docker's image file system
  • Docker registry:2.0 overriding configuration options
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.