Improve Docker Runner's ability to function when the agent home is mounted on NFS

XMLWordPrintable

    • 0
    • 1

      Problem

      Bamboo's Docker Runner feature encounters a number of Permission Denied errors when running tasks on a remote agent that is mounted on NFS with root squashing (default configuration).

      Since most commands run in containers typically run under a root context, the root user is squashed to nfsnobody which has very limited permissions on the build working directory and temp.

      Suggested Solution

      Allow an option to tell Docker Runner to execute commands as the same UID/GUID of the user running the Bamboo agent, inside the container. Docker exec allows specifying a user context.

      Workaround

      Setup root squashing to the same UID/GUID as the user that runs the Bamboo agent for trusted clients using anonuid and anongid on the NFS export. E.g.

      /mnt/sharedfolder 192.156.1.56(rw,sync,no_subtree_check,anonuid=1068,anongid=1068)
      

      Or setup your containers to have a user with a UID/GUID that matches your Bamboo remote agent and either su to it in any scripts or make it the default user for the image.

            Assignee:
            Unassigned
            Reporter:
            Jeremy Owen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: