Skip to content

runtime: On MacOS run as root in docker container

Ryan Roberts requested to merge ryarob01/fix-macos-user into main

Previously tuxmake was erroneously invoking docker with --user=:, on MacOS, which was not a valid username in the container image. Fix this by running as root. This required some dynamic patching to tuxmake.

MacOS uses GIDs that overlap with already defined GIDs in the container so we can't just bind the macos host UID/GID to the shrinkwrap user in the container, like we do for Linux. This concept doesn't really work anyway, because on MacOS the container is running on a completely separate (linux) kernel in a VM. Fortunately docker maps the VM to the current MacOS user when touching mapped volumes so it all works out. So on MacOS run as root. Unfortunately, tuxmake tries to be too clever (it assumes a linux host) and tries to map the in-container user to the host UID/GID. This fails when the in-container user is root. So we have this ugly workaround to override the user-opts with nothing. By passing nothing, we implicitly run as root and tuxmake doesn't try to run usermod.

Signed-off-by: Ryan Roberts ryan.roberts@arm.com

Merge request reports