Persistent Linux 'jails' on TrueNAS SCALE to install software (k3s, docker, portainer, podman, etc.) with full access to all files via bind mounts thanks to systemd-nspawn!
I've installed docker a few different ways (via apt, via apt and docker.io, and via the convenience script) within a jail that I've created. They all seem to give this bit near the end of install Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145. which I'm not sure if it is related or not. When I check the status of the service it shows failed:
Jan 14 22:51:17 fireflyiii systemd[1]: docker.service: Start request repeated too quickly.
Jan 14 22:51:17 fireflyiii systemd[1]: docker.service: Failed with result 'exit-code'.
Jan 14 22:51:17 fireflyiii systemd[1]: Failed to start docker.service - Docker Application Container Engine.
When I check journalctl I see this:
Jan 14 22:51:57 fireflyiii systemd[1]: docker.service: Start request repeated too quickly.
Jan 14 22:51:57 fireflyiii systemd[1]: docker.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit docker.service has entered the 'failed' state with result 'exit-code'.
Jan 14 22:51:57 fireflyiii systemd[1]: Failed to start docker.service - Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 705 and the job result is failed.
I went ahead and enabled debug for the docker daemon and I see this in journalctl now:
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.468550889-08:00" level=warning msg="Your kernel does not support cgroup memory limit"
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.468602867-08:00" level=warning msg="Unable to find cpu cgroup in mounts"
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.468622288-08:00" level=warning msg="Unable to find blkio cgroup in mounts"
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.468639229-08:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.468656172-08:00" level=warning msg="Unable to find pids cgroup in mounts"
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.469843763-08:00" level=info msg="[core] Channel Connectivity change to SHUTDOWN" module=grpc
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.469896987-08:00" level=info msg="[core] Subchannel Connectivity change to SHUTDOWN" module=grpc
Jan 14 23:02:43 fireflyiii dockerd[361]: time="2024-01-14T23:02:43.469928056-08:00" level=debug msg="Cleaning up old mountid : start."
Jan 14 23:02:43 fireflyiii dockerd[361]: failed to start daemon: Devices cgroup isn't mounted
Here is my jlmkr config file:
startup=1
docker_compatible=1
gpu_passthrough_intel=0
gpu_passthrough_nvidia=0
systemd_nspawn_user_args=--bind='/mnt/sandisk-ssd/fireflyiii:/home' --network-bridge='br0' --resolv-conf='bind-host'
# You generally will not need to change the options below
systemd_run_default_args=--property=KillMode=mixed --property=Type=notify --property=RestartForceExitStatus=133 --property=SuccessExitStatus=133 --property=Delegate=yes --property=TasksMax=infinity --collect --setenv=SYSTEMD_NSPAWN_LOCK=0
systemd_nspawn_default_args=--keep-unit --quiet --boot
I'm running TrueNAS-SCALE-22.12.1 on an Intel i5-6500 CPU
I've check docker on the host and it seems to be running fine.
I've installed docker a few different ways (via apt, via apt and docker.io, and via the convenience script) within a jail that I've created. They all seem to give this bit near the end of install
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
which I'm not sure if it is related or not. When I check the status of the service it shows failed:When I check journalctl I see this:
I went ahead and enabled debug for the docker daemon and I see this in journalctl now:
Here is my jlmkr config file:
I'm running TrueNAS-SCALE-22.12.1 on an Intel i5-6500 CPU
I've check docker on the host and it seems to be running fine.