Container build: define ARGs after FROM line
According to the Dockerfile reference[1], ARG instructions before the FROM line are a special case: variables defined in this way are only available in the FROM line and not during the rest of the build. In order for defined ARGs to be available during image build time we must run these after the FROM line. [1] https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact Depends-On: https://review.opendev.org/c/openstack/tripleo-common/+/858864 Signed-off-by: Miguel Garcia <mgarciac@redhat.com> Change-Id: I8086b7820ff2d124baacbe8e947aba970996b907
This commit is contained in:
parent
7898061a31
commit
0ec37df1e4
@ -13,10 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
FROM {{ tcib_from }}
|
||||
{% for key, value in tcib_args.items() %}
|
||||
ARG {{ key }}={{ value | to_json }}
|
||||
{% endfor %}
|
||||
FROM {{ tcib_from }}
|
||||
{% for key, value in tcib_labels.items() %}
|
||||
LABEL {{ key }}={{ value | to_json }}
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user