Docker/distribution Build Fail Step 5

Hello

I’m following the https://github.com/docker/distribution/blob/master/docs/deploying.md guide to get a private Docker registry up and running.

I downloaded the source, cd’ed into the dir, and updated the config.

Here’s my config.yml:

version: 0.1
log:
level: debug
fields:
service: registry
environment: production
storage:
cache:
layerinfo: redis
filesystem:
rootdirectory: /home/username/docker-distribution
http:
addr: :5000
secret: supersecrettext
debug:
addr: localhost:5001
tls:
certificate: /go/src/github.com/docker/distribution/certs/docker-registry.crt
key: /go/src/github.com/docker/distribution/certs/docker-registry.key
redis:
addr: localhost:6379
pool:
maxidle: 16
maxactive: 64
idletimeout: 300s
dialtimeout: 10ms
readtimeout: 10ms
writetimeout: 10ms

I then run this command:

sudo docker build -t secure_registry .

I fail on step 5:

Step 5 : RUN make PREFIX=/go clean binaries
 ---> Running in 6d01f32ffc6a
make: *** No rule to make target 'clean'.  Stop.
2015/04/22 00:23:53 The command [/bin/sh -c make PREFIX=/go clean binaries] returned a non-zero code: 2

I’ve read [FAQ] docker build . fail · Issue #345 · distribution/distribution · GitHub for help, but I don’t think it’s a memory issue.

This is before running the build command:

GiB Mem: 1.955 total, 0.760 used, 1.195 free,

This is after running the build command:

GiB Mem: 1.955 total, 0.851 used, 1.104 free

Here’s some system info:

sudo docker info
Containers: 19
Images: 35
Storage Driver: devicemapper
Pool Name: docker-253:1-135519-pool
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 992.4 Mb
Data Space Total: 102400.0 Mb
Metadata Space Used: 2.6 Mb
Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.13.0-36-generic
WARNING: No swap limit support

sudo docker version
Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version: 1.0.1
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 990021a

uname -a
Linux web 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

dmesg
[ 169.013600] device veth623b entered promiscuous mode
[ 169.013947] IPv6: ADDRCONF(NETDEV_UP): veth623b: link is not ready
[ 169.013955] docker0: port 1(veth623b) entered forwarding state
[ 169.013965] docker0: port 1(veth623b) entered forwarding state
[ 169.024409] IPv6: ADDRCONF(NETDEV_CHANGE): veth623b: link becomes ready
[ 169.024446] IPv6: ADDRCONF(NETDEV_CHANGE): docker0: link becomes ready
[ 169.168815] docker0: port 1(veth623b) entered disabled state
[ 169.169794] device veth623b left promiscuous mode
[ 169.169807] docker0: port 1(veth623b) entered disabled state

Any help would be appreciated. Please let me know if any more info is needed.

This is a quite old docker version. Can you test with docker 1.6?

Also, why not run the official image directly (docker pull registry:2)?

Otherwise, it smells like OOM killer. See https://github.com/docker/distribution/issues/345

Thanks a lot!

Upgrading to docker 1.6 did the trick.

Note to other Ubuntu users: docker.io installs an older version.

lxc-docker will get a more recent version

Instructions for adding that ppa here:
http://compositecode.com/2013/11/11/getting-docker-installed-on-ubuntu-12-04-lts/