Files
linuxkit/base/init/etc/init.d/containers
Justin Cormack 1dfa95d660 Add new minimal init prototype and new tools
This is part of the new moby tool work to get a minimal system
up that can be expanded.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-17 15:31:00 +00:00

19 lines
515 B
Bash
Executable File

#!/bin/sh
# TODO more robust
while [ ! -S /run/containerd/containerd.sock ]; do sleep 1; done
while ! ctr list 2> /dev/null; do sleep 1; done
# start system containers
# temporarily using runc not containerd
LOG=/var/log/system-containers.log
touch $LOG
for f in /containers/*
do
base="$(basename $f)"
/sbin/start-stop-daemon --start --pidfile /run/$base.pid --exec /usr/bin/runc -- run --bundle "$f" --pid-file /run/$base.pid "$(basename $f)" </dev/null 2>$LOG >$LOG &
printf " - $(basename $f)\n"
done
wait