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

Pipeline Syntax Dockerfile Options Improvement

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: docker
    • Labels:
      None
    • Similar Issues:

      Description

      This is a suggested improvement on the pipeline syntax options that can be used with dockerfile. At current the two options dir and filename don't really coincide with the options of docker build. The filename option seems to map to -f from what I can tell which isn't really a filename but a file + path (e.g. - ./docker/Dockerfile). 

       

      My suggestion would be to change filename to just file so a user better understands the mapping to docker build. As this would make dir unnecessary I propose removing that and potentially replacing it with a context option that would point to the docker's build context (the default being the SCM root).

       

      A quick example. The following:

      docker build -f docker/Dockerfile.deploy .

      Would translate to the following pipeline syntax:

      agent {
        dockerfile {
          file './docker/Dockerfile.deploy'
          context '.' // default
        }
      }

       

      Happy to expand on anything if that's not clear!

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              csanchez Carlos Sanchez
              Reporter:
              wootencl Carter Wooten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: