参照:
下面使我们的系统中某位同事自己使用的image:
大家可以看到基于centos(最底下一行),然后拢共增加了3层文件系统。(从78.41M向上应该为增加的文件系统),然后我们去本地文件看一下:
Docker系统的基本信息都在这里面:/var/lib/docker
查看下我们现在所有的images
然后进入graph查看下相应的mapping关系:(注意,上图中的IMAGE ID部分对应于graph中文件夹的前面几位)拿wr_centos来说(ID:86f005…):
在graph下面找到
进入该文件夹:
看到json文件,打开后包含了基本的docker信息:
{"id":"86f005f01beb23eb27482024028d3a9d6b73b21a0fd9ddbecb5a5b3d43071fea","parent":"90b9623fff7438cf33be47a89da3693fc2a7a74ff8d46ea224ba3a718cfeaa4c","comment":"modify","created":"2016-02-23T06:27:44.935853854Z","container":"4aaaeb25467acbcb2244c92b1b577280d8c2a30851b37c24c6fd345a31d20f69","container_config":{"Hostname":"4aaaeb25467a","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"ExposedPorts":{"8080/tcp":{}},"Tty":true,"OpenStdin":true,"StdinOnce":false,"Env":null,"Cmd":["/bin/bash"],"Image":"wr_centos","Volumes":null,"VolumeDriver":"","WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"MacAddress":"","OnBuild":null,"Labels":{"build-date":"2016-02-17","license":"GPLv2","name":"CentOS Base Image","vendor":"CentOS"}},"docker_version":"1.7.1","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"ExposedPorts":{
"8080/tcp":{}},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["/bin/bash"],"Image":"","Volumes":null,"VolumeDriver":"","WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"MacAddress":"","OnBuild":null,"Labels":{"build-date":"2016-02-17","license":"GPLv2","name":"CentOS Base Image","vendor":"CentOS"}},"architecture":"amd64","os":"linux","Size":27084097}ID就是自己的imageID,parent就是自己继承的镜像ID,可以看到是基于centos的镜像,放进去一个27M大小的文件,然后并且将8080端口映射了出来。这些信息对照第一个图片的内容。
其余的很多内容都在/var/lib/docker下面,大家可以自己进去挖掘一下。