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

Docker 17.05 ARG in FROM breaks docker inspect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • docker-workflow-plugin
    • None
    • docker 17.05+
    • docker-workflow 1.18

      Taking advantage of https://github.com/moby/moby/issues/18119 is not supported by docker.build.

      Minimal docker file 

      ARG TAG
      FROM image:${TAG}
      

       
      Docker build

      docker.build("image_name", "--build-arg TAG=${package_version} -f Dockerfile .")
      

       

      Stacktrace

      java.io.IOException: Cannot retrieve .Id from 'docker inspectimage:${TAG}'
              at org.jenkinsci.plugins.docker.workflow.client.DockerClient.inspectRequiredField(DockerClient.java:203)
              at org.jenkinsci.plugins.docker.workflow.FromFingerprintStep$Execution.run(FromFingerprintStep.java:119)
              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)
      

            abayer Andrew Bayer
            rpocase Robby Pocase
            Votes:
            9 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: