-
-
Save natewalck/7faa8638df137c84e46633d2e1913b55 to your computer and use it in GitHub Desktop.
Using Docker on TrueNAS SCALE (no Kubernetes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Using Docker on TrueNAS SCALE (no Kubernetes) | |
# | |
# Don't setup Apps via the TrueNAS Web GUI (don't choose a pool for Apps when asked) | |
# Make a dedicated docker dataset on one of your data pools | |
# Store this script somewhere else on your pool (not in the Docker dataset) | |
# Make a daeomon.json file in the same directory with the following contents: | |
# {"data-root": "/mnt/path/to/desired/docker/dataset/", "exec-opts": ["native.cgroupdriver=cgroupfs"]} | |
# Then schedule this script to start via System Settings -> Advanced -> Init/Shutdown Scripts -> Add: | |
# Choose Type: Script and choose this script, choose to run at Pre Init under When | |
# | |
# Now install e.g. Portainer to manage your containers | |
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | |
# Setup custom Docker config (overwrite if contents changed due to system update) | |
cmp --silent "${SCRIPT_DIR}/daemon.json" /etc/docker/daemon.json || echo "Updating Docker config..." && cp "${SCRIPT_DIR}/daemon.json" /etc/docker/daemon.json | |
echo "Starting Docker" | |
systemctl start docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment