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

docker 17.05 multistage Dockerfile breaks dockerFingerprintFrom

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Docker 17.05 has a new "multi-stage builds" feature. https://docs.docker.com/engine/userguide/eng-image/multistage-build/ Using this feature breaks the dockerFingerprintFrom method with something like

      Cannot retrieve .Id from 'docker inspectphp:7.1-fpm-alpine AS build-env'

        Attachments

          Issue Links

            Activity

            Hide
            ahammond Andrew Hammond added a comment -

            Duplicate of what ticket please?

            Show
            ahammond Andrew Hammond added a comment - Duplicate of what ticket please?
            Hide
            ahammond Andrew Hammond added a comment -

            Oh, mobile version his it but found it. Thanks!

            Show
            ahammond Andrew Hammond added a comment - Oh, mobile version his it but found it. Thanks!
            Hide
            chinakevinguo kevin guo added a comment -

            I have a problem about dockerFingerprintFrom

            Dockerfile:

             

            FROM 172.30.33.31:5000/base/jdk:8u74
            

             

             

            Jenkinsfile:

             

            node {
              stage("First stage") {
                dockerFingerprintFrom([dockerfile: "."])
              }
            }

             

            but i have an error as follows:

             

            java.io.IOException: Cannot retrieve .Id from 'docker inspectnull'
            	at org.jenkinsci.plugins.docker.workflow.client.DockerClient.inspectRequiredField(DockerClient.java:203)
            	at org.jenkinsci.plugins.docker.workflow.FromFingerprintStep$Execution.run(FromFingerprintStep.java:115)
            	at org.jenkinsci.plugins.docker.workflow.FromFingerprintStep$Execution.run(FromFingerprintStep.java:75)
            	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
            	at hudson.security.ACL.impersonate(ACL.java:260)
            	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
            	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            	at java.lang.Thread.run(Thread.java:745)
            Finished: FAILURE
            

             

            It does not work I don't even know if this correct ... I would like ask if anyone has a practical example to show me ?

             

            Show
            chinakevinguo kevin guo added a comment - I have a problem about dockerFingerprintFrom Dockerfile:   FROM 172.30.33.31:5000/base/jdk:8u74     Jenkinsfile:   node { stage( "First stage" ) { dockerFingerprintFrom([dockerfile: "." ]) } }   but i have an error as follows:   java.io.IOException: Cannot retrieve .Id from 'docker inspectnull' at org.jenkinsci.plugins.docker.workflow.client.DockerClient.inspectRequiredField(DockerClient.java:203) at org.jenkinsci.plugins.docker.workflow.FromFingerprintStep$Execution.run(FromFingerprintStep.java:115) at org.jenkinsci.plugins.docker.workflow.FromFingerprintStep$Execution.run(FromFingerprintStep.java:75) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47) at hudson.security.ACL.impersonate(ACL.java:260) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang. Thread .run( Thread .java:745) Finished: FAILURE   It does not work I don't even know if this correct ... I would like ask if anyone has a practical example to show me ?  
            Hide
            ahammond Andrew Hammond added a comment -

            +1 with the following FROM line:

            FROM quay.io/prometheus/golang-builder:1.9-base
            Show
            ahammond Andrew Hammond added a comment - +1 with the following FROM line: FROM quay.io/prometheus/golang-builder:1.9-base
            Hide
            ahammond Andrew Hammond added a comment -

            At the very least can we please disable this functionality since it doesn't provide value and appears to create issues.

            Show
            ahammond Andrew Hammond added a comment - At the very least can we please disable this functionality since it doesn't provide value and appears to create issues.
            Hide
            dbensoussan david bensoussan added a comment -

            There is a PR solving this here: https://github.com/jenkinsci/docker-workflow-plugin/pull/162

            Could a maintainer take a look at it?

            Show
            dbensoussan david bensoussan added a comment - There is a PR solving this here: https://github.com/jenkinsci/docker-workflow-plugin/pull/162 Could a maintainer take a look at it?

              People

              • Assignee:
                Unassigned
                Reporter:
                ahammond Andrew Hammond
              • Votes:
                7 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated: