Skip to content
Commit 352df0d2 authored by Ryan Roberts's avatar Ryan Roberts
Browse files

runtime: On MacOS run as root in docker container



Previously tuxmake was erroneously invoking docker with
--user=<uid>:<gid>, 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's avatarRyan Roberts <ryan.roberts@arm.com>
parent e173a69c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment