[질문] docker 에서 pull 받아온 image

조회 1,506 · 댓글 4
kkimdubi작성자2018년 6월 25일
안녕하세요
docker 에서 pull 받아온 image가

host machine에 어디에 저장되어 있는지 알 수 있을까요?
어떻게 구현되어 있는지 보고 싶은데
어딨는지 모르겠어요..
쿨라우드2018년 6월 25일
[hide]1. docker info를 쳐보세요.

그럼 여러 정보가 출력되는데

그 중 가장 중요한 것은 도커 패스, 저 같은 경우는


Docker Root Dir: /var/lib/docker


스토리지 드라이버도 확인, 저 같은 경우는


Storage Driver: overlay2


2. 도커 홈 패스로 가서 목록을 확인해보면


# ls -l

total 48
drwx------ 2 root root 4096 Mar 23 08:41 builder
drwx--x--x 3 root root 4096 Mar 23 08:41 containerd
drwx------ 6 root root 4096 Jun 19 08:55 containers
drwx------ 3 root root 4096 Mar 23 08:41 image
drwxr-x--- 3 root root 4096 Mar 23 08:41 network
drwx------ 32 root root 4096 Jun 25 23:26 overlay2
drwx------ 4 root root 4096 Mar 23 08:41 plugins
drwx------ 2 root root 4096 Jun 25 23:25 runtimes
drwx------ 2 root root 4096 Mar 23 08:41 swarm
drwx------ 2 root root 4096 Jun 25 23:26 tmp
drwx------ 2 root root 4096 Mar 23 08:41 trust
drwx------ 2 root root 4096 Mar 23 08:41 volumes


3. overlay2 디렉토리에 들어가니


# ls -l

total 120
drwx------ 4 root root 4096 Apr 3 07:59 0851212dbc888761640923bc35fa1e9ffa7183d9e6f30d2a47564cfa02a523c1
drwx------ 4 root root 4096 Apr 3 07:59 0a4bea1a2ce14f5884999f8f1be2e0ecba4565a5300c43c76170b8fbd2c1d957
drwx------ 4 root root 4096 Jun 25 23:26 0d3f77c603d122d5a2e03052438567920ee1dca67c29af3d012cf37d9b41ded9
drwx------ 4 root root 4096 Apr 3 07:59 1580ea23651a0dc3cc7caf7d1262faed0c3b0ad819bb62ffc86170f8413ebc98
drwx------ 4 root root 4096 Apr 3 07:59 2014ecd546c9dff3da685be1ba001ce97b2a1cdfba1f9f795bb848583488af96
drwx------ 4 root root 4096 Apr 3 07:59 308aa37d06beff2f97e630393524c734a59132ca3c18cb4a8b5ed99214e1f278
drwx------ 4 root root 4096 Apr 3 08:00 4c2fea87e8bae84c3b463f6ce45a144c67756966c4b837a6fb9af1ffad6b3f94
drwx------ 4 root root 4096 Apr 3 07:59 56f00a8ee3de2d8660e185d15df8161743fedc247e9f531e6fecf39e42d6cb13
drwx------ 4 root root 4096 Jun 25 23:26 5f5d36fdc5cdcb697ab89616bb283294cd97b996e5710f6fc5c9d058f04390b1
drwx------ 4 root root 4096 Apr 3 07:59 61cbc48087780ac54b98a5dd5b643a89697994fe08829143556266e58f714075
drwx------ 4 root root 4096 Jun 25 23:26 6b6f5f07ecf65c23dba3e7dcc793dc1e7fd987c70911450d6f09fd6f45ba4e68
drwx------ 4 root root 4096 Jun 19 08:54 7ec110042c6f54531fe2b88aa6da2b13a106dae79d926556ed22deb3b3216183
drwx------ 4 root root 4096 Jun 19 08:50 7ec110042c6f54531fe2b88aa6da2b13a106dae79d926556ed22deb3b3216183-init
drwx------ 4 root root 4096 Apr 4 11:11 8385ec3b59a7c099f141d94a08a8ca3a52d5ca30ecd7da9f9daf92fd049142ef
drwx------ 4 root root 4096 Apr 4 03:36 8385ec3b59a7c099f141d94a08a8ca3a52d5ca30ecd7da9f9daf92fd049142ef-init
drwx------ 4 root root 4096 Jun 19 08:55 83e8b35abd91575129650b73429fbf42d8146ed24866962108bc1c996b02840c
drwx------ 4 root root 4096 Jun 19 08:55 83e8b35abd91575129650b73429fbf42d8146ed24866962108bc1c996b02840c-init
drwx------ 4 root root 4096 Jun 25 23:26 846578006bed3c1a07e17e47145d7819ab02b4db68921b7b08a001a865319a3f
drwx------ 4 root root 4096 Jun 19 11:11 8aec87949566e8c1d0ffb85dfd7f3cb75d7c10a0fbff58860cc727134a82240c
drwx------ 4 root root 4096 Jun 19 08:55 8aec87949566e8c1d0ffb85dfd7f3cb75d7c10a0fbff58860cc727134a82240c-init
drwx------ 4 root root 4096 Apr 3 07:59 8c3388e8f6b825743c04d18612174a5a5d01e3a1c0f3168855f7d689ea9afc9d
drwx------ 4 root root 4096 Apr 3 08:00 a985682cd51e8869e8afee98b8a4704d206cd782f3ef89d1323e6bd87d1e0a91
drwx------ 4 root root 4096 Apr 3 08:00 ab40111d9cc89584bcee0eb303ed3324f17d178689ec3e5fc534be91b0a9e121
drwx------ 4 root root 4096 Jun 25 23:26 abf431b072881d64ab3c558beb6f8fe3753e21ab8a6f40c9becac9979d8a1dec
drwx------ 3 root root 4096 Apr 3 07:59 ca4c650d452c2e824c84f3fadcb8dbe199c4f68aa458fbb81c431c9ef2e917c7
drwx------ 4 root root 4096 Jun 25 23:26 cba2362a1eccd74cd4ede36ce307735b69b26cfc37a823a9b479a137036735e1
drwx------ 3 root root 4096 Jun 25 23:26 f33ac1f29119bcff8888e0dd724b7451e50a6edd0344bee62b93ae43df3704ff
drwx------ 4 root root 4096 Apr 3 07:59 fb95e1951abcd35e2e5c9523253824c97a8f82d4dd4da3db9b14065eb112e695
drwx------ 4 root root 4096 Apr 3 07:59 fbbd9ab36d45ebd023d3537452fbc4e0d847bc77056bab504548725509288745
drwx------ 2 root root 4096 Jun 25 23:26 l
[/hide]
쿨라우드2018년 6월 25일
[hide]부연설명 : 스토리지 드라이버란?

1. AUFS 스토리지 드라이버

- 우분투에서 기본으로 사용하는 방식으로 레드햇은 지원하지 않음
- 이미지를 땡기면(pull) 여러 aufs 스택을 가져오며 이미지를 구성하는 스택 정보는 /var/lib/docker/aufs/layers 에서 확인 가능

2. OverlayFS

- aufs와 비슷한데 좀 더 빠르다고 하며 대신 약간 최신 기능이라 안정성은 미지수, 커널 3.18부터 지원
- 또 afus와 다른 점은 aufs는 여러 레이어가 스택을 이루는 반면 오버레이는 단 두개의 레이어만 가지고 있음 (즉 멀티 레이어 이미지 구성 불가)
- 경로 : /var/lib/docker/overlay[/hide]
kkimdubi2018년 6월 26일
저도 처음에 overlay2에서 본 걸로 기억하는데
어느 순간부터 overlay2가 안보이더라구요
docker info 내용도 달라진 거 같은데..
원인은 모르겠지만 일단 날리고 다시 해봐야겠어요
자세한 답변 감사드립니다!

[root@MARIA02 devicemapper]# docker info
Containers: 7
Images: 37
Storage Driver: devicemapper
Pool Name: docker-253:1-916168-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file:
Metadata file:
Data Space Used: 3.372 GB
Data Space Total: 107.4 GB
Data Space Available: 104 GB
Metadata Space Used: 3.564 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.144 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Library Version: 1.02.117-RHEL6 (2016-08-15)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 2.6.32-642.15.1.el6.x86_64
Operating System:
CPUs: 2
Total Memory: 3.743 GiB
Name: MARIA02
ID: PTKD:GWLF:OE5V:SMDL:OMYC:OQ6L:JXBJ:M6JH:VBPN:TCSY:INAE:FT76
쿨라우드2018년 6월 26일
devicemapper 로 되어 있네요.

/var/lib/docker/devicemapper 아래에 살펴보세요..

로그인 후 답글을 남길 수 있습니다.