linux - docker cannot start container after reboot use '--restart-always' -


i want container auto-start after computer reboot, use '--restart=always' flag, don't run expected. when reboot system, container didn't startup.

i'v tried change storage driver aufs overlay2, use '-s overlay2', didn't help.

$ uname  -a linux debianv 4.9.0-1-amd64 #1 smp debian 4.9.2-2 (2017-01-12) x86_64 gnu/linux  $ docker version client:  version:      1.13.0  api version:  1.25  go version:   go1.7.3  git commit:   49bf474  built:        tue jan 17 09:44:08 2017  os/arch:      linux/amd64  server:  version:      1.13.0  api version:  1.25 (minimum version 1.12)  go version:   go1.7.3  git commit:   49bf474  built:        tue jan 17 09:44:08 2017  os/arch:      linux/amd64  experimental: false  $ docker info containers: 2  running: 0  paused: 0  stopped: 2 images: 2 server version: 1.13.0 storage driver: overlay2                                                                                                                                                                                             backing filesystem: extfs                                                                                                                                                                                           supports d_type: true                                                                                                                                                                                               native overlay diff: true                                                                                                                                                                                          logging driver: json-file                                                                                                                                                                                           cgroup driver: cgroupfs                                                                                                                                                                                             plugins:                                                                                                                                                                                                             volume: local                                                                                                                                                                                                       network: bridge host macvlan null overlay                                                                                                                                                                          swarm: inactive                                                                                                                                                                                                     runtimes: runc                                                                                                                                                                                                      default runtime: runc                                                                                                                                                                                               init binary: docker-init                                                                                                                                                                                            containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e runc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e init version: 949e6fa kernel version: 4.9.0-1-amd64 operating system: debian gnu/linux 9 (stretch) ostype: linux architecture: x86_64 cpus: 4 total memory: 7.708 gib name: debianv id: nisj:r6jz:vzni:ybi7:k4zq:agtr:lysm:kort:lqe2:rsg5:aq6b:iedp docker root dir: /var/lib/docker debug mode (client): false debug mode (server): true  file descriptors: 14  goroutines: 21  system time: 2017-02-07t05:24:11.646839781-05:00  eventslisteners: 0 registry: https://index.docker.io/v1/ warning: no swap limit support experimental: false insecure registries:  127.0.0.0/8 live restore enabled: false 

docker command

docker run -d --restart=always --name db-mysql -e mysql_root_password=123456 -p 0.0.0.0:3306:3306/tcp mysql:8.0 

docker log info

