Question about Dockers

balle1

Cadet
Joined
Nov 2, 2021
Messages
2
Hi,

Ive used Truenas Scale for a few months and its great!

Although im a bit confused about the dockers.
Are docker containers supposed to always redeploy on a reboot?
Its the same with the stop button as i thought that it would shutdown the container, but instead it redeploys it again and i lose all configuration that i made inside it.
Is this normal behavior?

Best regards
Balle
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
SCALE is using Kubernetes as the method for managing containers (currently docker).

Containers (in their pure form) are stateless, so should not contain any configuration or changes inside the container.

So:
Is this normal behavior?
Yes.

Kubernetes doesn't really have a "stop" concept, so what happens is that the pod is set to schedule 0 containers to get that result, hence the deletion of the running container.

What you need to do is use host path or other volume substitutions to catch any changes you're making and keep them outside the container... then the next creation of the container will just pick up the stored changes and run as normal.

Perhaps a bit of study on how containers work may help on your side.

If you want to run any of the apps already covered by TrueCharts, maybe you're better going that way (there are guides on how to get going as well as the list of apps and how to add it to TrueNAS SCALE):
 

balle1

Cadet
Joined
Nov 2, 2021
Messages
2
Okay, it just seems weird that i have to go through Jellyfin's initial configuration and rebuild my entire metadata library every time i reboot the server or just update the docker itself.
But ill read myself up on docker and see if it's just me that is misunderstadning.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Jellyfin is available in TrueCharts.

You should use the chart version, you'll be happier.

Pay attention to the section on Storage and Persistence when you run the setup and choose host path if you want to be able to find the database and config later (otherwise leave it default and the system will keep those hidden from you, but will be persistent between container creations)
 
Top