Files
linuxkit/alpine/packages/containerd/etc/init.d/containerd
Justin Cormack f3e3a4029b Containerize test suite
- run test suite under containerd
- in future this should be converted to Go not shell see #860
- test suite is now in its own initrd, can be run on any platform not just qemu

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-09 17:13:16 -08:00

35 lines
609 B
Plaintext
Executable File

#!/sbin/openrc-run
depend()
{
before docker
}
start()
{
ebegin "Running system containerd"
# set ulimits as high as possible
ulimit -n 1048576
ulimit -p unlimited
/usr/bin/containerd 1>&2 2>/var/log/containerd.log &
ewaitfile 5 /var/run/containerd/containerd.sock
eend $? "Failed to start system containerd"
ebegin "Running system containers"
LOG=/var/log/system-containers.log
touch $LOG
for f in /containers/*
do
containerd-ctr containers start --no-pivot --attach "$(basename $f)" "$f" 2>$LOG >$LOG &
printf " $(basename $f)"
done
eend $? "Failed to start system containers"
}