• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • docker-plugin
    • None
    • using the latest Cloudbees supported version with the latest docker-plugin.

      Need support for --label in docker template.

      See link for more details on labels.

      https://docs.docker.com/engine/reference/commandline/run/

       

      Background: I am using UCP which uses labels to control access privileges. Without it we are unable to terminate containers (docker rm -f xxaaaxxx). They currently fail with 'Access Denied' and need to request our  UCP Admin to terminate these containers.

       

          [JENKINS-45227] Need support for docker labels ( --label )

          Do you have any link to documentation about this restriction on UCP ?
          Plugin should automatically inject such labels if they're actually required.

          Nicolas De Loof added a comment - Do you have any link to documentation about this restriction on UCP ? Plugin should automatically inject such labels if they're actually required.

          If I understand correctly UCP do require the container to be created with label `com.docker.ucp.access.label` set to some specific value matching a RBAC group. 

          Nicolas De Loof added a comment - If I understand correctly UCP do require the container to be created with label `com.docker.ucp.access.label` set to some specific value matching a RBAC group. 

          The plugin currently allows environment variables be set when launching containers and I use that feature. I would suggest to offer a similar option for labels.

          The format you mentioned  'com.docker.ucp.access.label` is correct at this time and may change in future releases of UCP. so i recommend to offer a generic mechanism to support labels instead of hard coding the label name.

           

          Venkat Packiriswamy added a comment - The plugin currently allows environment variables be set when launching containers and I use that feature. I would suggest to offer a similar option for labels. The format you mentioned  'com.docker.ucp.access.label` is correct at this time and may change in future releases of UCP. so i recommend to offer a generic mechanism to support labels instead of hard coding the label name.  

          pjdarton added a comment -

          Support for setting user-specified labels was added by PR-747.

          pjdarton added a comment - Support for setting user-specified labels was added by PR-747 .

            Unassigned Unassigned
            vpack Venkat Packiriswamy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: