DescriptionKenjiro Nakayama
2018-04-26 01:10:10 UTC
Description of problem:
- Currently ARG is not allowed to put before FROM in Dockerfile. Please see below reproduce steps and error message.
- moby has same reports and looks like fixed it.
https://github.com/moby/moby/issues/32457https://github.com/moby/moby/pull/31352
Version-Release number of selected component (if applicable):
- docker-1.13.1-58.git87f2fab.el7.x86_64
How reproducible: 100%
Steps to Reproduce:
1. Create Dockerfile
# cat Dockerfile
ARG foo="test"
FROM busybox
RUN echo $foo
2. Build it
# docker build .
Actual results:
- Getting following error
# docker build .
Sending build context to Docker daemon 2.048 kB
Step 1/3 : ARG foo="test"
Please provide a source image with `from` prior to commit
Expected results:
- Build without error.
Additional info:
- OpenShift supports specific docker version. OCP 3.9 supports docker 1.13, so we would like you to backport it into docker-1.13.
Test with the steps in comment 1 with podman-0.12.1.2-2.git9551f6b.el7.x86_64:
# podman build -t test .
STEP 1: FROM busybox
STEP 2: RUN echo $foo
test
--> e6736a73421a23d68d7100ea2c42a54ce42e55e32781cc9b8a5e0bb65ed640d0
STEP 3: COMMIT test
[Warning] One or more build-args [foo] were not consumed
So set this to verified.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2019:0241