Skip to content
Snippets Groups Projects
Closed Dynamic user and group fails on MacOS
  • View options
  • Dynamic user and group fails on MacOS

  • View options
  • Closed Issue created by Felix Häberle

    @jurgenhaas

    Context

    I got MacOS running with v1.8.2-mac0.2 . For MacOS to work with the ssh agent, we had to mount a magic ssh socket introduced in a newer Docker version.

    Issue

    With the newest update to dynamically get the User and Group, the User/Group doesn't get transfered properly to the Docker container on MacOS like before. Therefore, the permissions in the created Docker container aren't correct.

    The issue is that the User id, in my case 501, isn't set in the etc/passwd, where the tools in the Docker container are looking it up. That's actually not a fault by Docker or our scripts because even on my main system, this id can't be found in etc/passwd. So nothing gets lost underway.

    This is a helpful resource to understand the problem. https://unix.stackexchange.com/questions/241927/why-mac-os-x-does-not-set-uid-bit-for-usr-bin-passwd

    I found a solution in this GitHub thread where the maintainer mentioned that on MacOS, everything (User/Group) gets automatically inherited from the Docker engine (VM) correctly, so modifying can only make it worse. I tested this with removing the --user flag and the user / group --env variables and it works! The working final code is in v1.8.2-mac0.3 .

    Edited by Felix Häberle

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading