title: Docker, mount volumes as readonly
body: <p>I am working with Docker, and I want to mount a dynamic folder that changes a lot (so I would not have to make a Docker image for each execution, which would be too costly), but I want that folder to be read-only. Changing the folder owner to someone else works. However, <code>chown</code> requires <code>root</code> access, which I would prefer not to expose to an application. </p>
  
  <p>When I use <code>-v</code> flag to mount, it gives whatever the username I give, I created a non-root user inside the docker image, however, all the files in the volume with the owner as the user that ran docker, changes into the user I give from the command line, so I cannot make read-only files and folders. How can I prevent this? </p>
  
  <p>I also added <code>mustafa ALL=(docker) NOPASSWD: /usr/bin/docker</code>, so I could change to another user via terminal, but still, the files have permissions for my user.</p>