도커 이미지(tar) 크기 확인하는 방법은 다음과 같다.
1. docker history
$ docker history rabbitmq:management
IMAGE CREATED CREATED BY SIZE COMMENT
df6f26ea3e53 4 months ago /bin/sh -c #(nop) EXPOSE 15671 15672 0B
<missing> 4 months ago /bin/sh -c set -eux; erl -noinput -eval ' … 29.5MB
<missing> 4 months ago /bin/sh -c rabbitmq-plugins enable --offline… 23B
<missing> 4 months ago /bin/sh -c #(nop) CMD ["rabbitmq-server"] 0B
<missing> 4 months ago /bin/sh -c #(nop) EXPOSE 25672 4369 5671 56… 0B
<missing> 4 months ago /bin/sh -c #(nop) ENTRYPOINT ["docker-entry… 0B
<missing> 4 months ago /bin/sh -c #(nop) COPY file:379f3802e5612ff1… 12.2kB
<missing> 4 months ago /bin/sh -c #(nop) ENV LANG=C.UTF-8 LANGUAGE… 0B
<missing> 4 months ago /bin/sh -c #(nop) VOLUME [/var/lib/rabbitmq] 0B
<missing> 4 months ago /bin/sh -c #(nop) ENV HOME=/var/lib/rabbitmq 0B
<missing> 4 months ago |1 PGP_KEYSERVER=ha.pool.sks-keyservers.net … 21B
<missing> 4 months ago |1 PGP_KEYSERVER=ha.pool.sks-keyservers.net … 12.6MB
<missing> 4 months ago /bin/sh -c #(nop) ENV PATH=/opt/rabbitmq/sb… 0B
<missing> 4 months ago /bin/sh -c #(nop) ENV RABBITMQ_HOME=/opt/ra… 0B
<missing> 4 months ago /bin/sh -c #(nop) ENV RABBITMQ_PGP_KEY_ID=0… 0B
<missing> 4 months ago /bin/sh -c #(nop) ENV RABBITMQ_VERSION=3.7.… 0B
<missing> 4 months ago |1 PGP_KEYSERVER=ha.pool.sks-keyservers.net … 393kB
<missing> 4 months ago /bin/sh -c #(nop) ENV RABBITMQ_DATA_DIR=/va… 0B
<missing> 4 months ago |1 PGP_KEYSERVER=ha.pool.sks-keyservers.net … 79MB
<missing> 4 months ago /bin/sh -c #(nop) ENV OTP_SOURCE_SHA256=122… 0B
<missing> 4 months ago /bin/sh -c #(nop) ENV OTP_VERSION=21.3.5 0B
<missing> 5 months ago /bin/sh -c #(nop) ENV OPENSSL_PGP_KEY_ID=0x… 0B
<missing> 5 months ago /bin/sh -c #(nop) ENV OPENSSL_SOURCE_SHA256… 0B
<missing> 5 months ago /bin/sh -c #(nop) ENV OPENSSL_VERSION=1.1.1b 0B
<missing> 5 months ago /bin/sh -c #(nop) ARG PGP_KEYSERVER=ha.pool… 0B
<missing> 5 months ago /bin/sh -c set -eux; apt-get update; apt-g… 2.51MB
<missing> 5 months ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0B
<missing> 5 months ago /bin/sh -c mkdir -p /run/systemd && echo 'do… 7B
<missing> 5 months ago /bin/sh -c rm -rf /var/lib/apt/lists/* 0B
<missing> 5 months ago /bin/sh -c set -xe && echo '#!/bin/sh' > /… 745B
<missing> 5 months ago /bin/sh -c #(nop) ADD file:1d7cb45c4e196a6a8… 88.9MB
2. docker save
$ docker save rabbitmq:management | gzip | wc -c
88612225
실제로 컨테이너(파일 디스크) 크기를 알고 싶다면 다음 커맨드를 사용한다.
1. docker inspect
$ docker image inspect rabbitmq:management --format='{{.Size}}'
212906551
2. docker ps
$ docker ps --size | grep rabbit
f1c3080202f1 rabbitmq:management "docker-entrypoint.s…" 29 hours ago Up 29 hours 4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, 15671/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp docker_rabbit_1 190B (virtual 213MB)
'docker' 카테고리의 다른 글
Rpmdb checksum is invalid: dCDPT(pkg checksums): 해결하기 (0) | 2019.09.04 |
---|---|
도커 export 및 import 커맨드와 save 및 load 커맨드간의 차이 (0) | 2019.09.01 |
Dockerfiles의 CMD에서 추가 매개 변수 사용하기 (0) | 2019.08.07 |
k8s의 hostNetwork: true와 docker의 host 네트워크 모드 (0) | 2019.07.12 |
[docker] docker 설치 장비에서 proxy 설정하기 (0) | 2019.07.09 |