Bug 1478024 - Unconsumed Build-Arg specification while building docker image
Unconsumed Build-Arg specification while building docker image
Status: POST
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
7.3
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Antonio Murdaca
atomic-bugs@redhat.com
: Extras
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-03 09:17 EDT by Suhaas Bhat
Modified: 2017-08-04 02:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
docker-1.12.6-48.git0fdc778.el7.x86_64


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.