Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build process failed: Unknown instruction: ARG

Tags:

dockerhub

I'm trying my first Docker Hub automated build using a Dockerfile I have successfully built locally. On Docker Hub, it fails with this output

Cloning into 'brx9syjpjlk9bnmymmynwpl'...
Warning: Permanently added the RSA host key for IP address '104.192.143.2' to the list of known hosts.
KernelVersion: 3.13.0-40-generic
Os: linux
BuildTime: Mon Oct 12 05:37:18 UTC 2015
ApiVersion: 1.20
Version: 1.8.3
GitCommit: f4bf5c7
Arch: amd64
GoVersion: go1.4.2
Step 0 : FROM ubuntu:14.04
 ---> c4bea91afef3
Step 1 : ARG 
Unknown instruction: ARG

I have found no way to pass a build-arg to the automated build, but my ARG's default value is sane, so that shouldn't matter.

Any ideas what the problem here is?

like image 569
CAB Avatar asked Jan 19 '16 20:01

CAB


2 Answers

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.

like image 121
Alexander Gorokhov Avatar answered Nov 17 '22 23:11

Alexander Gorokhov


We encountered the same issue on Travis.ci. Upgrading to Docker Engine 1.9.0 worked for us.

We added this to our travis.yml

before_script:
  - sudo apt-get update
  - sudo apt-get install -y -q docker-engine=$DOCKER_ENGINE_VERSION
like image 31
Roger Lam Avatar answered Nov 17 '22 23:11

Roger Lam