Splitting out from Bug #1801388 If a multi-stage Dockerfile utilizes build ARGS in FROM statements, these are not correctly processed by buildah. Steps to Reproduce: 1. Create a BuildConfig as follows: ``` apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: sample-build-docker-args-preset spec: source: dockerfile: |- FROM centos ARG foo=centos FROM $foo type: Dockerfile strategy: dockerStrategy: {} type: Docker ``` 2. Start the build Actual Results: Build fails with error: ``` I0211 22:06:43.140914 1 builder.go:318] Starting Docker build from build config sample-build-docker-args-preset-17 ... F0211 22:06:43.209605 1 helpers.go:114] error: build error: error parsing name "$foo": error parsing image name "$foo": invalid reference format ``` Expected results: Build succeeds Additional Info: https://github.com/openshift/builder/pull/130#discussion_r377979342
I've added a dependency link to https://bugzilla.redhat.com/show_bug.cgi?id=1801875 because at the moment, based on the discussion between Ben, Nalin, and myself, we think the buildah api's should handle the above scenario without any translations in openshift/builder Nalin is investigating. Based on his outcome, we can use this bug to either a) bump buildah to get the fix b) make the openshift/builer (via imagebuilder) translations when mutating the Dockerfile before it is passed to buildah But again, at the moment, option a) is considered the correct approach.
As this is a tracking bug to react to https://bugzilla.redhat.com/show_bug.cgi?id=1801875 I'm moving this to POST, at least for now.
As the originator of https://bugzilla.redhat.com/show_bug.cgi?id=1801875 I'll see if/when it progresses and can open any bugs to update openshift/builder buildah dependencies as needed closing this tracking bug
*** This bug has been marked as a duplicate of bug 1839683 ***