Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31587

docker command fails if project name has whitespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Jenkins: 1.638
      CloudBees Docker Build and Publish plugin: 1.1

      When the project name has a space in it (such as "happy days"), the plugin tries to run the command

      docker build -t imagetag /var/lib/jenkins/jobs/happy days/workspace
      

      which results in the error

      docker: "build" requires 1 argument.
      See 'docker build --help'.
      
      Usage:	docker build [OPTIONS] PATH | URL | -
      
      Build a new image from the source code at PATH
      Build step 'Docker Build and Publish' marked build as failure
      Finished: FAILURE
      

      The problem is that the space is not escaped, resulting in two arguments being passed.

      This wasn't a problem in 1.0.1 since the path was simply ".".

            csanchez Carlos Sanchez
            deadleg William Kerrigan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: