blueFast
blueFast

Reputation: 44331

Specify registry as argument in Dockerfile

I would like to do the following, using ARG:

ARG registry
FROM $registry/pipenv
...

But, according to the documentation, FROMmust be the first keyword in a valid Dockerfile.

How can I specify a registry from outside the Dockerfile?

Upvotes: 0

Views: 713

Answers (1)

Yuankun
Yuankun

Reputation: 7773

In the documentation you posted, there is one line says:

ARG is the only instruction that may precede FROM in the Dockerfile.

And then follows a section talking about "Understand how ARG and FROM interact ".

Upvotes: 2

Related Questions