Docker Community Forums

Share and learn in the Docker community.

Need help! I failed to start docker daemon -D based https://docs.docker.com/opensource/project/set-up-dev-env/


(Pak Kwan) #1

Hi there,
I was trying to contribute my time to open source docker. So I followed your article to install docker development env.

https://docs.docker.com/opensource/project/set-up-dev-env/

Work with a development container - Docker Docs


Work with a development container. In this section, you learn to develop like a member of Docker’s core team. The docker repository includes a Dockerfile at its root.

I did:

git
clone


docker-fork

cd
~/repos/docker-fork

docker
build -t dry-run-test
.


wait
for many minutes later I got

Successfully
built [SomeRandomNumber]

docker
run --privileged --rm -ti dry-run-test /bin/bash

docker run --privileged --rm -ti dry-run-test /bin/bash
root@32450ab97db0:/go/src/github.com/docker/docker# go version
go version go1.6 linux/amd64
root@32450ab97db0:/go/src/github.com/docker/docker# hack/make.sh binary

—> Making bundle: binary (in bundles/1.11.0-dev/binary)
Building: bundles/1.11.0-dev/binary/docker-1.11.0-dev
Created binary: bundles/1.11.0-dev/binary/docker-1.11.0-dev

root@32450ab97db0:/go/src/github.com/docker/docker# docker --version
bash: docker: command not found
root@32450ab97db0:/go/src/github.com/docker/docker# cp bundles/1.11.0-dev/binary/docker /usr/bin
root@32450ab97db0:/go/src/github.com/docker/docker# docker --version
Docker version 1.11.0-dev, build 9ff7439
root@32450ab97db0:/go/src/github.com/docker/docker# docker --version
Docker version 1.11.0-dev, build 9ff7439
root@32450ab97db0:/go/src/github.com/docker/docker# docker daemon -D
DEBU[0000] docker group found. gid: 999
DEBU[0000] Listener created for HTTP on unix (/var/run/docker.sock)
DEBU[0000] Using default logging driver json-file
DEBU[0000] Golang’s threads limit set to 28260
DEBU[0000] Using graph driver aufs
INFO[0000] Graph migration to content-addressability took 0.00 seconds
DEBU[0000] Option DefaultDriver: bridge
DEBU[0000] Option DefaultNetwork: bridge
WARN[0000] Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: …/libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.19.0-20-generic/modules.dep.bin’
modprobe: ERROR: …/libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file ‘/lib/modules/3.19.0-20-generic/modules.dep.bin’
, error: exit status 1
WARN[0000] Running modprobe nf_nat failed with message: modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.19.0-20-generic/modules.dep.bin', error: exit status 1
WARN[0000] Running modprobe xt_conntrack failed with message: modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.19.0-20-generic/modules.dep.bin', error: exit status 1
DEBU[0000] Fail to initialize firewalld: Failed to connect to D-Bus system bus: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory, using raw iptables instead
DEBU[0000] /sbin/iptables, [–wait --version]
DEBU[0000] /sbin/iptables, [–wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -D PREROUTING]
DEBU[0000] /sbin/iptables, [–wait -t nat -D OUTPUT]
DEBU[0000] /sbin/iptables, [–wait -t nat -F DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -X DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -F DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -X DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -F DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -t filter -X DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -t nat -n -L DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -N DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -n -L DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -N DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -n -L DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -t filter -N DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -t filter -C DOCKER-ISOLATION -j RETURN]
DEBU[0000] /sbin/iptables, [–wait -I DOCKER-ISOLATION -j RETURN]
DEBU[0000] Registering ipam driver: "default"
DEBU[0000] Registering ipam driver: "null"
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.18.0.0/16. Daemon option --bip can be used to set a preferred IP address
DEBU[0000] Allocating IPv4 pools for network bridge (c4182064bd7b23f84799a280122f734837262e9906c2ffc762a3509b474691c5)
DEBU[0000] RequestPool(LocalDefault, 172.18.0.0/16, , map[], false)
DEBU[0000] RequestAddress(LocalDefault/172.18.0.0/16, , map[RequestAddressType:com.docker.network.gateway])
DEBU[0000] Setting bridge mac address to 02:42:ac:f6:e9:b9
DEBU[0000] Assigning address to bridge interface docker0: 172.18.0.1/16
DEBU[0000] /sbin/iptables, [–wait -t nat -C POSTROUTING -s 172.18.0.0/16 ! -o docker0 -j MASQUERADE]
DEBU[0000] /sbin/iptables, [–wait -t nat -I POSTROUTING -s 172.18.0.0/16 ! -o docker0 -j MASQUERADE]
DEBU[0000] /sbin/iptables, [–wait -t nat -C DOCKER -i docker0 -j RETURN]
DEBU[0000] /sbin/iptables, [–wait -t nat -I DOCKER -i docker0 -j RETURN]
DEBU[0000] /sbin/iptables, [–wait -D FORWARD -i docker0 -o docker0 -j DROP]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -I FORWARD -i docker0 -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -I FORWARD -i docker0 ! -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -I FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -t nat -C PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -C OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
DEBU[0000] /sbin/iptables, [–wait -t nat -A OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -o docker0 -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -I FORWARD -o docker0 -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -j DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -I FORWARD -j DOCKER-ISOLATION]
WARN[0000] Your kernel does not support cgroup memory limit
WARN[0000] Unable to find cpu cgroup in mounts
WARN[0000] Unable to find blkio cgroup in mounts
WARN[0000] Unable to find cpuset cgroup in mounts
WARN[0000] mountpoint for pids not found
DEBU[0000] Cleaning up old container shm/mqueue/rootfs mounts: start.
FATA[0000] Error starting daemon: Devices cgroup isn’t mounted
root@32450ab97db0:/go/src/github.com/docker/docker# docker daemon -D
DEBU[0000] docker group found. gid: 999
DEBU[0000] Listener created for HTTP on unix (/var/run/docker.sock)
DEBU[0000] Using default logging driver json-file
DEBU[0000] Golang’s threads limit set to 28260
INFO[0000] [graphdriver] using prior storage driver "aufs"
DEBU[0000] Using graph driver aufs
INFO[0000] Graph migration to content-addressability took 0.00 seconds
DEBU[0000] Option DefaultDriver: bridge
DEBU[0000] Option DefaultNetwork: bridge
WARN[0000] Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: …/libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.19.0-20-generic/modules.dep.bin’
modprobe: ERROR: …/libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file ‘/lib/modules/3.19.0-20-generic/modules.dep.bin’
, error: exit status 1
WARN[0000] Running modprobe nf_nat failed with message: modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.19.0-20-generic/modules.dep.bin', error: exit status 1
WARN[0000] Running modprobe xt_conntrack failed with message: modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.19.0-20-generic/modules.dep.bin', error: exit status 1
DEBU[0000] Fail to initialize firewalld: Failed to connect to D-Bus system bus: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory, using raw iptables instead
DEBU[0000] /sbin/iptables, [–wait --version]
DEBU[0000] /sbin/iptables, [–wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -D PREROUTING]
DEBU[0000] /sbin/iptables, [–wait -t nat -D OUTPUT]
DEBU[0000] /sbin/iptables, [–wait -t nat -F DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -X DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -F DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -X DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -F DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -t filter -X DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -t nat -n -L DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -N DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -n -L DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -n -L DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -t filter -C DOCKER-ISOLATION -j RETURN]
DEBU[0000] /sbin/iptables, [–wait -I DOCKER-ISOLATION -j RETURN]
DEBU[0000] Registering ipam driver: "default"
DEBU[0000] Registering ipam driver: "null"
DEBU[0000] releasing IPv4 pools from network bridge (c4182064bd7b23f84799a280122f734837262e9906c2ffc762a3509b474691c5)
DEBU[0000] ReleaseAddress(LocalDefault/172.18.0.0/16, 172.18.0.1)
DEBU[0000] ReleasePool(LocalDefault/172.18.0.0/16)
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.18.0.0/16. Daemon option --bip can be used to set a preferred IP address
DEBU[0000] Allocating IPv4 pools for network bridge (b3a9e4f2823ea767d6758f08ccc8b72fcb4db63288d89bed267e22653dc782d6)
DEBU[0000] RequestPool(LocalDefault, 172.18.0.0/16, , map[], false)
DEBU[0000] RequestAddress(LocalDefault/172.18.0.0/16, 172.18.0.1, map[RequestAddressType:com.docker.network.gateway])
DEBU[0000] /sbin/iptables, [–wait -t nat -C POSTROUTING -s 172.18.0.0/16 ! -o docker0 -j MASQUERADE]
DEBU[0000] /sbin/iptables, [–wait -t nat -C DOCKER -i docker0 -j RETURN]
DEBU[0000] /sbin/iptables, [–wait -t nat -I DOCKER -i docker0 -j RETURN]
DEBU[0000] /sbin/iptables, [–wait -D FORWARD -i docker0 -o docker0 -j DROP]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
DEBU[0000] /sbin/iptables, [–wait -t nat -C PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t nat -C OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
DEBU[0000] /sbin/iptables, [–wait -t nat -A OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -o docker0 -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -o docker0 -j DOCKER]
DEBU[0000] /sbin/iptables, [–wait -t filter -C FORWARD -j DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -D FORWARD -j DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [–wait -I FORWARD -j DOCKER-ISOLATION]
WARN[0000] Your kernel does not support cgroup memory limit
WARN[0000] Unable to find cpu cgroup in mounts
WARN[0000] Unable to find blkio cgroup in mounts
WARN[0000] Unable to find cpuset cgroup in mounts
WARN[0000] mountpoint for pids not found
DEBU[0000] Cleaning up old container shm/mqueue/rootfs mounts: start.
FATA[0000] Error starting daemon: Devices cgroup isn’t mounted
root@32450ab97db0:/go/src/github.com/docker/docker#

What did I do wrong? Help Thanks