Skip to content

Commit

Permalink
Merge pull request docker#806 from SvenDowideit/run-bootsync-before-d…
Browse files Browse the repository at this point in the history
…ocker-daemon

Allow user customisation before and after Docker daemon startup
  • Loading branch information
tianon committed Apr 1, 2015
2 parents 46f344a + 3b6c240 commit 92bf81f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions doc/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ that doesn't exist, it will pick the first ``ext4`` partition listed by ``blkid`

**Local Customisation (with persistent partition)**

From Boot2Docker version 1.6.0, the `/var/lib/boot2docker/bootsync.sh` script is
run before the Docker daemon is started.

If you have a persistence partition, you can make customisations that are run at
the end of the boot initialisation in the ``/var/lib/boot2docker/bootlocal.sh`` file.

Expand Down
8 changes: 5 additions & 3 deletions rootfs/rootfs/bootscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,19 @@ date
ip a
echo "-------------------"

# Launch Docker
/etc/rc.d/docker

# Allow local bootsync.sh customisation
if [ -e /var/lib/boot2docker/bootsync.sh ]; then
/var/lib/boot2docker/bootsync.sh
echo "------------------- ran /var/lib/boot2docker/bootsync.sh"
fi

# Launch Docker
/etc/rc.d/docker

# Allow local HD customisation
if [ -e /var/lib/boot2docker/bootlocal.sh ]; then
/var/lib/boot2docker/bootlocal.sh > /var/log/bootlocal.log 2>&1 &
echo "------------------- ran /var/lib/boot2docker/bootlocal.sh"
fi

# Execute automated_script
Expand Down

0 comments on commit 92bf81f

Please sign in to comment.