puppetlabs / pupperware

Container fun time lives here.
Other
183 stars 66 forks source link

(REPLATS-150) Chown the mount point when copying certs #245

Closed jpartlow closed 3 years ago

jpartlow commented 3 years ago

Previously, the docker_volume_cp helper chowned "/opt/#{dest_dir}", leaving the /opt directory uid:gid root:root from the container. This translated into the volume _data dir also being root:root, which was a problem if the container that would eventually be mounting it was running as a non-root USER and expected the directory mount to be owned by USER. Chowning the mount point also keeps the associated volume _data directory the given uid:gid, allowing us to work around this.