On Red Hat Enterprise Linux 7, can ARG be mentioned before FROM in Dockerfile ?

Solution Verified - Updated -

Issue

  • On Red Hat Enterprise Linux 7, can ARG be mentioned before FROM in Dockerfile ?

Example Dockerfile

ARG  CODE_VERSION=7.4
FROM registry.access.redhat.com/rhel7:${CODE_VERSION}

Environment

  • Red Hat Enterprise Linux 7
  • docker-1.13.1-104.git4ef4b30.el7.x86_64
  • podman-1.4.4-4.el7.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content