Hey, Sorry for the late response. I was on vacation and away from my keyboard.
On Tue, Jul 9, 2019 at 9:44 PM Marc-André Lureau <marcandre.lur...@redhat.com> wrote: > With current podman, we have to use a uidmap trick in order to be able > to rw-share the ccache directory with the container user. > > With a user 1000, the default mapping is: > 1000 (host) -> 0 (container). > > So write access to /var/tmp/ccache ends will end with permission > denied error. > > With "--uidmap 1000:0:1 --uidmap 0:1:1000", the mapping is: > 1000 (host) -> 0 (container, 1st namespace) -> 1000 (container, 2nd > namespace). > > (the rest is mumbo jumbo to avoid holes in the range of UIDs) > > A future podman version may have an option such as --userns-keep-uid. The future is here! :) Since Podman 1.4.0, released on 7th June 2019, you can use --userns=keep-id instead of typing out the entire UID mapping. The relevant Podman pull request is: https://github.com/containers/libpod/pull/3196 Cheers, Rishi