du -h --max-depth=1 /var/lib/docker/overlay2 查看某个目录下文件夹大小
docker 磁盘空间占用情况
查看docker 空间分布
1 2 3 4 5 6
[root@environment-test1 ~]# docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 26 6 4.554GB 2.513GB (55%) Containers 8 6 157.7GB 157.3GB (99%) Local Volumes 0 0 0B 0B Build Cache 0 0 0B 0B
查看空间占用细节docker system df -v会显示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[root@environment-test1 ~]# docker system df -v Images space usage:
REPOSITORY TAG IMAGE ID CREATED ago SIZE SHARED SIZE UNIQUE SiZE CONTAINERS redis latest 4e8db158f18d 3 weeks ago ago 83.4MB 58.6MB 24.8MB 2
Containers space usage:
CONTAINER ID IMAGE COMMAND LOCAL VOLUMES SIZE CREATED ago STATUS NAMES 2f9172a5f6d2 manage/test/ygl/hikvision:latest "/usr/bin/supervisor…" 0 157GB 42 hours ago ago Dead manager-test-ygl_hikvision.1.6deoeddsuari0ob63cddg8f28 3bd29db83e99 redis:latest "docker-entrypoint.s…" 0 0B 42 hours ago ago Exited (137) 16 minutes ago manager-test-ygl_redis.1.ha792r91z4erzmn967sf9u4zx
tar -zxvf nginx-1.15.12.tar.gz tar -zxvf openssl-1.1.0l.tar.gz tar -zxvf zlib-1.2.11.tar.gz tar -zxvf pcre-8.43.tar.gz
cd pcre-8.43/ ./configure make && make install
cd ../zlib-1.2.11/ ./configure make && make install
cd ../openssl-1.1.0l/ ./config make && make install
cd ../nginx-1.15.12/ ./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.43 --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.1.0l --add-module=../nginx-rtmp-module-1.2.1 make && make install
# # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" # # PLEASE DO NOT EDIT IT DIRECTLY. #
FROM alpine:3.8
# A few reasons for installing distribution-provided OpenJDK: # # 1. Oracle. Licensing prevents us from redistributing the official JDK. # # 2. Compiling OpenJDK also requires the JDK to be installed, and it gets # really hairy. # # For some sample build times, see Debian's buildd logs: # https://buildd.debian.org/status/logs.php?pkg=openjdk-8
# Default to UTF-8 file.encoding ENV LANG C.UTF-8
# add a simple script that can auto-detect the appropriate JAVA_HOME value # based on whether the JDK or only the JRE is installed RUN { \ echo'#!/bin/sh'; \ echo'set -e'; \ echo; \ echo'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ } > /usr/local/bin/docker-java-home \ && chmod +x /usr/local/bin/docker-java-home ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
# If you're reading this and have any feedback on how this image could be # improved, please open an issue or a pull request so we can discuss it! # # https://github.com/docker-library/openjdk/issues
# add a simple script that can auto-detect the appropriate JAVA_HOME value # based on whether the JDK or only the JRE is installed RUN { \ echo'#!/bin/sh'; \ echo'set -e'; \ echo; \ echo'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ } > /usr/local/bin/docker-java-home \ && chmod +x /usr/local/bin/docker-java-home ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin