Reacreating containers maintaining settings

  • Hi all,


    Im rather new to Docker as I just installed the Docker plugin (running Plex, Emby, Transmission-OpenVPN) in the last month.


    While my containers were running, a new version of Plex was released and I realized that in order to upgrade I had to stop the running container, start a new container based on the new image while pointing at the existing configuration.
    I soon realized that I had to set again all he options (paths, PUID, PGID, etc.); while this I straight forward for Plex and Emby (5 shares, 3 options), it would be a pain for Transmission-OpenVPN where I customized 30 or more options.


    So, here comes my question.
    Is there a way to backup/store a configuration file and then start a new container using this file (without having to set again manually all the options)?


    Thank you all.


    Best regard,
    Tommy

  • While my containers were running, a new version of Plex was released and I realized that in order to upgrade I had to stop the running container, start a new container based on the new image while pointing at the existing configuration.

    What you did is not the correct procedure to update Plex for the Linuxserver.io image. All you needed to do was restart the container. This downloads and installs the latest available version of Plex Media Server within the container itself.


    One thing to keep in mind is that the version of the docker container and the version of the software the container runs are two different things.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • Thank you @KM0201.


    I had seen the video from TechnoDadLife about WhatchTower but I haven’t used it yet.
    Is that generally what people do?


    But I’m wondering, is there an easy way to export the configuration (i.e. to a *.yml file) and then recreate the container based on that file?
    I am wondering so as, let’s say, one day I might need to migrate to new hardware and/or re-image my NAS and it’d be handy to have a way to just recreate the containers as they were (proving share names do not change and configuration folders are retained).


    Thank you.

  • Use portainer, it has an option to update the image. Also I keep repeating this whenever I can: Use docker-compose, is more portable and maintainable, you can upgrade the images also in one command.
    The plugin is not maintained any more by the way in favor of portainer for the next future releases of omv.

  • Thank you @subzero79.


    So, docker-compose has the ability to rely on configuration files; I will need to look better into this and understand how to export the configuration of running containers.


    I’m still running OMV 4 so I don’t think there is an option to run Portainer (unless I run it in a docker image itself), however I’ve tested OMV 5 with Portainer in a VM and I found it much more complex than docker-gui.
    I must admit I struggled to find a way to search for images on Portainer.
    Would you have any resource you’d recommend for better understanding docker-compose and Portainer?


    Thank you!

  • Thank you for the correction @gderf; I did restart the container but I kept getting the notification of a new version available so I supposed it wasn’t auto-apdating.
    Good to know I was wrong as that’d simplify my life. :-)

    In order for updating to work with the official image when restarting the container, you have to specify the proper image Tag when you initially pull and run the image.


    For the Linuxserver.io image, this is controlled via an environment variable which you can either set initially or edit later.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.


  • In order for updating to work with the official image when restarting the container, you have to specify the proper image Tag when you initially pull and run the image.

    You lost me here.


    I had pulled an image with the “latest” tag, then I had pulled it again when s new version was release; I ended up with a single Plex docker running but 2 Plex images, one of which was the original one and the other was the newly released one.


    How could I tell docker to use the latest (newly released) and not the one that was originally used for the container creation?


    Thanks!

  • I can't answer your question because I do not know how you are dealing with dockers. What tool are you using?


    Did you read the Tags section of the documentation?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

    Edited once, last by gderf ().

  • I've used Watchtower for a while and I've never had an issue with it. I can't speak for the official plex image...but the linuxserver plex image...


    https://hub.docker.com/r/linuxserver/plex/



    Below...Note the -e VERSION=docker variable (line 6)



    Scroll on down... Under Parameters you'll see this...




    Code
    -e VERSION=docker Set whether to update plex or not - see Application Setup section.




    And finally under Application Setup...

  • The official Plex image and the Linuxserver.io image differ when it comes to updates to the Plex Media Server running within the container.


    The Linuxserver.io image controls this behavior via an environment variable. That means you can modify the container to change the behavior without starting over with a fresh image pull and configuring it all again from scratch.


    The official image requires you to make the decision about update behavior when you initially pull the image. If you want to change the behavior later you have to start over with another image and configure it all over again from scratch.


    And as I have said, an update to the image version does not necessarily mean that there will be an update to the Plex Media Server version running within the container. These are two completely different and separate things.


    And do keep in mind that we are discussing Plex dockers here. Very few, if any other images have this capability.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • Hi all,


    I've just installed portainer/portainer:latest so to get used with this new tool.
    I can see my contianers and their information and details.


    Is there an easy way to export the configuration (settings, volumes, etc.) from a running container so to be able to re-create the container "as is"?


    For example, let's say I delete Transmission-OpenVPN and, in a month time, I want to re-deploy as it was prior deletion (with username, password, PUID, volumes etc. set).
    Is there a way to do so?


    Thanks!

  • Note the -e VERSION=docker variable

    The docker setting description reads: "This is the same as leaving this setting out of your create command." So you would not want to use that one if you wanted "restart" updates. Latest implies that you will be upgraded with the latest "bleeding edge" version "you are entitled to." So is it correct to assume you would want to use the public variable for VERSION?


    I don't remember anything like this included in the [How-To] video. I've read from time to time "just restart your Plex container" but I when I tried it nothing happened. Now I know. Gotta go try it.

    Rsync makes true backup and restoration stupid easy, and it's built right in to OMV. Use this command in a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-NAMEofSOURCEdisk/ /srv/dev-disk-by-label-NAMEofDESTINATIONdisk/
    OMV Version: Ver. 5 (current) - Hardware: NanoPi M4, running Nextcloud, Plex, & Heimdall - Acer Aspire T180, running backup - Odroid XU4, running Pi-Hole (DietPi) - Testing/Playing: Odroid HC2, Odroid XU4, Raspberry Pi 3B+, Odroid XU4, and HP dx2400.

  • The docker setting description reads: "This is the same as leaving this setting out of your create command." So you would not want to use that one if you wanted "restart" updates. Latest implies that you will be upgraded with the latest "bleeding edge" version "you are entitled to." So is it correct to assume you would want to use the public variable for VERSION?
    I don't remember anything like this included in the [How-To] video. I've read from time to time "just restart your Plex container" but I when I tried it nothing happened. Now I know. Gotta go try it.

    That's my point... if you read further, that is the environment flag he needs to adjust per the other instructions on that page(assuming he is a Plex pass member)

  • The OP is not running the Linuxserver.io image. Continuing to make replies citing configuration examples for this image are not helpful to the OP because they do not apply to the image he is running.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • https://github.com/Red5d/docker-autocompose but I don't use it and can't answer any questions about it.

    It generates a yaml in the specified location, so does what it is supposed to do.


    Portainer itself has a recreate function, which also allows you to pull the latest image, useful for updates, though I normally use Watchtower for that. I also used that function to switch Domoticz from the deprecated lsioarmhf/domoticz version to the newer linuxserver/domoticz version.


    To export the configuration, the best I found so far is autocompose, mentioned above.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!