19 lines
615 B
Bash
19 lines
615 B
Bash
#!/bin/sh -e
|
|
case $1 in
|
|
prereqs)
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
## Mount the aufs file system: rw layer over squashfs
|
|
mkdir -p ${rootmnt}/host/rw
|
|
mount -n -o dirs=${rootmnt}/host/rw:${rootmnt}=ro -t aufs root-aufs ${rootmnt}
|
|
## Mount the raw partition again
|
|
mount ${ROOT} ${rootmnt}/host
|
|
## Mount the working directory of docker engine in the raw partition, bypass the aufs
|
|
mkdir -p ${rootmnt}/var/lib/docker
|
|
mount --bind ${rootmnt}/host/var/lib/docker ${rootmnt}/var/lib/docker
|
|
## Mount the boot directory in the raw partition, bypass the aufs
|
|
mkdir -p ${rootmnt}/boot
|
|
mount --bind ${rootmnt}/host/boot ${rootmnt}/boot
|