为什么swarm不能清理旧容器

时间:2017-10-18 11:19:15

标签: docker docker-swarm

docker swarm update --image newImg更新容器图像后,我检查了容器列表docker ps -a并看到许多容器仍然存在但已停止

4d4753bbbc68        serviceA@sha256:81333c059f81340dcfad01ad4f09498956cdc9eadc0552f22b8b323554ec2ced   "service.py"         9 minutes ago       Up 9 minutes                                                serviceA.5.pya3ka5j1hfrt8h3ip47alx6k
bc777058b504        serviceA@sha256:81333c059f81340dcfad01ad4f09498956cdc9eadc0552f22b8b323554ec2ced   "service.py"         9 minutes ago       Up 9 minutes                                                serviceA.1.k59s3dd3r7h7yf5so035ddr87
7fdfcbd0251e        serviceA@sha256:81333c059f81340dcfad01ad4f09498956cdc9eadc0552f22b8b323554ec2ced   "service.py"         9 minutes ago       Up 9 minutes                                                serviceA.3.w8dsvjjkw5bwolka9s7pa7j4g
b50ac059d801        serviceA@sha256:81333c059f81340dcfad01ad4f09498956cdc9eadc0552f22b8b323554ec2ced   "service.py"         10 minutes ago      Up 9 minutes                                                serviceA.2.223vk9hrd0ozjwpmdv0uk16fp
f9dfb2478cf8        serviceA@sha256:81333c059f81340dcfad01ad4f09498956cdc9eadc0552f22b8b323554ec2ced   "service.py"         10 minutes ago      Up 10 minutes                                               serviceA.4.27lgp5wakt1m9as1l8g4ypdxu
27ff904c13a3        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         12 minutes ago      Exited (137) 9 minutes ago                                  serviceA.1.sd3gh12r5y33gpqualv787u8n
aff08c144eea        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         12 minutes ago      Exited (137) 9 minutes ago                                  serviceA.2.koede0ww0nqz3mowiltomtl1v
2fb7b54255c1        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         12 minutes ago      Exited (137) 10 minutes ago                                 serviceA.4.hpatzok3cbaiz3vea6jl8rt31
77746f0fd9a1        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         13 minutes ago      Exited (137) 9 minutes ago                                  serviceA.5.usucdxxobjlozpqqb7qmfhcyj
1e42aea4d1b1        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         13 minutes ago      Exited (137) 9 minutes ago                                  serviceA.3.pi6ueashgsqncusgcmn651pl5
83ea51930352        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         8 days ago          Exited (137) 12 minutes ago                                 serviceA.5.7f9kl4vkp94nkfadsdk27ryb2
4cf61a758cbf        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         8 days ago          Exited (137) 12 minutes ago                                 serviceA.4.iplu7tjyhp3o52ksy6azft6ze
854a4805766c        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         8 days ago          Exited (137) 12 minutes ago                                 serviceA.2.ntcw5rgoce21n60rds5ncnflq
6ca327779108        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         8 days ago          Exited (137) 12 minutes ago                                 serviceA.1.yvv1o5fvnlugqd3e9f7hhj8em
298794d86090        serviceA@sha256:fb7a8f65d5f53fc18a101945d21cfe4cc94c8cb2ac4d5fdb43053c492b2e2b22   "service.py"         8 days ago          Exited (137) 13 minutes ago                                 serviceA.3.zkyegkinmd2q5lr3q3k47n5od

我希望swarm清理过旧的,但事实并非如此 为什么?这是一个功能吗?似乎它保存了一些快速回滚的但是从1.31 API版本开始,我不确定。

我必须自己清理过时的容器吗?

0 个答案:

没有答案