Install runj and containerd:
pkg install runj containerd
Currently containerd port is missing rc.d script so we need to create one:
cat <<EOF > /usr/local/etc/rc.d/containerd
#! /bin/sh
# PROVIDE: containerd
# REQUIRE: DAEMON NETWORKING
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable containerd:
#
#containerd_enable="YES"
. /etc/rc.subr
name="containerd"
rcvar="containerd_enable"
load_rc_config $name
: ${containerd_enable:=NO}
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
command_args="-r -S -t ${name} -T ${name} -P ${pidfile} /usr/local/bin/${name}"
PATH=$PATH:"/usr/local/bin/"
run_rc_command "$1"
EOF
Enable autostart of containerd:
chmod +x /usr/local/etc/rc.d/containerd
service containerd enable
service start enable
Now you can pull an image:
ctr image pull docker.io/kwiat/freebsd:13.0-RELEASE
And launch a container from it:
ctr run --runtime wtf.sbk.runj.v1 --rm docker.io/kwiat/freebsd:13.0-RELEASE my-freebsd sh -c "echo hello world"
hello world