mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-13 10:32:25 +00:00
35 lines
609 B
Plaintext
Executable File
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"
|
|
}
|