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

    HP MicroServer Gen 8
    HP DL360e Gen 8 + HP StorageWorks D2700

    HP DL380e Gen 8 + HP StorageWorks D2600

  • 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 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • 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.

    HP MicroServer Gen 8
    HP DL360e Gen 8 + HP StorageWorks D2700

    HP DL380e Gen 8 + HP StorageWorks D2600

  • 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!

    HP MicroServer Gen 8
    HP DL360e Gen 8 + HP StorageWorks D2700

    HP DL380e Gen 8 + HP StorageWorks D2600

  • This is not correct. See the Tags section of the documentation:
    https://hub.docker.com/r/plexinc/pms-docker

    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. :)

    HP MicroServer Gen 8
    HP DL360e Gen 8 + HP StorageWorks D2700

    HP DL380e Gen 8 + HP StorageWorks D2600

  • 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 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.


  • 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!

    HP MicroServer Gen 8
    HP DL360e Gen 8 + HP StorageWorks D2700

    HP DL380e Gen 8 + HP StorageWorks D2600

  • 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 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    Einmal editiert, zuletzt von gderf ()

    • Offizieller Beitrag

    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 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • 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!

    HP MicroServer Gen 8
    HP DL360e Gen 8 + HP StorageWorks D2700

    HP DL380e Gen 8 + HP StorageWorks D2600

    • Offizieller Beitrag

    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.

    • Offizieller Beitrag

    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 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • 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.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!