my docker note

File System
为了让Linux运行起来,通常需要2个file system

  1. boot file system (bootfs) 包含bootloader和kernel, 用户永远无法改变
  2. root file system (rootfs) 包含典型的Unix-like操作系统文件夹结构 /dev, /proc, /bin, /etc, /lib, /usr, /tmp

参考

在传统的Linux boot, kernel首先mount(挂载)rootfs, 此时为read-only模式, 然后检查integrity(完整性), 接着切换整个rootfs为read-write模式

Docker与传统的Linux有些不同, 一样mount(挂载)rootfs, 也是进入read-only模式, 跟传统Linux一样,但之后不是切换到read-write模式, 而是采取union mount, 把read-write file system加到read-only file system之上. 事实上有多个read-only相互叠在一起,我门把这些file system看成是layer


union file system = read-write layer + read-only layer

在Docker的术语中,只读的layer称之为image. An image never changes.

 

posted @ 2015-01-26 17:14  Henry JAO  阅读(249)  评论(0编辑  收藏  举报