文件名称:docker-cleanup:删除过时的Docker容器和映像
文件大小:54KB
文件格式:ZIP
更新时间:2024-06-20 06:27:06
Python
docker-cleanup:删除过时的 Docker 容器和镜像 docker-cleanup 根据配置文件中的规则删除容器和图像。 下面是一个例子: # Keep currently running containers, delete others if they last finished # more than a week ago. KEEP CONTAINER IF Container.State.Running; DELETE CONTAINER IF Container.State.FinishedAt.before('1 week ago'); # Delete dangling (unnamed and not used by containers) images. DELETE IMAGE IF Image.Dangling; 这会产生输出: Deleting
【文件预览】:
docker-cleanup-master
----docker_cleanup()
--------tokenrunner.py(7KB)
--------dates.py(4KB)
--------main.py(5KB)
--------parser.py(14KB)
--------__init__.py(626B)
--------rulefile.py(5KB)
--------error.py(6KB)
--------docker.py(9KB)
----.gitignore(114B)
----setup.cfg(51B)
----dev-requirements.txt(103B)
----docker-cleanup(961B)
----README.rst(7KB)
----tests()
--------conftest.py(2KB)
--------test_rulefile.py(2KB)
--------test_main.py(3KB)
--------test_parser.py(8KB)
--------test_docker.py(9KB)
--------test_tokenrunner.py(3KB)
--------test_dates.py(3KB)
--------test_end2end.py(4KB)
----docs()
--------docker_cleanup.rulefile.rst(160B)
--------make.bat(7KB)
--------README.rst(28B)
--------conf.py(12KB)
--------docker_cleanup.parser.rst(154B)
--------index.rst(526B)
--------docker_cleanup.tokenrunner.rst(169B)
--------docker_cleanup.main.rst(148B)
--------docker_cleanup.error.rst(151B)
--------docker_cleanup.rst(1KB)
--------docker_cleanup.docker.rst(154B)
--------Makefile(7KB)
----TODO(664B)
----cleanup-rules.conf(2KB)
----requirements.txt(106B)
----LICENSE.md(11KB)
----setup.py(2KB)