Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix startup on userns-remap built image
When the image was built on or pulled by a dockerd running with userns-remap the root filesystem will be owned by the remapped UID. When that image is run explicitly in the host's user namespace the ownership of the files on disk will be based on the userns-remapped UIDs. This is generally fine, except where an executable is SUID, in which case, which is the case for the s6-overlay-preinit tool, so we must detect the situation and set the ownership of the relevant tools. See: - just-containers#309 - moby/moby#28986 - https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container
- Loading branch information