Custom Docker containers are not persistent

AnosVoldigoad

Dabbler
Joined
Apr 4, 2021
Messages
17
Hello together,I have the problem that when I select any docker container from docker hub, I can configure and start it was. The problem is that as soon as I turn the container off and on again, all settings, configurations and changes in the container are gone again, as if it had been reinstalled or simply all changes are made only temporarily.

How did I proceed?
-Selected "Lounch Docker Image" under Apps.
-Set a name.
-Specified the Docker container in the image repository (from Docker Hub).
-Didn't touch most of the settings for testing purposes, almost every container should run like this. Until just a few of the required environment variables set.
-Setup completed

Docker downloads the image, installs and starts. Everything as it should.

After that I set a few things under the web interface, all so far io.

As soon as I restart the container all settings are gone and I can set everything again on the website of the container.

Tested containers:
(i guess the problem affects all containers)

I know that I can include the truecharts list, which I have already done. However, I also want to install some docker that doesn't exist in the list. That must be possible or not?

I hope someone can help me with my problem or should I wait until the next update of Truena's Scale comes out?

Translated with www.DeepL.com/Translator (free version)
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
That's by design I believe. Docker containers are always supposed to be considered non persistent. I think vanilla Docker breaks that assumption and allows containers to stay persistent but that's technically against the design philosophy of Docker containers.

Thanks,
Harry
 

AnosVoldigoad

Dabbler
Joined
Apr 4, 2021
Messages
17
Yes, but it can't be that I always have to reset everything in Docker every time I restart the nas.
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
You have to configure persistent storage for your docker container.

Docker containers are based on "immutable" images. Every time you recreate docker container all of it's contents gets wiped and replaced with the image. TrueNAS recreated containers on reboot therefore wiping all non-persistent data. Even if Scale did not do this you would still loose all non-persistent data after every container update.

You have to set up volumes according to the container documentation.
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
Not familiar with this container but it looks only 1 directory is mentioned in the documentation: /home/jovyan/work So it looks like you just need to mount a volume or path to /home/jovyan/work inside of the container.
Its all mentioned under the second link you provided.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788

AnosVoldigoad

Dabbler
Joined
Apr 4, 2021
Messages
17
Not familiar with this container but it looks only 1 directory is mentioned in the documentation: /home/jovyan/work So it looks like you just need to mount a volume or path to /home/jovyan/work inside of the container.
Its all mentioned under the second link you provided.
I read that too, but read from it that this is just the working directory. But I can test it.

Emby is relatively simple, maybe it would be an idea to use something pre-made like our Emby App?
I also use the prefabricated version of truecharts, but Emby is as mentioned relatively easy to set up and well described. That's why I use Emby to warm up with Docker.
 
Top