What prompted this blog post?

So if like myself, you’ve got a large number of openSUSE machines on your network, it can be advantageous to run a local mirror, for updates. And it just so happens that one of the openSUSE developers, firstyear, has put together a nifty caching server that really speeds all this up, the proxy-cache itself isn’t the point of this blog post, but if you want to know more, you can find it at: opensuse-proxy-cache

Ok, so what does that have to do with TrueNAS Scale, or anything else?

I have a NAS on my network, running TrueNAS Scale which lets be quite honest, has alot more hardware than a NAS strictly needs, so it was an obvious place to run the proxy-cache container from. But running a command like:

docker run -p 8080:8080 -v /your/storage/:/tmp/osuse_cache/ -u X:X firstyear/opensuse_proxy_cache:latest

doesn’t “Just Work™” because that isn’t what TrueNAS does. You need to set it up through their web interface, or potentially the TrueNAS admin CLI. So this gave me a reason to document how to setup what is an otherwise generic docker container, through the WebUI.

Setting up the container

Create your dataset and make sure the permissions are right

You probably don’t strictly have to do this, but I did, you want to create a dataset, and make sure that the owner:group is apps:apps (Your TrueNAS Server may differ) truenas_proxy_19 truenas_proxy_20

Setup your container through the web interface

  1. Go to Apps in your TrueNAS WebUI, and in the upper right corner, you will see: truenas_proxy_1
  2. Click on the Blue Discover Apps button
  3. Click on the Blue Custom App button, in the upper right of the next screen: truenas_proxy_2
  4. Configure your Container. For the sake of brevity, I only screenshotted the relevant bits that I needed, you may, or may not need other options, within the container setup, such as setting environment variables, and obviously I set a static IP, which might not be to your taste. truenas_proxy_3 truenas_proxy_4 truenas_proxy_5 truenas_proxy_6 truenas_proxy_7 truenas_proxy_8

It’s pretty much that easy. If the container you want is coming from ghcr.io or quay.io or a registry other than docker, I believe you need to specify that in the Image Repository field, but this should be your basic method for spinning up most basic docker containers, in TrueNAS Scale.