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

Hi I have a Dockerfile that contains an ARG instruction with a default value: https://github.com/tonswieb/POC-Docker-Image/blob/master/Dockerfile
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

2 Likes

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.