Bug 1478024 - Unconsumed Build-Arg specification while building docker image
Unconsumed Build-Arg specification while building docker image
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Antonio Murdaca
: Extras
Depends On:
Blocks: 1186913
  Show dependency treegraph
Reported: 2017-08-03 09:17 EDT by Suhaas Bhat
Modified: 2018-01-29 17:46 EST (History)
3 users (show)

See Also:
Fixed In Version: docker-1.12.6-55.gitc4618fb.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-01-29 17:46:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Suhaas Bhat 2017-08-03 09:17:06 EDT
Description of problem:

We need to specify build argument in a Docker file for building a docker image even if we don't consume it. It is resulting in unnecessary argument Declaration in every file.

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux 7.3

How reproducible:

Fully reproducible

Steps to Reproduce:

-bash-4.2# docker build --build-arg VERSION=3.1.4 -t hello-error .
Sending build context to Docker daemon 530.4 kB
Step 1 : FROM rhel7:latest
 ---> f98706e16e41
Step 2 : USER root
 ---> Using cache
 ---> accce8f399a0
Step 3 : MAINTAINER Maintainer_Name
 ---> Using cache
 ---> 9694f64f09d6
Step 4 : EXPOSE 3306
 ---> Running in dfafc09d4a09
 ---> c1c31ffc6b0e
Removing intermediate container dfafc09d4a09
Step 5 : CMD --basedir=/usr
 ---> Running in be7e28c22080
 ---> 312d24038d17
Removing intermediate container be7e28c22080
One or more build-args [VERSION] were not consumed, failing build.

Actual results:

One or more build-args [VERSION] were not consumed, failing build.

Expected results:

Should have given a warning.

Additional info:

This issue is not occurring for docker-latest package version 1.13.1 ( Just giving a warning )
Comment 2 Antonio Murdaca 2017-08-03 09:29:36 EDT
Backported https://github.com/projectatomic/docker/commit/c4618fb6bf4058dcde877f773cfd4afb5abe626c to docker-1.12.6

Note You need to log in before you can comment on or make changes to this bug.