我应该关心多余的,不运行的Docker容器? [英] Should I be concerned about excess, non-running, Docker containers?
问题描述
每个 docker运行
命令,或者在Dockerfile内的每个 RUN
命令创建一个容器。如果容器不再运行,它仍然可以看到 docker ps -a
。
我应该关心有非常多的非运行容器列表?我应该在非运行容器上发行 docker rm
我不确定什么性能或内存/存储
除了磁盘空间外,未运行的容器不会占用任何系统资源。
通常情况下,您自己之后要清理好,但是如果您有很多人坐在周围,那根本就不能降低性能。
如果您在运行具有大量停止容器的docker命令时注意到减速,则可能是docker中的错误,您应该提交错误。 >
Every docker run
command, or every RUN
command inside a Dockerfile, creates a container. If the container is no longer running it can still be seen with docker ps -a
.
Should I be concerned with having an enormous list of non-running containers? Should I be issuing docker rm
on non-running containers?
I am unsure of what performance or memory/storage penalties these non-running containers incur.
The containers that are not running are not taking any system resources besides disk space.
It is usually good to clean up after yourself, but if you have a lot of them sitting around it shouldn't slow down performance at all.
If you do notice a slow down when running docker commands with lots of stopped containers, it might be a bug in docker, and you should submit a bug.
这篇关于我应该关心多余的,不运行的Docker容器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!