DEPRECATED
With the updated to Truenas 24.10 EE, this guide is no longer relevant. Instead of creating a jail system, just install the Dockge Truenas app.
Based on this video
This guide is for installing jails on Truenas using jailmaker. This will allow you to run docker apps, and uses dockge to manage docker compose.
Step 1: Create datasets
Create the following datasets on the “scratch” disk.
- jailmaker
- docker
- data
- stacks
Step 2: Install jailmaker
Go to a shell and run the following commands
cd /mnt/scratch/jailmaker
git clone https://github.com/Jip-Hop/jailmaker.git .
./jlmkr.py install
Step 3: Trigger jlmkr on startup
In truenas go to System Settings > Advanced.
Under Init/Shutdown scripts, click “add” and enter the following info:
- description
- start jailmaker
- type
- command
- command
- /mnt/scratch/jailmaker/jlmkr.py startup
- when
- post-init
- enabled
- check
- timeout
- 30
Step 4: Create a jail
Go back to the shell and run the following commands
cd /mnt/scratch/jailmaker
./jlmkr.py create
It will open a text editor, copy the template config file and paste it. Save and close the file.
When prompted for a jail name, type “docker”.
Run the following command to ensure the jail has been created correctly.
./jlmkr.py list
At any point, you can edit the config with this command.
./jlmkr.py edit docker
./jlmkr.py restart docker
Step 5: Install Dockge
Run the following command to access the docker jail's shell.
./jlmkr.py shell docker
Ensure your network is running and see the ip address.
ip a
Run the following commands to install dockge.
mkdir -p /opt/stacks /opt/dockge
cd /opt/dockge
curl "https://dockge.kuma.pet/compose.yaml?port=5001&stacksPath=%2Fopt%2Fstacks" --output compose.yaml
docker compose up -d
Done
In a new browser tab, go to the following address:
192.168.0.31:5001
You can now begin to use dockge to deploy containers with docker compose.