Unknown instruction: ARG

Hi,
I’ve got a build that builds out a docker image. This build worked last time I ran it (18 days ago), but is now failing with:

unknown instruction: ARG

Is this a Docker instruction that isn’t supported on Circle CI with whatever docker version is running in the build environment? Perhaps it was a change to nodejs’s Dockerfile/docker image that introduced this…not sure yet. Any ideas?

Here is the failing build step:

docker build -q -t foo/bar .
Sending build context to Docker daemon 2.785 MB
Sending build context to Docker daemon 6.674 MB


Step 0 : FROM node:4-onbuild
4-onbuild: Pulling from library/node

9a187a25eaf1: Digest: sha256:5eca29dc9fbaf927034d045407e52e337725ba902f93e0aafd8e87f76718a787
Status: Downloaded newer image for node:4-onbuild
# Executing 5 build triggers
Trigger 0, ARG NODE_ENV
Step 0 : ARG 
Unknown instruction: ARG

docker build -q -t foo/bar . returned exit code 1

Action failed: docker build -q -t foo/bar .
``docker build -q -t foo/bar .
Sending build context to Docker daemon 2.785 MB
Sending build context to Docker daemon 6.674 MB

Step 0 : FROM node:4-onbuild
4-onbuild: Pulling from library/node

9a187a25eaf1: Digest: sha256:5eca29dc9fbaf927034d045407e52e337725ba902f93e0aafd8e87f76718a787
Status: Downloaded newer image for node:4-onbuild
# Executing 5 build triggers
Trigger 0, ARG NODE_ENV
Step 0 : ARG 
Unknown instruction: ARG

docker build -q -t foo/bar . returned exit code 1

Action failed: docker build -q -t foo/bar .

So it does look like the nodejs team added ARG to their Dockerfiles recently per this commit.

Is ARG not supported on CircleCI? Any workarounds? If not I suppose I’ll have to customize the nodejs onbuild Dockerfile which would suck to have to maintain. Thanks for any suggestions.

By default, Circle CI currently uses Docker 1.8 which doesn’t support the ARG Dockerfile command. I was able to use Docker 1.10 though with this info and my build is running fine now:

1 Like