3. 如何组装出一个镜像
什么叫"制作一个镜像"?
Aufs 在Docker中的玩法
# 用busybox起一个容器
$ docker run -it busybox:latest sh
# 在容器内生成一个 1M 大小的文件
$ dd if=/dev/zero of=test bs=1M count=1
# 随便从容器里删掉一个文件
$ rm bin/find
# 然后用commit的方式生成镜像
$ docker commit a09 xiaohan-building:v2# 多出来的 4cd 这个文件夹, 代表我们新产生的层
$ cd /var/lib/docker && ls
ef4da5b601859191dabb3343818295bfaa2112ad # busybox 自带层
4cd218cc42c9b4368543b1dfcd47488145259b1d # 我们Commit所产生的层
$ cd 4cd218cc && ls
test bin root
$ ls -al bin
.wh.find
$ ls -al root
.ash_history如何组装出一个完整的镜像
如何在Overlay2下组装出一个镜像
Last updated
Was this helpful?