Merge pull request #498 from justincormack/docker-bundle

Add support for running a development bundle of Docker
This commit is contained in:
Justin Cormack 2016-09-13 22:47:57 +01:00 committed by GitHub
commit 77138de2b9
2 changed files with 14 additions and 1 deletions

View File

@ -22,7 +22,8 @@ DOCKER=$(ps -eo args | grep '^/usr/bin/dockerd')
CONTAINERD=$(ps -eo args | grep '^docker-containerd')
[ $? -eq 0 ] && printf "✓ Process containerd running: $CONTAINERD\n" || printf "✗ No containerd process\n"
DOCKERPS=$(docker ps 2>&1)
[ $? -eq 0 ] && printf "✓ Docker daemon working\n" || printf "✗ Docker ps failed: $DOCKERPS\n"
DOCKERV=$(docker --version)
[ $? -eq 0 ] && printf "✓ Docker daemon working: ${DOCKERV}\n" || printf "✗ Docker ps failed: $DOCKERPS\n"
DIAGNOSTICS=$(ps -eo args | grep '^/usr/bin/diagnostics-server')
[ $? -eq 0 ] && printf "✓ Diagnostics server running: $DIAGNOSTICS\n" || printf "✗ No diagnostics server\n"
CONTAINERD=$(ps -eo args | grep '^/usr/bin/containerd')

View File

@ -9,6 +9,18 @@ start()
{
ebegin "Starting Docker"
# check if overriding Docker with a dev bundle
if mobyconfig exists bundle
then
bundle=$(mobyconfig get bundle)
[ -n "$bundle" -a -d "$bundle" -a -h "$bundle/binary-client/docker" ] && \
# note we copy all the symlinks, in case layout changes
cp -a $bundle/binary-client/* \
$bundle/binary-daemon/* \
/usr/bin
printf "Overriding Docker with provided bundle: $bundle\n"
fi
command="${DOCKER_BINARY:-/usr/bin/dockerd}"
pidfile="/run/docker.pid"