HOW TO INSTALL JAILMAKER FOR DOCKER CONTAINERS
if i were to try summarize
setup the networking first. this video teaches how to setup bridges
then follow this guide (don’t deviate)
then this guide (learn the jlmkr commands)
Quick crash course for jlmkr
- do not bind mount to the jailmaker dataset or any child residing in it. bind mount is only meant for external datasets residing outside the jailmaker dataset.
e.g.
–bind=‘/mnt/tank/docker/:/mnt/docker’ | |
---|---|
–bind=‘/mnt/tank/docker/data/:/mnt/data’ | |
–bind=‘/mnt/tank//docker/compose/:/mnt/compose’ | |
–bind-ro=‘/mnt/tank2/Storage:/mnt/Storage’ | |
–bind-ro=‘/mnt/tank2/Storage2:/mnt/Storage2’ |
-
after installing jailmaker, the next step is to install the docker using the docker script by jailmaker. modify the config before deploying it.
-
you have to downgrade docker to a working version
Apparently, docker 26.0.2 broke things. Downgrading to 26.0.1 fixes things.
To downgrade do this
jlmkr shell docker
apt-get install docker-ce=5:26.0.1-1~debian.12~bookworm docker-ce-cli=5:26.0.1-1~debian.12~bookworm containerd.io docker-buildx-plugin docker-compose-plugin
-
once docker is deployed, you are wondering why you can’t access. that is because you have to start the docker first e.g.
jlmkr start docker
after which you can then dojlmkr shell docker
at this point you can then run docker commands e.g.docker version
-
to change directory depends on the bind mounts you set earlier. using my example from before
go to the docker shell through jlmkr, then do cd /mnt/compose/portainer
this is where i store my docker-compose.yaml files to deploy the docker container. to deploy, type docker compose up -d
The old method was docker-compose up -d
but this has been deprecated so do it the new way. Another thing that has changed, within the docker compose yaml, the version line, remove it because that has been deprecated to in the newer docker versions.
- after deploying my docker container, i used my android app “Net Analyzer” did a network scan and found my docker ip. Just append at the back :port for the app
notes: when upgrading truenas, you may need to run the jailmkaker script to make it work again. Don’t worry it’s easy
./jlmkr.py install
Setting up the startup for jailmaker is important. don’t forget to set that up.
GitHub - Jip-Hop/jailmaker: Persistent Linux 'jails' on TrueNAS SCALE to install software (docker-compose, portainer, podman, etc.) with full access to all files via bind mounts thanks to systemd-nspawn!
then finally my guide if you get stuck. It’s more of a journal than a proper guide but u can see what i did, what issues i encountered, how i resolved it
i also have a issue ticket where i covered the issues i faced and got some help there as well
took me a few days to go through the guides and test to learn what it does and how to use it. it’s doable and i’m not even that technical a user but i could figure it out. you just need to be able to google and ask questions.
note: more clarification on docker bind mounts, how that works for jail and docker.