When using Docker 1.6 or earlier, the error "flag provided but not defined: --user" is thrown when the plugin tries to run "docker exec ...". This flag is only supported in later versions of Docker but the message isn't clear.
      It would be nice to have the plugin check the version of Docker it requires.

          [JENKINS-30919] Check Docker version

          stijn cremers added a comment - - edited

          Is this an error or an warning? Because i get this also in my build

          $ docker --version
          Docker version 1.6.2, build 7c8fca2/1.6.

          See also http://stackoverflow.com/questions/33742965/build-inside-docker-container-in-jenkins

          stijn cremers added a comment - - edited Is this an error or an warning? Because i get this also in my build $ docker --version Docker version 1.6.2, build 7c8fca2/1.6. See also http://stackoverflow.com/questions/33742965/build-inside-docker-container-in-jenkins

          Jo Shields added a comment - - edited

          It's an error, not a warning.

          Started by user anonymous
          Building in workspace /var/lib/jenkins/jobs/docky/workspace
          Docker container e304ee4ac3a5ac8cb1941341947879e8101cea14efa0731e9e6be8f21b0a2b62 started to host the build
          $ docker exec --tty e304ee4ac3a5ac8cb1941341947879e8101cea14efa0731e9e6be8f21b0a2b62 env
          [workspace] $ docker exec --tty --user 121: e304ee4ac3a5ac8cb1941341947879e8101cea14efa0731e9e6be8f21b0a2b62 env BUILD_DISPLAY_NAME=#2 BUILD_ID=2 BUILD_NUMBER=2 BUILD_TAG=jenkins-docky-2 BUILD_URL=http://localhost:8080/job/docky/2/ CLASSPATH= EXECUTOR_NUMBER=1 HOME=/root HOSTNAME=e304ee4ac3a5 HUDSON_HOME=/var/lib/jenkins HUDSON_SERVER_COOKIE=a5306de8f7720fc0 HUDSON_URL=http://localhost:8080/ JENKINS_SERVER_COOKIE=a5306de8f7720fc0 JENKINS_URL=http://localhost:8080/ JOB_NAME=docky JOB_URL=http://localhost:8080/job/docky/ NODE_LABELS=master NODE_NAME=master PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm WORKSPACE=/var/lib/jenkins/jobs/docky/workspace /bin/sh -xe /tmp/hudson1001475129462719389.sh
          flag provided but not defined: --user
          See 'docker exec --help'.
          Build step 'Execute shell' marked build as failure
          Stopping Docker container after build completion
          Finished: FAILURE
          

          Jo Shields added a comment - - edited It's an error, not a warning. Started by user anonymous Building in workspace /var/lib/jenkins/jobs/docky/workspace Docker container e304ee4ac3a5ac8cb1941341947879e8101cea14efa0731e9e6be8f21b0a2b62 started to host the build $ docker exec --tty e304ee4ac3a5ac8cb1941341947879e8101cea14efa0731e9e6be8f21b0a2b62 env [workspace] $ docker exec --tty --user 121: e304ee4ac3a5ac8cb1941341947879e8101cea14efa0731e9e6be8f21b0a2b62 env BUILD_DISPLAY_NAME=#2 BUILD_ID=2 BUILD_NUMBER=2 BUILD_TAG=jenkins-docky-2 BUILD_URL=http://localhost:8080/job/docky/2/ CLASSPATH= EXECUTOR_NUMBER=1 HOME=/root HOSTNAME=e304ee4ac3a5 HUDSON_HOME=/var/lib/jenkins HUDSON_SERVER_COOKIE=a5306de8f7720fc0 HUDSON_URL=http://localhost:8080/ JENKINS_SERVER_COOKIE=a5306de8f7720fc0 JENKINS_URL=http://localhost:8080/ JOB_NAME=docky JOB_URL=http://localhost:8080/job/docky/ NODE_LABELS=master NODE_NAME=master PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm WORKSPACE=/var/lib/jenkins/jobs/docky/workspace /bin/sh -xe /tmp/hudson1001475129462719389.sh flag provided but not defined: --user See 'docker exec --help'. Build step 'Execute shell' marked build as failure Stopping Docker container after build completion Finished: FAILURE

            jonhermansen Jon Hermansen
            mausch Mauricio Scheffer
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: