First time building a TrueNAS docker interface

DavidinGA

Explorer
Joined
Jun 8, 2022
Messages
62
I'm running a docker-based app on a RPi that processes public service communications - captured via a USB-connected rtl-sdr device.
It currently sends that captured communications to several online services who make it available to the public.
I'd like to offer a free local service via my self-hosted Dell R720xd server - with a better user interface.
All that to say that I need clarity before I begin porting the system to my TrueNAS Dell server.
Question: If I load docker on my StoragePool1 (a raided SAS HDD) will it use TrueNAS as the OS?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Question: If I load docker on my StoragePool1 (a raided SAS HDD) will it use TrueNAS as the OS?
I'm not sure that's a question that makes any sense...

if you mean... Can I use TrueNAS as the OS to launch docker and have it use the local storage on the system?

Answer: It depends and no.

If you're using a RAID set via a hardware RAID controller (seems you say you are), it's highly unlikely that it's already ZFS (or if it is, you've been getting away with good luck) and TrueNAS only works with ZFS.

See here: https://www.truenas.com/community/t...s-and-why-cant-i-use-a-raid-controller.81931/

If you get yourself a proper HBA setup, then you have the second part to deal with...

TrueNAS core doesn't run Docker natively as it's FreeBSD and there's no docker build worth discussing for that platform.

TrueNAS SCALE does run kubernetes (with docker as the container engine for now), so maybe that's the droid you're looking for. You'll still need to sort out the RAID situation if you don't want to lose your data under ZFS.
 

DavidinGA

Explorer
Joined
Jun 8, 2022
Messages
62
I'm not sure that's a question that makes any sense...

if you mean... Can I use TrueNAS as the OS to launch docker and have it use the local storage on the system?

Answer: It depends and no.

If you're using a RAID set via a hardware RAID controller (seems you say you are), it's highly unlikely that it's already ZFS (or if it is, you've been getting away with good luck) and TrueNAS only works with ZFS.

See here: https://www.truenas.com/community/t...s-and-why-cant-i-use-a-raid-controller.81931/

If you get yourself a proper HBA setup, then you have the second part to deal with...

TrueNAS core doesn't run Docker natively as it's FreeBSD and there's no docker build worth discussing for that platform.

TrueNAS SCALE does run kubernetes (with docker as the container engine for now), so maybe that's the droid you're looking for. You'll still need to sort out the RAID situation if you don't want to lose your data under ZFS.
Sorry, I should have written "TrueNAS equivalent of raid" - I have two drives paired for TrueNAS, two that I want to use in this application, then two more for additional uses. This is what StoragePool1 looks like ...
1655995847783.png
 

DavidinGA

Explorer
Joined
Jun 8, 2022
Messages
62
"TrueNAS SCALE 22.02 is based on Debian 11 “Bullseye” and supports existing TrueNAS CORE features plus new Linux-specific capabilities, including Docker containers, Kubernetes, KVM, and more." (Just updated to 22.04).

Should I copy the Docker Image from the RPi to "storagepool1" (the drive from which I want to run, and on which I want to store, all scanner stuff) - then it will autodetect that Docker Image and in Apps offer to "Launch Docker Image"?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
As far as I know you need to go through the UI and launch your Docker image from a repository, not from any manually created local storage. It definitely does not autodetect anything. You can deploy the apps that are available in the repo. You can add additional repos like TrueCharts [1]. You can use the TrueCharts "Docker Compose" app to use a classic docker-compose mechanism.

[1] https://truecharts.org
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Should I copy the Docker Image from the RPi to "storagepool1"
Just be aware that if it's your intention to use the docker image you currently use as a way of transferring files, you're in for disappointment... you are changing architectures from ARM to X64, so that same container won't run.

You can probably find an equivalent of that container for the X64 architecture and run that, but no content of the container will come across.
 

DavidinGA

Explorer
Joined
Jun 8, 2022
Messages
62
While I hunt the X64 container ... is there any app I should load prior to Docker, or does the order of loading not matter?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
I'm not sure you're on the same page here... TrueNAS SCALE includes docker already.

Do you mean should you first load the docker compose app from TrueCharts? (yes, if you want to use docker compose to run your container)

If you just want to run the container and it doesn't need docker compose, you can just click the "Launch Docker Image" button on the Apps page.
 

DavidinGA

Explorer
Joined
Jun 8, 2022
Messages
62
I'm not sure you're on the same page here... TrueNAS SCALE includes docker already.

Do you mean should you first load the docker compose app from TrueCharts? (yes, if you want to use docker compose to run your container)

If you just want to run the container and it doesn't need docker compose, you can just click the "Launch Docker Image" button on the Apps page.
The way it's currently set up, on the RPi, it uses Docker-Compose so I probably need to roll with that.
On the related group I'm told that I just need to "copy the volumes and make sure the permissions are right and should fire right up."
They said that the image is set to "latest" so all should be good there.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
One does not simply fire up a docker image on TrueNAS SCALE. The app must be managed by the middleware and k3s.

Unless you want to do it on the command line and have no UI visibility or management of your application at all. But then it would probably be preferrable to use stock Debian or Ubuntu instead of SCALE.
 

DavidinGA

Explorer
Joined
Jun 8, 2022
Messages
62
One does not simply fire up a docker image on TrueNAS SCALE. The app must be managed by the middleware and k3s.

Unless you want to do it on the command line and have no UI visibility or management of your application at all. But then it would probably be preferrable to use stock Debian or Ubuntu instead of SCALE.
I normally manage the app from the command line. Users will, of course, need to have UI visibility - but that's baked-into the app. Is something additional required of TrueNAS SCALE to facilitate a user connecting and viewing the associated app menu system?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No. I am speaking of the TrueNAS app management UI. SCALE is built on Linux so you can do on the command line whatever is possible on Linux. The question is, why run SCALE in this case and not Debian? Everything you do on the command line will be unsupported and might break by an update or because of other things. SCALE is an appliance with a defined feature set. What is not available in the UI is unsupported and prone to break.
 

DavidinGA

Explorer
Joined
Jun 8, 2022
Messages
62
Perhaps I'm wrongly presuming there's something necessary to the Server environment that's different than generic Debian.
One of the apps is a scanner feed. People, perhaps hundreds, need to be able to connect and set up a free account - so they may select what they want to hear from a list of options.
Other apps would mostly be informational - though one or more may permit interaction (a blog or something).
Is there anything about the SCALE version of Linux-TrueNAS that would be necessary to managing any of this - or is it just necessary to the overall management of the server, only??
Or, can I load Debian (or some Debian-based distro), and then build the apps on that?
Thanks
 
Top