天天看点

sudo iptables -L -n

DOCKER-ISOLATION  all  --  0.0.0.0/0            0.0.0.0/0           

DOCKER     all  --  0.0.0.0/0            0.0.0.0/0           

ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED

ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination         

Chain DOCKER (1 references)

target     prot opt source               destination         

ACCEPT     tcp  --  0.0.0.0/0            172.17.0.3           tcp dpt:48

ACCEPT     tcp  --  0.0.0.0/0            172.17.0.6           tcp dpt:44

ACCEPT     tcp  --  0.0.0.0/0            172.17.0.4           tcp dpt:46

Chain DOCKER-ISOLATION (1 references)

target     prot opt source               destination         

RETURN     all  --  0.0.0.0/0            0.0.0.0/0           

[email protected] :~$ sudo iptables -F

[email protected]:~$ sudo iptables -L -n

Chain INPUT (policy ACCEPT)

target     prot opt source               destination         

Chain FORWARD (policy DROP)

target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination         

Chain DOCKER (0 references)

target     prot opt source               destination         

Chain DOCKER-ISOLATION (0 references)

target     prot opt source               destination         

[email protected]:~$ sudo systemctl stop  docker.service

Warning: Stopping docker.service, but it can still be activated by:

  docker.socket

[email protected]:~$ 

[email protected]:~$ 

[email protected] e1:~$ systemctl status docker.service

● docker.service - Docker Application Container Engine

   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)

   Active: inactive (dead) since 四 2018-03-08 15:26:13 CST; 19s ago

     Docs: https://docs.docker.com

 Main PID: 57333 (code=exited, status=0/SUCCESS)

3月 08 15:19:51 machine1 dockerd[57333]: time="2018-03-08T15:19:51.806706003+08:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/6cbd4ca87305352f14b18b5696e483ae2ce

3月 08 15:19:52 machine1 dockerd[57333]: time="2018-03-08T15:19:52.198327617+08:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/2ca171dc92df19f56233c954d7fae0493af

3月 08 15:21:58 machine1 dockerd[57333]: time="2018-03-08T15:21:58.845654398+08:00" level=error msg="attach: stdin: detached from container"

3月 08 15:26:07 machine1 dockerd[57333]: time="2018-03-08T15:26:07.725369181+08:00" level=info msg="Processing signal 'terminated'"

3月 08 15:26:07 machine1 systemd[1]: Stopping Docker Application Container Engine...

3月 08 15:26:08 machine1 dockerd[57333]: time="2018-03-08T15:26:08.807115668+08:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/aa6f7a5ba73f6b79f534ef30ad7260b3bea

3月 08 15:26:10 machine1 dockerd[57333]: time="2018-03-08T15:26:10.161640430+08:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/104e44706fa1263aacb1f77b76549457268

3月 08 15:26:10 machine1 dockerd[57333]: time="2018-03-08T15:26:10.462594994+08:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/b16480150ad4c14d606ce155bb7271e53df

3月 08 15:26:12 machine1 dockerd[57333]: time="2018-03-08T15:26:12.209473884+08:00" level=info msg="stopping containerd after receiving terminated"

3月 08 15:26:13 machine1 systemd[1]: Stopped Docker Application Container Engine.

[email protected]:~$ 

[email protected] 1:~$ sudo systemctl start  docker.service

[email protected]:~$ 

[email protected]:~$ 

[email protected]:~$ 

[email protected]:~$ 

[email protected]:~$ systemctl status docker.service

● docker.service - Docker Application Container Engine

   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)

   Active: active (running) since 四 2018-03-08 15:26:56 CST; 2s ago

     Docs: https://docs.docker.com

 Main PID: 12230 (dockerd)

    Tasks: 20

   Memory: 15.3M

      CPU: 5.500s

   CGroup: /system.slice/docker.service

           ├─12230 /usr/bin/dockerd -H fd://

           └─12254 containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim contai

3月 08 15:26:53 machine1 dockerd[12230]: time="2018-03-08T15:26:53.997613679+08:00" level=info msg="Firewalld running: false"

3月 08 15:26:55 machine1 dockerd[12230]: time="2018-03-08T15:26:55.121924652+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be u

3月 08 15:26:55 machine1 dockerd[12230]: time="2018-03-08T15:26:55.229168565+08:00" level=info msg="Loading containers: done."

3月 08 15:26:55 machine1 dockerd[12230]: time="2018-03-08T15:26:55.338655602+08:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/tmp/docker-aufs-union268871883: exec: \"aupl

3月 08 15:26:56 machine1 dockerd[12230]: time="2018-03-08T15:26:56.187439428+08:00" level=warning msg="failed to retrieve runc version: unknown output format: runc version spec: 1.0.0-rc2-dev\n"

3月 08 15:26:56 machine1 dockerd[12230]: time="2018-03-08T15:26:56.188880982+08:00" level=warning msg="failed to retrieve docker-init version: unknown output format: tini version 0.13.0\n"

3月 08 15:26:56 machine1 dockerd[12230]: time="2018-03-08T15:26:56.200311326+08:00" level=info msg="Daemon has completed initialization"

3月 08 15:26:56 machine1 dockerd[12230]: time="2018-03-08T15:26:56.200623917+08:00" level=info msg="Docker daemon" commit=092cba3 graphdriver=aufs version=1.13.1

3月 08 15:26:56 machine1 systemd[1]: Started Docker Application Container Engine.

3月 08 15:26:56 machine1 dockerd[12230]: time="2018-03-08T15:26:56.313199369+08:00" level=info msg="API listen on /var/run/docker.sock"

[email protected] e1:~$ sudo iptables -L -n

Chain INPUT (policy ACCEPT)

target     prot opt source               destination         

Chain FORWARD (policy DROP)

target     prot opt source               destination         

DOCKER-ISOLATION  all  --  0.0.0.0/0            0.0.0.0/0           

DOCKER     all  --  0.0.0.0/0            0.0.0.0/0           

ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED

ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination         

Chain DOCKER (1 references)

target     prot opt source               destination         

Chain DOCKER-ISOLATION (1 references)

target     prot opt source               destination         

RETURN     all  --  0.0.0.0/0            0.0.0.0/0           

[email protected]:~$ 

继续阅读