Hey, new to nas stuff so sorry if obvious question.
i have a (command line) twitch bot i made in c# (with twitchlib library) and was thinking i want to run it on my truenas scale system so i made a w10 virtual machine on it but that uses a lot of ram and hdd space for a very small program so i was wondering if i remade it to work on linux but i have no clue how do i make a docker image for my program and how do i install/set it up on my truenas scale system.
tldr: how do i make a docker for my own program and then install it on truenas scale.
If you’re familiar with linux command-line you could play around with jailmaker (Sandboxes (Jail-like Containers) | TrueNAS Documentation Hub) - though this isn’t something I’ve explored myself and I have no idea if it fits your use-case, cc @Stux who is far more knowledgeable in this area than I am.
Too many questions for separate matters bundled into 1
I’ll help you separate them and answer accordingly
i have a (command line) twitch bot i made in c# (with twitchlib library)
so i was wondering if i remade it to work on linux but i have no clue how do i make a docker image for my program
No idea since i don’t do this. maybe someone else here can get into it. You probably should ask this on the docker forum?
I did a quick google/youtube search and found this. I’m sure you can search this yourself. This is a big ask to teach the entirety of this so not sure who has the time for that
and how do i install/set it up on my truenas scale system.
I’ll only touch on how to setup docker on truenas. i recommend you check out Stux’s video on setting up Jailmaker. This adds the jail base to be able to then install docker into it as a jail. Then you can install your docker container. I use dockge. Though you can install docker through commandline without use of dockge or portainer.
If you want troubleshoot for the exact steps, i mentioned the process in my journal
if you don’t want to wade through that and am fine figuring everything out on your own, stick to the official guides which are quick summaries
and the video stux linked above. he has 2 videos. one for the initial setup and the other for the networking portion
Not sure what level of understanding you have in regards to docker containers. Have you ever deployed a docker container? also have you editted a docker compose to deploy a docker container? These are easy things to do once you learn them. But if you are starting from scratch, you will need to learn on your own time because there is too much to cover. I recommend starting here
Some of what is mentioned in this videos you can ignore. For example install docker itself. Because you will be following Stux’s jailmaker guide for installing docker. This is the specific setup for truenas to get that to work.
I installed jailmaker but im now confused as to what to do next how do i make a debian sandbox with it? the video you linked already has a jail made and this video of yours makes a docker jail (which i tried to do but it fails to start).
edit: reading the github page helped or at least i believe just creating a jail without a premade configuration is what i want. now i just gotta get my bot on there.
i did get my bot working in the jail but the moment i exit out of the truenas shell the program stops running and i need to get back in the shell then use the command to get in the jail’s shell and then run the program.
can i somehow have it always running whether im in the shell or not?
“jlmkr list” does say that the jail is running
thank you i got it to work with tmux and for now it can be like that. i should look into dockers at somepoint sorry if that was a obvious solution, im still new to linux stuff.
final semi related question: can i shrink the jailmaker dataset? its currently 50gb and it really doesnt need to be that big as my puny program in that jail only uses 900mb of it
I have now following questions after initial launch of needed Python scripts in Docker. My config is noob’s, Dockerfile only, no yaml or something else, but working.
So - needed templates\advice\manuals of writting needed self-made apps configs for SCALE. IMHO, needed at least select predefined ports range for users self-made apps. Other tricks, like adding icons, etc are useful too. And simple manual, lelectronics for dogs" style is really welcome.
BTW, was trinking about jails, but decided to try Docker - easy indeed, even linux pods on win10