我无法按照说明here在Ubuntu 15.10上启动并运行docker。
执行sudo apt-get install docker-engine
后,我得到以下内容:
Setting up docker-engine (1.10.2-0~wily) ...
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
这表明docker服务在安装后没有启动。我运行了以下命令以获得更多见解:
systemctl status docker.service -l
:
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─ubuntu.conf
Active: failed (Result: exit-code) since Tue 2016-03-01 12:55:45 SAST; 3min 26s ago
Docs: https://docs.docker.com
Process: 2073 ExecStart=/usr/bin/docker -d -H fd:// $DOCKER_OPTS (code=exited, status=125)
Main PID: 2073 (code=exited, status=125)
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: Starting Docker Application Container Engine...
Mar 01 12:55:45 lodewyk-Vostro-3560 docker[2073]: flag provided but not defined: -d
Mar 01 12:55:45 lodewyk-Vostro-3560 docker[2073]: See '/usr/bin/docker --help'.
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: Failed to start Docker Application Container Engine.
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: docker.service: Unit entered failed state.
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: docker.service: Failed with result 'exit-code'.
journalctl -xe
:
-- Unit docker.service has begun starting up.
Mar 01 12:55:45 lodewyk-Vostro-3560 docker[2073]: flag provided but not defined: -d
Mar 01 12:55:45 lodewyk-Vostro-3560 docker[2073]: See '/usr/bin/docker --help'.
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: docker.service: Main process exited, code=exited, status=
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: docker.service: Unit entered failed state.
Mar 01 12:55:45 lodewyk-Vostro-3560 systemd[1]: docker.service: Failed with result 'exit-code'.
手动启动守护程序似乎工作正常:
sudo docker daemon -D
:
DEBU[0000] docker group found. gid: 999
DEBU[0000] Server created for HTTP on unix (/var/run/docker.sock)
DEBU[0000] Using default logging driver json-file
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
INFO[0000] Firewalld running: false
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] releasing IPv4 pools from network bridge (4be0f7c661962b7f6a6463d5a5497eff6298b7989a952c3bb84704f2dad97a82)
DEBU[0000] ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.1)
DEBU[0000] ReleasePool(LocalDefault/172.17.0.0/16)
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
DEBU[0000] Allocating IPv4 pools for network bridge (409fea567a03f72bc33f1cbe0fe82b2e0d7969bc8471e5741da91c7de0289e89)
DEBU[0000] RequestPool(LocalDefault, 172.17.0.0/16, , map[], false)
DEBU[0000] RequestAddress(LocalDefault/172.17.0.0/16, 172.17.0.1, map[RequestAddressType:com.docker.network.gateway])
DEBU[0000] /sbin/iptables, [--wait -t nat -C POSTROUTING -s 172.17.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 swap memory limit.
DEBU[0000] Cleaning up old shm/mqueue mounts: start.
DEBU[0000] Cleaning up old shm/mqueue mounts: done.
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2
DEBU[0000] Registering routers
DEBU[0000] Registering HEAD, /containers/{name:.*}/archive
DEBU[0000] Registering GET, /containers/json
DEBU[0000] Registering GET, /containers/{name:.*}/export
DEBU[0000] Registering GET, /containers/{name:.*}/changes
DEBU[0000] Registering GET, /containers/{name:.*}/json
DEBU[0000] Registering GET, /containers/{name:.*}/top
DEBU[0000] Registering GET, /containers/{name:.*}/logs
DEBU[0000] Registering GET, /containers/{name:.*}/stats
DEBU[0000] Registering GET, /containers/{name:.*}/attach/ws
DEBU[0000] Registering GET, /exec/{id:.*}/json
DEBU[0000] Registering GET, /containers/{name:.*}/archive
DEBU[0000] Registering POST, /containers/create
DEBU[0000] Registering POST, /containers/{name:.*}/kill
DEBU[0000] Registering POST, /containers/{name:.*}/pause
DEBU[0000] Registering POST, /containers/{name:.*}/unpause
DEBU[0000] Registering POST, /containers/{name:.*}/restart
DEBU[0000] Registering POST, /containers/{name:.*}/start
DEBU[0000] Registering POST, /containers/{name:.*}/stop
DEBU[0000] Registering POST, /containers/{name:.*}/wait
DEBU[0000] Registering POST, /containers/{name:.*}/resize
DEBU[0000] Registering POST, /containers/{name:.*}/attach
DEBU[0000] Registering POST, /containers/{name:.*}/copy
DEBU[0000] Registering POST, /containers/{name:.*}/exec
DEBU[0000] Registering POST, /exec/{name:.*}/start
DEBU[0000] Registering POST, /exec/{name:.*}/resize
DEBU[0000] Registering POST, /containers/{name:.*}/rename
DEBU[0000] Registering POST, /containers/{name:.*}/update
DEBU[0000] Registering PUT, /containers/{name:.*}/archive
DEBU[0000] Registering DELETE, /containers/{name:.*}
DEBU[0000] Registering GET, /images/json
DEBU[0000] Registering GET, /images/search
DEBU[0000] Registering GET, /images/get
DEBU[0000] Registering GET, /images/{name:.*}/get
DEBU[0000] Registering GET, /images/{name:.*}/history
DEBU[0000] Registering GET, /images/{name:.*}/json
DEBU[0000] Registering POST, /commit
DEBU[0000] Registering POST, /images/create
DEBU[0000] Registering POST, /images/load
DEBU[0000] Registering POST, /images/{name:.*}/push
DEBU[0000] Registering POST, /images/{name:.*}/tag
DEBU[0000] Registering DELETE, /images/{name:.*}
DEBU[0000] Registering GET, /networks
DEBU[0000] Registering GET, /networks/{id:.*}
DEBU[0000] Registering POST, /networks/create
DEBU[0000] Registering POST, /networks/{id:.*}/connect
DEBU[0000] Registering POST, /networks/{id:.*}/disconnect
DEBU[0000] Registering DELETE, /networks/{id:.*}
DEBU[0000] Registering OPTIONS, /{anyroute:.*}
DEBU[0000] Registering GET, /_ping
DEBU[0000] Registering GET, /events
DEBU[0000] Registering GET, /info
DEBU[0000] Registering GET, /version
DEBU[0000] Registering POST, /auth
DEBU[0000] Registering GET, /volumes
DEBU[0000] Registering GET, /volumes/{name:.*}
DEBU[0000] Registering POST, /volumes/create
DEBU[0000] Registering DELETE, /volumes/{name:.*}
DEBU[0000] Registering POST, /build
INFO[0000] API listen on /var/run/docker.sock
docker version
:
Client:
Version: 1.10.2
API version: 1.22
Go version: go1.5.3
Git commit: c3959b1
Built: Mon Feb 22 21:40:35 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.2
API version: 1.22
Go version: go1.5.3
Git commit: c3959b1
Built: Mon Feb 22 21:40:35 2016
OS/Arch: linux/amd64
docker info
:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.10.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.2.0-30-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.54 GiB
Name: lodewyk-Vostro-3560
ID: Q54Q:Y6EV:M5GL:LJMZ:Z5Q6:2U2U:QHFK:UL5O:3FF6:PUOR:Z7IQ:WKME
Debug mode (server): true
File Descriptors: 11
Goroutines: 30
System Time: 2016-03-01T13:14:30.859976076+02:00
EventsListeners: 0
Init SHA1: aa0828af5f3b48c398d9231a4c1aba310a01561d
Init Path: /usr/lib/docker/dockerinit
Docker Root Dir: /var/lib/docker
WARNING: No swap limit support
我已尝试完全删除Docker以及删除/var/lib/docker
文件并重新安装。我还将自己添加到了泊坞组sudo usermod -aG docker <username>
&gt;我还确保DOCKER_HOST
变量未设置。
任何帮助都将受到高度赞赏。