-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.99
Plugins:
Docker Pipeline 1.14
Docker Commons 1.10
Dockerfiles are allowed to have ARG directives before the FROM directive, in which case the value for FROM can reference build arguments:
ARG TAG
FROM alpine:$TAG
Using docker.build('foo', '--build-arg TAG=3.7 .') in scripted pipeline on such a Dockerfile fails with:
java.io.IOException: Cannot retrieve .Id from 'docker inspectalpine:$TAG'
this is about docker-workflow plugin, changing component and assignee.
Issue is about https://github.com/jenkinsci/docker-workflow-plugin/blob/master/src/main/java/org/jenkinsci/plugins/docker/workflow/FromFingerprintStep.java#L111
docker-workflow does not expand build args and as well does not support multi-staged build "AS" keyword.