Docker Community Forums

Share and learn in the Docker community.

Is there a way to specify multiple ARG in one line?

Hi,

I was wondering if there is a way to specify multiple ARG in one line? currently ENV and LABEL allow you to specify more than one entry in a single line. Can we get the same feature for ARG as well?

Thanks,
Rohit

1 Like

I had this same question. So I went and tested it out. It appears that the ARG command only allows one argument.

FROM registry.access.redhat.com/rhel7

ARG TEST1=Example TEST2=Example2

LABEL Description="${TEST1} - ${TEST2}"

The response when running this was the following.

Step 2 : ARG TEST1=Example TEST2=Example2
ARG requires exactly one argument definition

The response back from Docker is clear, the ARG command only allows one argument.

Hope this helps.

1 Like