Docker Community Forums

Share and learn in the Docker community.

Does Docker Hub support the ARG keyword with a default value set?


(Tonswieb) #1

Hi I have a Dockerfile that contains an ARG instruction with a default value:
So there is no need to give an additional build argument.

When building the image localy everything is fine. When I try building the image with Docker Hub I get the error:
Step 8 : ARG
Unknown instruction: ARG

Looks like the ARG instruction is not supported on Docker Hub. Is Docker Hub using an older version of Docker or are there some restrictions to which instructions can be used with Docker Hub.
I can imagine that it is not possible to give build arguments, because I haven’t found the option to do this, but a default value is supplied so that should not be needed.

Regards, Ton

(Pehowell) #2

Docker Hub’s automated build is still running Docker 1.8 and doesn’t support ARG yet. There is a github issue tracking their upgrade to 1.9.