feb 07 18:20:25 debianv systemd[1]: starting docker application container engine... feb 07 18:20:25 debianv dockerd[641]: time="2017-02-07t05:20:25.678236807-05:00" level=debug msg="listener created http on fd ()" feb 07 18:20:25 debianv dockerd[641]: time="2017-02-07t05:20:25.680978493-05:00" level=info msg="libcontainerd: new containerd process, pid: 689" feb 07 18:20:25 debianv dockerd[641]: time="2017-02-07t05:20:25.73650121-05:00" level=debug msg="containerd: read past events" count=0 feb 07 18:20:25 debianv dockerd[641]: time="2017-02-07t05:20:25.736734581-05:00" level=debug msg="containerd: supervisor running" cpus=4 memory=7892 runtime=docker-runc runtimeargs=[] statedir="/var/run/docker/libcontainerd/containerd" feb 07 18:20:25 debianv dockerd[641]: time="2017-02-07t05:20:25.736883058-05:00" level=debug msg="containerd: grpc api on /var/run/docker/libcontainerd/docker-containerd.sock" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.184662338-05:00" level=debug msg="libcontainerd: containerd health check returned error: rpc error: code = 14 desc = grpc: connection unavailable" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.682885811-05:00" level=debug msg="libcontainerd: containerd health check returned error: rpc error: code = 14 desc = grpc: connection unavailable" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.685111343-05:00" level=debug msg="using default logging driver json-file" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.685162198-05:00" level=debug msg="golang's threads limit set 56160" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.692662747-05:00" level=debug msg="[graphdriver] trying provided driver: overlay2" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.706786753-05:00" level=debug msg="backingfs=extfs,  projectquotasupported=false" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.706818944-05:00" level=debug msg="using graph driver overlay2" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.760129005-05:00" level=debug msg="max concurrent downloads: 3" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.760168524-05:00" level=debug msg="max concurrent uploads: 5" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.797342606-05:00" level=info msg="graph migration content-addressability took 0.00 seconds" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.797592133-05:00" level=warning msg="your kernel not support swap memory limit." feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.797655597-05:00" level=warning msg="your kernel not support cgroup rt period" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.797672209-05:00" level=warning msg="your kernel not support cgroup rt runtime" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.798426501-05:00" level=info msg="loading containers: start." feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.801134155-05:00" level=debug msg="loaded container 20b7feb5fd9f9317971ccf0beef82822293064a17ee0253d15f2d28d7701b010" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.802298081-05:00" level=debug msg="loaded container a1f4d5471b0aaa56df52dda1253cb325477f8f83e7f41a5441b64384d4750471" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.812496877-05:00" level=debug msg="option experimental: false" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.812527852-05:00" level=debug msg="option defaultdriver: bridge" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.812539738-05:00" level=debug msg="option defaultnetwork: bridge" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.841694577-05:00" level=info msg="firewalld running: false" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.856005602-05:00" level=debug msg="/sbin/iptables, [--wait --version]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.857414764-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -d prerouting -m addrtype --dst-type local -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.869113924-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -d output -m addrtype --dst-type local ! --dst 127.0.0.0/8 -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.870838360-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -d output -m addrtype --dst-type local -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.872793309-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -d prerouting]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.874958085-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -d output]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.876162603-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -f docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.877293053-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -x docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.878215362-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -f docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.879117490-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -x docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.880245980-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -f docker-isolation]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.881168273-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -x docker-isolation]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.882179754-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -n -l docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.883202411-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -n docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.884433600-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -n -l docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.885449539-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -n docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.886769951-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -n -l docker-isolation]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.888174540-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -n docker-isolation]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.889467417-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c docker-isolation -j return]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.890676291-05:00" level=debug msg="/sbin/iptables, [--wait -i docker-isolation -j return]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.892376504-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -p forward drop]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.900192096-05:00" level=debug msg="did not find interface name docker0: link not found" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.900686508-05:00" level=debug msg="setting bridge mac address 02:42:09:8e:c7:3a" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.900747358-05:00" level=debug msg="assigning address bridge interface docker0: 172.17.0.1/16" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.900821155-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c postrouting -s 172.17.0.0/16 ! -o docker0 -j masquerade]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.903652800-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -i postrouting -s 172.17.0.0/16 ! -o docker0 -j masquerade]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.908402753-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c docker -i docker0 -j return]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.909608576-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -i docker -i docker0 -j return]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.910667632-05:00" level=debug msg="/sbin/iptables, [--wait -d forward -i docker0 -o docker0 -j drop]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.911902773-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -i docker0 -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.912940558-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -i docker0 -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.914235636-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -i docker0 ! -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.915534854-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -i docker0 ! -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.916885890-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -o docker0 -m conntrack --ctstate related,established -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.918711320-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -o docker0 -m conntrack --ctstate related,established -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.920141785-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c prerouting -m addrtype --dst-type local -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.921204395-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -a prerouting -m addrtype --dst-type local -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.922592836-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c output -m addrtype --dst-type local -j docker ! --dst 127.0.0.0/8]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.924188236-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -a output -m addrtype --dst-type local -j docker ! --dst 127.0.0.0/8]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.925686674-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -o docker0 -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.926696577-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -o docker0 -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.927727203-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -j docker-isolation]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.928674510-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -j docker-isolation]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.929826720-05:00" level=debug msg="network (1051b85) restored" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.948430206-05:00" level=debug msg="allocating ipv4 pools network bridge (1051b850f6816ed2aee01f557af3d6916f2351af3db10663f7994d3fc3309a20)" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.948744303-05:00" level=debug msg="requestpool(localdefault, 172.17.0.0/16, , map[], false)" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.948808713-05:00" level=debug msg="requestaddress(localdefault/172.17.0.0/16, 172.17.0.1, map[requestaddresstype:com.docker.network.gateway])" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.952487468-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c postrouting -s 172.17.0.0/16 ! -o docker0 -j masquerade]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.955374734-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -d postrouting -s 172.17.0.0/16 ! -o docker0 -j masquerade]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.956724396-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c docker -i docker0 -j return]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.958499869-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -d docker -i docker0 -j return]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.959668312-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -i docker0 -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.961694367-05:00" level=debug msg="/sbin/iptables, [--wait -d forward -i docker0 -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.962988747-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -i docker0 ! -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.964140719-05:00" level=debug msg="/sbin/iptables, [--wait -d forward -i docker0 ! -o docker0 -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.966230938-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -o docker0 -m conntrack --ctstate related,established -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.967920820-05:00" level=debug msg="/sbin/iptables, [--wait -d forward -o docker0 -m conntrack --ctstate related,established -j accept]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.969579637-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -o docker0 -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.982011576-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -o docker0 -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.983855543-05:00" level=debug msg="/sbin/iptables, [--wait -d forward -o docker0 -j docker]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.988900941-05:00" level=debug msg="releasing ipv4 pools network bridge (1051b850f6816ed2aee01f557af3d6916f2351af3db10663f7994d3fc3309a20)" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.988938606-05:00" level=debug msg="releaseaddress(localdefault/172.17.0.0/16, 172.17.0.1)" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.988964218-05:00" level=debug msg="releasepool(localdefault/172.17.0.0/16)" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.996004689-05:00" level=info msg="default bridge (docker0) assigned ip address 172.17.0.0/16. daemon option --bip can used set preferred ip address" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.996077622-05:00" level=debug msg="allocating ipv4 pools network bridge (5d008ad86bc279feae6bb57a19443068fc5e9bc23894383dbd23d8e552ae4972)" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.996099738-05:00" level=debug msg="requestpool(localdefault, 172.17.0.0/16, , map[], false)" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.996138331-05:00" level=debug msg="requestaddress(localdefault/172.17.0.0/16, 172.17.0.1, map[requestaddresstype:com.docker.network.gateway])" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.996338899-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c postrouting -s 172.17.0.0/16 ! -o docker0 -j masquerade]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.998045755-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -i postrouting -s 172.17.0.0/16 ! -o docker0 -j masquerade]" feb 07 18:20:26 debianv dockerd[641]: time="2017-02-07t05:20:26.999890769-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c docker -i docker0 -j return]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.001411556-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -i docker -i docker0 -j return]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.002796387-05:00" level=debug msg="/sbin/iptables, [--wait -d forward -i docker0 -o docker0 -j drop]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.005507596-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -i docker0 -o docker0 -j accept]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.007945397-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -i docker0 -o docker0 -j accept]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.009553277-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -i docker0 ! -o docker0 -j accept]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.011134636-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -i docker0 ! -o docker0 -j accept]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.012863616-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -o docker0 -m conntrack --ctstate related,established -j accept]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.014507969-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -o docker0 -m conntrack --ctstate related,established -j accept]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.016206339-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c prerouting -m addrtype --dst-type local -j docker]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.017849596-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c prerouting -m addrtype --dst-type local -j docker]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.019419670-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c output -m addrtype --dst-type local -j docker ! --dst 127.0.0.0/8]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.021080108-05:00" level=debug msg="/sbin/iptables, [--wait -t nat -c output -m addrtype --dst-type local -j docker ! --dst 127.0.0.0/8]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.022686053-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -o docker0 -j docker]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.024285206-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -o docker0 -j docker]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.031344452-05:00" level=debug msg="/sbin/iptables, [--wait -t filter -c forward -j docker-isolation]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.038642024-05:00" level=debug msg="/sbin/iptables, [--wait -d forward -j docker-isolation]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.040342056-05:00" level=debug msg="/sbin/iptables, [--wait -i forward -j docker-isolation]" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.052652239-05:00" level=debug msg="starting container a1f4d5471b0aaa56df52dda1253cb325477f8f83e7f41a5441b64384d4750471" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.061762755-05:00" level=debug msg="container mounted via layerstore: /var/lib/docker/overlay2/3d26a41419b24a29c56cb045fc3e36377f612ae4afe72e4bec71d5b621be1098/merged" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.062039104-05:00" level=debug msg="assigning addresses endpoint db-mysql's interface on network bridge" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.062068648-05:00" level=debug msg="requestaddress(localdefault/172.17.0.0/16, <nil>, map[])" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.073698920-05:00" level=debug msg="assigning addresses endpoint db-mysql's interface on network bridge" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.133676914-05:00" level=debug msg="releasing addresses endpoint db-mysql's interface on network bridge" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.133709009-05:00" level=debug msg="releaseaddress(localdefault/172.17.0.0/16, 172.17.0.2)" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.140074937-05:00" level=warning msg="error locating sandbox id 3379ca22818f326ee78d83327c1a927ff9c10862b24d051eddda3455cddf63a7: sandbox 3379ca22818f326ee78d83327c1a927ff9c10862b24d051eddda3455cddf63a7 not found" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.140156532-05:00" level=warning msg="failed cleanup ipc mounts:\nfailed umount /var/lib/docker/containers/a1f4d5471b0aaa56df52dda1253cb325477f8f83e7f41a5441b64384d4750471/shm: invalid argument" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.159819035-05:00" level=error msg="failed start container a1f4d5471b0aaa56df52dda1253cb325477f8f83e7f41a5441b64384d4750471: open /etc/resolv.conf: no such file or directory" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.159867740-05:00" level=info msg="loading containers: done." feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.206574056-05:00" level=info msg="daemon has completed initialization" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.207257097-05:00" level=info msg="docker daemon" commit=49bf474 graphdriver=overlay2 version=1.13.0 feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.207778425-05:00" level=debug msg="registering routers" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.208066178-05:00" level=debug msg="registering get, /containers/{name:.*}/checkpoints" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.208270977-05:00" level=debug msg="registering post, /containers/{name:.*}/checkpoints" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.208363039-05:00" level=debug msg="registering delete, /containers/{name}/checkpoints/{checkpoint}" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.208496291-05:00" level=debug msg="registering head, /containers/{name:.*}/archive" feb 07 18:20:27 debianv dockerd[641]: time="2017-02-07t05:20:27.208638014-05:00" level=debug msg="registering get, /containers/json" 

add docker ps -a message, $ docker ps -a container id image command created status ports names a1f4d5471b0a mysql:8.0 "docker-entrypoint..." 15 hours ago exited (128) 17 minutes ago db-mysql 20b7feb5fd9f hello-world "/hello" 16 hours ago exited (0) 16 hours ago youthful_golick

i user '$ docker logs db-mysql' show container last log time, it's not change after reboot. think it's not condition of container started after reboot, , exit later

my problem solved. caused missing of /etc/resolv.conf during docker start.

docker daemon try start container, cannot find file /etc/resolv.conf, failed.

/etc/reslv.conf link file /var/run/networkmanger/resolv.conf.
in os, /etc/resolv.conf updated networkmanager, because not static ip, ,before login , connect network, file not exist!

i change config of networkmanger in /etc/networkmanager/networkmanager.conf, set 'dns=none' in [main] area, stop modify resolv.conf. @ same time remove link file /etc/resolv.conf, add new file /etc/resolv.conf, 'nameserver=8.8.8.8'

after reboot, docker container can autostart, works fine!


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -