zrhoffman commented on a change in pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#discussion_r524753211
##########
File path: infrastructure/cdn-in-a-box/optional/vnc/Dockerfile
##########
@@ -14,15 +14,22 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-FROM docker.io/centos:7
+
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION}
+ARG CENTOS_VERSION=8
Review comment:
Nope because `ENV` cannot come before the first `FROM`. If it does,
you'll get an error like `No build stage in current context`.
From [the
documentation](https://docs.docker.com/engine/reference/builder/#from):
> - `ARG` is the only instruction that may precede `FROM` in the
`Dockerfile`.
See [Understand how ARG and FROM
interact](https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]