* Update - see answer below. this is no longer the correct answer *
You cannot mount them by design because Docker can no longer guarantee a repeatable runtime.
However, you can:
1) Import the root file system of the host and create a new image from it:
tar -C / -c . | docker import - entend/custombase
2) Import the root bootstrap file system, for example, the result of running 'debootstrap'. (Note that the official โbaseโ image was created this way, so you might be better off just launching the โdocker traction baseโ)
debootstrap precise ./bootstrap tar -C ./bootstrap -c . | docker import - entend/ubuntubase
3) Paste the contents of the local directory into the container when it starts.
IMAGE=base; SRC=./stuff; DST=/tmp/stuff; CMD="echo hello world"; tar -C $src -c . | docker run $IMAGE -i /bin/sh -c "tar -C $DST -x; $CMD"
This will start the container from $ IMAGE, copy the host directory $ SRC to the container directory $ DST, then run the command $ CMD
This last example is usually used to insert source code before running the build command inside the container.
Hope this helps!
Solomon Hykes Mar 28 '13 at 22:42 2013-03-28 22:42
source share