Ok encountered my first odd issue deploying docker container using jailmaker
this is for the scrutiny docker container
services:
scrutiny:
container_name: scrutiny
image: ghcr.io/analogj/scrutiny:master-omnibus
cap_add:
- SYS_RAWIO
- SYS_ADMIN
ports:
- 6180:8080 # webapp
- 6186:8086 # influxDB admin
volumes:
- /run/udev:/run/udev:ro
- /mnt/docker/data/scrutiny/config:/opt/scrutiny/config
- /mnt/docker/data/scrutiny/influxdb:/opt/scrutiny/influxdb
devices:
- /dev/sda
- /dev/sdb
- /dev/sdc
- /dev/sdd
- /dev/sde
- /dev/sdf
- /dev/sdg
### this is dom - "/dev/sdh"
# - "/dev/sdc" #If you have 3+ drives, uncomment this line and add more to reflect ALL drives you have
restart: unless-stopped
networks: {}
[+] Running 10/1
ā scrutiny 9 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 10.8s
[+] Running 1/1
ā Network scrutiny_default Created 0.2s
ā Container scrutiny Creating 0.0s
Error response from daemon: invalid CapAdd: capability not supported by your kernel or not available in the current environment: "CAP_SYS_RAWIO"
using google i found this
Following up a bit, in case someone else might find this useful. I was able to get docker and portainer up and running in a ājailā . In order to create some useful containers within portainer, i needed to add the following SYSTEMD_NSPAWN_USERS_ARGS line to the config file for the ājailā (via jlmkr edit :
ācapability=CAP_BLOCK_SUSPEND,CAP_MAC_ADMIN,CAP_IPC_LOCK,CAP_MAC_OVERRIDE,CAP_SYSLOG,CAP_SYS_MODULE,CAP_SYS_PACCT,CAP_SYS_RAWIO,CAP_SYS_TIME,CAP_WAKE_ALARM
I will follow up if I find any additional parameters that are required for creating other containers.
by default, jailmaker passes
--capability=all
Enabling all the capabilities solved it. It DOES NOT seem to be the default behaviour of the docker config script, though.
The docker config template does not include all capabilities by default. Only the minimal amount to be able to run docker inside the jail. It is true that you may have to specifically add additional capabilities for some features of containers or packages installed.
Jailmaker doesnāt pass
--capability=all
by default, only when thedocker_compatible=1
config is set. But this contains more capabilities than usually required. Which is why I didnāt add this to the docker config template.In the future I plan to deprecate the
docker_compatible
config setting and instead introduce a
privileged
option to disable seccomp, set DevicePolicy=auto and add all capabilities.
So basically what this means is, if you try deploy docker container and you run into a similar situation, you merely have to edit the docker config to add the necessary item you need. all, or specific items only. and that jailmaker plans to do something in regards to this particular situation sometime in the future.
not really a crucial container for me seeing as truenas is capable of running the scheduled smart tests and notifying about issues. i just merely like the UI. If truenas could be improved, they could maybe add a similar UI to what scrutiny did. That said, even truenas spartan look is not bad either. if you need further detail itās found in the shell or so i heard