mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-25 17:04:04 +00:00
init: replace ctr with a custom client using the containerd client library
Currently it supports only `service start <SERVICE>`, but it could grow e.g. `stop`, `exec` etc in the future (although you can still use `ctr` for those). In order to be able to use go-compile.sh the containerd build needs to move from /root/go to /go as the GOPATH. The vendoring situation is not ideal, but since this tool wants to be an exact match for the containerd it seems tollerable to reuse its vendoring. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
@@ -34,12 +34,9 @@ if [ -d /containers/services ]
|
||||
then
|
||||
for f in $(find /containers/services -mindepth 1 -maxdepth 1 | sort)
|
||||
do
|
||||
base="$(basename $f)"
|
||||
/bin/mount --bind "$f/rootfs" "$f/rootfs"
|
||||
mount -o remount,rw "$f/rootfs"
|
||||
log="/var/log/$base.log"
|
||||
ctr run --runtime-config "$f/config.json" --rootfs "$f/rootfs" --id "$(basename $f)" </dev/null 2>$log >$log &
|
||||
printf " - $base\n"
|
||||
service start "$(basename $f)"
|
||||
done
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user