Newbie question... cant find a definative answer... container updating

Currently reading
Newbie question... cant find a definative answer... container updating

49
3
NAS
Ds920+
Router
  1. RT6600ax
Operating system
  1. Windows
  2. other
Mobile operating system
  1. Android
Hello everyone, still on the learning curve, and messing about with docker... easy one for you to help with i hope.

Ive got a issue with my jellyfin docker, but i see its a known issue and fixed in the latest .5 version, in checked and mines .2 so how do i update it?

I downloaded the latest version image from registry, stopped my container then restarted but its still running .2 version.

I see a post saying to stop it, click clear then restart it, but when i tried i cancelled out as it said it would erase all container contents, and i dont want to loose my jellyfin settings, content etc so didnt want to do it without asking.
 
If you are using Synology Docker UI then the clear command from the Action menu is the way to go. When you pulled the new image, what needs to happen is that you need to let docker recreate a new container with the same settings but apply the new image.

Containers are meant to be destroyed and recreated that's the whole idea.

When it comes to container data (or better yet app data) you are correct. If the data that needs to remain is not inside a volume or you don't have a volume bind to a location on your NAS, clearing the container will "reboot" it and you will lose your settings.

So my question now is do you have any volumes associated with that container? Can you share how you configured your jelly container in the 1st place?
 
I followed this guide to install jellyfin...

If you are then using the official repo that this tutorial runs, def there is a problem here. The guide states making 2 volumes (movies and tvshow) but not the config volume. So the config for this whole setup would go away as soon as you recreate the container.

Looking at the official documentation here: Installing Jellyfin | Documentation - Jellyfin Project you can see that there is also a volume bind option for the jelly configuration folder:

Code:
volumes:
      - /path/to/config:/config
      - /path/to/cache:/cache
      - /path/to/media:/media
      - /path/to/media2:/media2:ro

So what you can do is just add one more volume to your current container that will point a local folder on your nas (like: /volume1/docker/jellyfin/config) to the internal /config path, just like you did with movies and tv show.

After that, you should be able to see the configuration files on that local folder you have configured. If you configured it correctly, you can then safely do the clear command as the new container will continue to use all the configuration parameters of the current container and just load the new image under it.
 
Excellent stuff... I think my other container, transmission vpn has config folder mapped too... I kinda remember doing it, must've been a better guide to follow.

Is there an container that can inform you if updates are available to your containers? I've seen watchtower but don't really want things updating themselves, just be nice to know if an update is available.

Thanks for the help... My next step is setting up the synology firewall.
 
Personally I use DIUN to notify me of any updates and I can then do them as and when I want to.
Oh, I see Rusty beat me to it as usual.
 
You can do it now and yes the files will present themselves in the target folder.
I guess I am missing something. If a (bind-mount) volume is mapped into a container folder, the existing content will become invisible and won't be present in the host side of the mapping.

Depending on wheter the main process in the container keeps files open or not, it might require some jack-shaving to transfer the data back to your host...

If the Dockerfile marked the particular folder as "VOLUME", chances are hight that an anonymous volume was created. This would allow to "easily" create a consitent copy of the files.

You can find out what volumes are actualy mounted to the container (including anonymous volumes):
Code:
docker inspect ${container name or id} -f '{{json .Mounts}}'

Make sure to replace ${container name or id} with the real container name or id from your system.

Each entry will have a "Destination" (=mountpoint in Container) and a "Source" (=path on the host). The files from the (anonymous) volumes will be stored in that location. Make sure the container is stopped, before you copy the files to the target location of your choosing. Then create a volume mapping for this lcation of your choosing to the container path shown in Destination.

Does that make sense?
 
I guess I am missing something. If a (bind-mount) volume is mapped into a container folder, the existing content will become invisible and won't be present in the host side of the mapping.
Ofc you are correct. I forgot to say that the config content wound need to be copied first to that local folder and then map it back.
 
It also could have been me, missing out on details as well
No no, thank you for pointing this out. You are correct ofc. I just skipped ahead one step on my last reply.

@thebroughfamily - before you will make that /config mapping you will have to get to that current content in order to copy it to your local "config" file and then bind it as a volume.

You can log via ssh (or the Terminal tab in Docerk UI) to that container and copy the content of that config folder to a temp folder in your "movies" folder for example, so it will be accessible in your NAS Movies folder.

From there copy the content to the new config folder and then do the volume mapping and rerun the container.
 
Now youve made something easy into something i really dont understand lol...

i think i need to find where the config stuff is currently located, then copy it to a temporary location, then make the mapped config folder, then move the files from the temporary location to the new location.

where to start??
 
You nailed the steps ;)

So with the running container, do this:

01. open Docker UI in Synology and open the Details option of your jelly contianer
02. switch to the Terminal tab
03. Click the Create dropdown menu and click Launch with command

Screenshot 2021-05-12 at 13.51.32.png

04. type in bash (or ash) and hit return
05. you should land in the bash command line similar to this

Screenshot 2021-05-12 at 13.54.34.png


Now you are inside the container.

06. use linux command to locate and copy the content of config folder and copy it to your movies folder that should be also visible

07. Now that you have the content you can use File Station to extract that config folder from your movies folder and copy it to the final location (/volume1/docker/jelly...).
08. Stop the container at this point
09. edit the current container and add a new volume map that will connect the copied config folder to the destination /config folder.
10. start the container again
 
My god this is above me 🤣

So followed them instructions, had to use bash as ash gave an error... Bash gave me root access, ran "ls" and it showed me the folders in your picture.

So I ran "cp -R /cache /media/cache" & cp - R /config /media/config"

And now I have copies of both folders in my media directory along with my movies etc.

I've then gone into my docker folder on volume 1, made a jellyfin folder and moved them 2 folders into it.

I've then stopped the container, edited it and mapped in them drives as /config and /cache.

Does that seem right?
 

Attachments

  • IMG_20210512_133148.jpg
    IMG_20210512_133148.jpg
    3 MB · Views: 14
This has really gone off-topic ... "container updating"... perhaps split into new thread?
This is still the updating procedure... they are helping me right my wrongs so i can update.
-- post merged: --

Spot on! Fire it up.
Thank you for the help, after mapping the folders, stopping, clearing and then restarting the jellyfin container i can comfirm it updated to .5 as i wanted, and has kept all its config and data intact. You are all stars.
 
This is still the updating procedure... they are helping me right my wrongs so i can update.
-- post merged: --


Thank you for the help, after mapping the folders, stopping, clearing and then restarting the jellyfin container i can comfirm it updated to .5 as i wanted, and has kept all its config and data intact. You are all stars.
well done m8!
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
Well I have been busy today so didn't have time to answer sooner, but @one-eyed-king said it all. So in...
Replies
4
Views
1,685
  • Question
Those are questions that might be better aimed at people that actualy use pipes.digital. I realy just took...
Replies
9
Views
2,509
  • Solved
Brilliant, thanks again (y) 1638624696 It's working fine now, thanks very much for your help (y)
Replies
4
Views
3,298
I never containerized any php application myself, as my job usualy requires java based images (lately all...
Replies
8
Views
2,308
OK... That seemed to work when I changed the group from user to administrators (while using an...
Replies
6
Views
10,648

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top