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

No way to specify directory for dockerfile

    Details

    • Similar Issues:

      Description

      It looks like there is no way to specify a directory to build an image using the "dockerfile" option. It only supports "filename", which is analogous to "-f" for the "docker build" command-line, but "docker build" takes as a required argument the DIRECTORY. This is necessary if you don't want the docker daemon to copy the whole repository when making the image, and you want instead to export just a small subset of files. Maybe adding something like "build_args" could be more flexible.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java
            pipeline-model-definition/src/test/resources/fromDockerfileInOtherDir.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/d8d42f135382a5fe5535005d49467d773daefe82
            Log:
            [FIXED JENKINS-41668] Add "dir" option for Dockerfile.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java pipeline-model-definition/src/test/resources/fromDockerfileInOtherDir.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/d8d42f135382a5fe5535005d49467d773daefe82 Log: [FIXED JENKINS-41668] Add "dir" option for Dockerfile.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
            pipeline-model-definition/src/test/resources/errors/dirSepInDockerfileName.groovy
            pipeline-model-definition/src/test/resources/fromDockerfileInOtherDir.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/3aa4358e5d5369d2d01282d5add5934ab5a5a835
            Log:
            Merge pull request #107 from abayer/jenkins-41668

            [FIXED JENKINS-41668] Add "dir" option for Dockerfile.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java pipeline-model-definition/src/test/resources/errors/dirSepInDockerfileName.groovy pipeline-model-definition/src/test/resources/fromDockerfileInOtherDir.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/3aa4358e5d5369d2d01282d5add5934ab5a5a835 Log: Merge pull request #107 from abayer/jenkins-41668 [FIXED JENKINS-41668] Add "dir" option for Dockerfile.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            content/doc/book/pipeline/syntax.adoc
            http://jenkins-ci.org/commit/jenkins.io/b13440af19a0a9ef115bb3316b361c3a6b9512fc
            Log:
            JENKINS-41668 Add "dir" option for Dockerfile declarative agent

            Depends on
            https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/107
            being merged and released.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: content/doc/book/pipeline/syntax.adoc http://jenkins-ci.org/commit/jenkins.io/b13440af19a0a9ef115bb3316b361c3a6b9512fc Log: JENKINS-41668 Add "dir" option for Dockerfile declarative agent Depends on https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/107 being merged and released.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: R. Tyler Croy
            Path:
            content/doc/book/pipeline/syntax.adoc
            http://jenkins-ci.org/commit/jenkins.io/29bf87e69645098f5f2a072e41a39c45eff6eb39
            Log:
            Merge pull request #588 from abayer/jenkins-41668

            JENKINS-41668 Add "dir" option for Dockerfile declarative agent

            Compare: https://github.com/jenkins-infra/jenkins.io/compare/8fa807c2ac6e...29bf87e69645

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: R. Tyler Croy Path: content/doc/book/pipeline/syntax.adoc http://jenkins-ci.org/commit/jenkins.io/29bf87e69645098f5f2a072e41a39c45eff6eb39 Log: Merge pull request #588 from abayer/jenkins-41668 JENKINS-41668 Add "dir" option for Dockerfile declarative agent Compare: https://github.com/jenkins-infra/jenkins.io/compare/8fa807c2ac6e...29bf87e69645
            Hide
            bitwiseman Liam Newman added a comment -

            Bulk closing resolved issues.

            Show
            bitwiseman Liam Newman added a comment - Bulk closing resolved issues.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                lucasocio Leandro Lucarella
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: