为什么docker启动了这么多的守护进程?

为什么docker启动了这么多的守护进程?

看起来Docker把主stream程分成了几个其他的。 例如,在重新启动之后,这里是我的控制台的输出,当我键入$ htop然后是F5时:

许多docker进程http://img.gdocker.com/process/331078manydockerprocesses.png

已经有6个孩子了! 但是,我没有任何运行容器,只有2个停止的容器:

 $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a24f25e42c50 jupyter/datascience-notebook "tini -- start-notebo" 44 hours ago Exited (0) 3 hours ago prickly_spence 728166c38396 nginx "nginx -g 'daemon off" 4 days ago Exited (0) 3 hours ago some-nginx 

这是有问题的,因为很多subprocess在一段时间后开始出现,并且每个进程都使用了大约40 MB的内存,所以当你有几十个进程时,就会出现问题! 所以我的两个问题是:

  • 我猜对了吗? docker run -d ...将分叉父守护进程,永远不会杀死孩子?
  • 为什么重启后仍然有6个subprocess? 我怎样才能清洁这个?

提前,非常感谢您的帮助! 🙂


额外信息:

$ docker info ,你看到我在Ubuntu 14.04.4 LTS上运行:

 Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 1 Server Version: 1.10.3 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 10 Dirperm1 Supported: false Execution Driver: native-0.2 Logging Driver: json-file Plugins: Volume: local Network: null host bridge Kernel Version: 3.13.0-55-generic Operating System: Ubuntu 14.04.4 LTS OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 3.767 GiB Name: *I censored this* ID: *I censored this* WARNING: No swap limit support 

$ docker version

 Client: Version: 1.10.3 API version: 1.22 Go version: go1.5.3 Git commit: 20f81dd Built: Thu Mar 10 15:54:52 2016 OS/Arch: linux/amd64 Server: Version: 1.10.3 API version: 1.22 Go version: go1.5.3 Git commit: 20f81dd Built: Thu Mar 10 15:54:52 2016 OS/Arch: linux/amd64