- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我想让容器在计算机重启后自动启动,所以我使用了“--restart=always”标志,但它没有按预期运行。当我重新启动系统时,容器没有启动。
我曾尝试将存储驱动程序从 aufs 更改为 overlay2,使用“-s overlay2”,但我没有帮助。
$ 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 命令
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 日志信息
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 for 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: the connection is 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: the connection is 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 to 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 to 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 does 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 does 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 does 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 any interface with 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 to 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 to 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 for 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 from 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) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a 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 for 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 for 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 for 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 for 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 to cleanup ipc mounts:\nfailed to 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 to 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"
添加 docker ps -a 消息, $ docker ps -a 容器 ID 图像命令创建状态端口名称 a1f4d5471b0a mysql:8.0 "docker-entrypoint..."15 小时前退出 (128) 17 分钟前 db-mysql 20b7feb5fd9f hello-world "/hello"16 小时前退出 (0) 16 小时前 youthful_golick
i user '$ docker logs db-mysql' 显示容器上次登录时间,重启后不会改变。所以我觉得不是容器重启后启动,稍后退出的情况
最佳答案
我的问题解决了。这是由于在docker 启动过程中缺少/etc/resolv.conf 造成的。
docker daemon 尝试启动容器,但找不到文件/etc/resolv.conf,因此失败。
/etc/reslv.conf 是/var/run/NetworkManger/resolv.conf 的链接文件。
在我的操作系统中,/etc/resolv.conf 将由 NetworkManager 更新,因为它不是静态 ip,所以,在我登录并连接到网络之前,这个文件不存在!
我在/etc/NetworkManager/NetworkManager.conf 中更改NetworkManger 的配置,在[main] 区域中设置'dns=none',因此它停止修改resolv.conf。同时删除链接文件/etc/resolv.conf,为/etc/resolv.conf添加一个新文件,如'nameserver=8.8.8.8'
重新启动后,docker 容器可以自动启动,工作正常!
关于linux - 重新启动后 docker 无法启动容器使用 '--restart-always',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42088043/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
Linux 管道可以缓冲多少数据?这是可配置的吗? 如果管道的两端在同一个进程中,但线程不同,这会有什么不同吗? 请注意:这个“同一个进程,两个线程”的问题是理论上的边栏,真正的问题是关于缓冲的。 最
我找到了here [最后一页] 一种有趣的通过 Linux 启动 Linux 的方法。不幸的是,它只是被提及,我在网上找不到任何有用的链接。那么有人听说过一种避免引导加载程序而使用 Linux 的方法
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
我试图了解 ld-linux.so 如何在 Linux 上解析对版本化符号的引用。我有以下文件: 测试.c: void f(); int main() { f(); } a.c 和 b.c:
与 RetroPie 的工作原理类似,我可以使用 Linux 应用程序作为我的桌面环境吗?我实际上并不需要像实际桌面和安装应用程序这样的东西。我只需要一种干净简单的方法来在 RaspberryPi 上
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 10 年前。 Improve thi
有什么方法可以覆盖现有的源代码,我应该用 PyQt、PyGTK、Java 等从头开始构建吗? 最佳答案 如果您指的是软件本身而不是它所连接的存储库,那么自定义应用程序的方法就是 fork 项目。据我所
我的情况是:我在一个磁盘上安装了两个 linux。我将第一个安装在/dev/sda1 中,然后在/dev/sda2 中安装第二个然后我运行第一个系统,我写了一个脚本来在第一个系统运行时更新它。
我在 i2c-0 总线上使用地址为 0x3f 的系统监视器设备。该设备在设备树中配置有 pmbus 驱动程序。 问题是,加载 linux 内核时,这个“Sysmon”设备没有供电。因此,当我在总线 0
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
我正试图在 linux 模块中分配一大块内存,而 kalloc 做不到。 我知道唯一的方法是使用 alloc_bootmem(unsigned long size) 但我只能从 linux 内核而不是
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我有 .sh 文件来运行应用程序。在该文件中,我想动态设置服务器名称,而不是每次都配置。 我尝试了以下方法,它在 CentOS 中运行良好。 nohup /voip/java/jdk1.8.0_71/
我是在 Linux 上开发嵌入式 C++ 程序的新手。我有我的 Debian 操作系统,我在其中开发和编译了我的 C++ 项目(一个简单的控制台进程)。 我想将我的应用程序放到另一个 Debian 操
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 4 年前。 Improve this ques
我使用4.19.78版本的稳定内核,我想找到带有企鹅二进制数据的C数组。系统启动时显示。我需要在哪里搜索该内容? 我在 include/linux/linux_logo.h 文件中只找到了一些 Log
我知道可以使用 gdb 的服务器模式远程调试代码,我知道可以调试针对另一种架构交叉编译的代码,但是是否可以更进一步,从远程调试 Linux 应用程序OS X 使用 gdbserver? 最佳答案 当然
是否有任何可能的方法来运行在另一个 Linux 上编译的二进制文件?我知道当然最简单的是在另一台机器上重建它,但假设我们唯一能得到的是一个二进制文件,那么这可能与否? (我知道这可能并不容易,但我只是
我是一名优秀的程序员,十分优秀!