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.

  • Dynamically routing hosts to dockers
  • Is there a way to discover other containers on a docker network using DNS?
  • Docker:issue faced while running two web apps inside docker
  • cannot start docker daemon
  • How to connect PyCharm to a python interpreter located inside a Docker container?
  • Mount volume to Docker image on OSX
  • Vagrant using docker as provider on MacOS, impossible to mount directory in container
  • how to install libcontainer docker in place of lxc-docker
  • How to add an image to an organization in Docker Hub ?
  • docker daemon not connecting
  • Windows Docker mongo container doesn't work with volume mount
  • How to add EnvironmentFile directive to systemctl using Docker with centos7/httpd base image
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.