docker system df命令类似于Linux上的df命令,用于查看Docker的磁盘使用情况。它可以显示Docker镜像、容器、本地卷以及构建缓存等资源的占用情况。 docker system df命令中build cache部分的含义 在docker system df命令的输出中,build cache部分表示在镜像构建过程中产生的缓存数据。这些缓存数据可以帮助加快后续的构建过程...
$ docker system df TYPE列出了docker 使用磁盘的 4 种类型: Images:所有镜像占用的空间,包括拉取下来的镜像,和本地构建的。 Containers:运行的容器占用的空间,表示每个容器的读写层的空间。 Local Volumes:容器挂载本地数据卷的空间。 Build Cache:镜像构建过程中产生的缓存空间(只有在使用 BuildKit 时才有,Docke...
Build Cache 0B 0B 1. 2. 3. 4. 5. 6. 可知,Docker镜像占用了7.2GB磁盘,Docker容器占用了104.8MB磁盘,Docker数据卷占用了1.4GB磁盘。 docker system prune命令可以用于清理磁盘,删除关闭的容器、无用的数据卷和网络,以及dangling镜像(即无tag的镜像)。docker system prune -a命令清理得更加彻底,可以将没有容...
docker system df 命令,类似于 Linux上的 df 命令,用于查看 Docker 的磁盘使用情况: [root@test /]# docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 34 34 10.1GB 105.6MB (1%) Containers 60 41 925.2MB 615.9MB (66%) Local Volumes 40 16 1.481GB 6.402MB (0%) Build Cache 509 0 17....
Build Cache: 镜像构建过程中,产生的缓存数据 # RECLAIMABL 这个字段明确了该类型中可以清理的空间 查看每个image、container占用情况 docker systemdf-v 我们使用 docker 镜像创建容器时,docker会创建一些目录,如: /var/lib/docker/containers/<容器ID> 目录,如果容器使用了默认的日志模式,那么该容器的日志会以 JSON...
缓存是互联网开发中必不可少的一部分,它能降低我们数据库的并发数,提高我们系统的性能,比如我们经常...
docker system df 可以发现,大量的docker build cache占用了我们的磁盘空间 执行命令 docker builder prune 再检查一下缓存情况,使用命令 docker system df docker system prune -a --force 对应-a 删除全部未使用的镜像,-f 或 --force 不经过确认强行删除,注意强行删除之后,镜像需要重新下载...
--cache-from External cache sources (e.g., user/app:cache, type=local,src=path/to/dir) --cache-to Cache export destinations (e.g., user/app:cache, type=local,dest=path/to/dir) --call build Set method for evaluating build (check, outline, targets) --cgroup-parent Set the parent ...
local: writes the build cache to a local directory on the filesystem. gha: uploads the build cache toGitHub Actions cache(beta). s3: uploads the build cache to anAWS S3 bucket(unreleased). azblob: uploads the build cache toAzure Blob Storage(unreleased). ...