About containers

Oskari Rauta

Cadet
Joined
Mar 10, 2016
Messages
8
Hello.

I have succeeded to setup a container pretty much the way I wanted to- but as I never have understood kubes, etc advanced versions of containers, except for podman, which nearly just is docker with pods (grouped containers/shared namespace) - I am curious, I have made some studies on them, and for me, when you compare to DockerFile, they seem very complicated, though, I am prepared for replies that they aren't and that they give many advantages that are impossible/difficult with DockerFile based containers.

Okay, here's what I have learned, and propably; I am wrong here... But helm charts/kubes/etc are for services. And so are DockerFiles- except that you actually CAN use DockerFiles to other stuff too. I do a lot with that other stuff; for example, at the very moment, I am building openwrt, and I use container to provide environment for that. I wouldn't want to setup environment to TrueNAS system, as I don't want to tamper with it- I also don't have spare computers around for the job, nor willing to setup environment to them, or if I would, it would be nice if they'd have some power as well, as even with a power train, building huge projects take ages, especially, if you want to build (nearly) everything... I previously used TrueNAS CORE and used a VM, installed ArchLinux there and that got the work done back then, but I think I lost resources there too as Arch - or any distribution, in a VM- runs a lot of stuff that is not necessary for the job, so I came to conclusion that container might be a solution. And it kinda is, with some tricks I got it to run nearly the way I want it to. I used DockerFile with Docker Hub to create my container. It's a bit outdated, as it lacks tmux (screen alternative), that I have installed after getting it running- I use it to keep process of building on-going on the background and it gives me a way to restore my session as obviously when building takes days, I am not monitoring it constantly, or keeping my client machine constantly on without standby..

Also what isn't in repository, is my entrypoint scripts, first one modifies environment by setting hostname to my choice and some more "runtime" settings, second starts sshd so I can ssh into it.

Settings that I have used are tty, stdin, privileged. Then I have manual networking solution to get a static ip address (for ssh connections), and I have also some filesystem shared from host:
- /usr/src <- this is where I build
- /home/user
- /root
- /etc/ssh <- to retain my ssh keys

These are plain dataset mounts, so I can view/modify/etc files from outside of container as well.

Dockerfile installs necessary tools to get process started, creates user user and makes other minor adjustments to get process started asap. I used my facourite system as a base: alpine - which was a mistake, as I have encountered problems that I didn't see coming until I where at that point :) - but so far I have had my ways to get around the problems, though with price of time and effort and my git pull is not that much updatable anymore...

For those who are like me: curious, here's my DockerFile for this:

So, this is not only time that I have used containers for such tasks, actually I use them for tasks like this all the time, and I was just wondering, if someone would want to share some ideas on how to perform even better with alternatives, like helm charts, kubes etc.. As what I have learned, those are not for systems- they are for services, and this does not fit to such in any way. I found app from truecharts, that uses docker compose, but that didn't look like anything that would be useful for me and I ain't familiar with that either. I've done some googling around the subject, but examples don't seem useful for me at all for this use. And examples do not seem to give me enough information to make something useful (for me).

Do not get angry when I say this, but these seem to be for people who are not DIY, simple and easy way to get plex or sonarr running with work someone else has prepared for you... I'd like to more go my own way.

Also, there seems to be tons of container solutions around, and I'm familiar only with this most basic format- though, there's nothing bad, atleast it got things running- but in case of TrueNAS Scale; what actually IS supported?

Docker seems to work- and then not- but I am getting impression, that there are more advanced ways to go where I have gone also, but listing or how to do it yourself, without picking from catalogs- is information that I feel is pretty hard to find.

Oh, what problems I had. Well, configuration issues; something is wrong with setup panel, if I try to setup all settings at once, Save button gets disabled :D - So, one share at a time and so on, until I am there. Also, it lacks some features, that I overcame by setting my container privileged, so I would be able to set hostname, for example... Also, pod system seems like a hell, ixchart- no, I did not type that to anywhere, yet it shines everywhere :)

So, what I am looking for with this long explanation:
- different solutions for my container from DockerFile way.
- easy to understand guidance for other solutions to DockerFile to do things like these, or to run services without those "dumb examples" that won't help you make anything that didn't already come with provided services
- how do I use(deploy?) them in TrueNAS? Where can I host them? Or do I need to? Or should I even?
- any useful education to the subject, make me amaze my self with what I can archieve, whilst never knowing it would be this useful :)
 
Last edited:
Top