Skip to content

Possibility to "rebase" a container  #1358

Open

Description

@bilelmoussaoui

Is your feature request related to a problem? Please describe.

Currently, when updating say, from Fedora 38 to Fedora 39. You would usually stick with using your old container until at some point, one of your projects starts depending on a too new release of a package forcing you to create a new container. The creation bits are pretty straightforward; the annoying part is copying all you had installed and configured inside the old container and it would be pretty handy if toolbox could just do some parts of it for me, optionally.

Describe the solution you'd like

When running toolbox create, if the user has an old version of the distribution container, toolbox could ask to re-install the existing packages from the old one maybe?

Describe alternatives you've considered

Weird local shell scripts to make my life easier

Additional context
Nothing to add

Activity

  1. added
    1. Feature request
    on Aug 25, 2023
  2. JakobDev commented on Nov 15, 2023

    @JakobDev

    You can actually update the Fedora version inside the Container

  3. debarshiray commented on Jan 29, 2024

    @debarshiray
    Member

    You can actually update the Fedora version inside the Container

    Yeah, one option is to try to upgrade the existing Fedora container in-place to a newer Fedora release, just like one would upgrade a Fedora host.

    However, sometimes people don't want to do that, because of too many local changes that can either break the upgrade or they want to start from as close to a pristine state as possible. For those cases, I can think of two options.

    One, you could maintain a separate Containerfile where you layer on the extra packages that you use on top of the registry.fedoraproject.org/fedora-toolbox image, and then always create containers from images built from this Containerfile.

    Or, you could maintain an Ansible playbook that you always run to perform post-installation customization on a container. I think Toolbx could grow some features to make it easier to do that.

  4. debarshiray commented on Jul 22, 2025

    @debarshiray
    Member

    I found myself thinking about this today.

    @sgallagher has a script that uses rpm --all --query ... inside the existing container to get a list of the installed RPMs, renames the container as backup, downloads the newer image, creates a new container, and installs the list of RPMs inside it.

    The script currently updates containers to newer builds of the same image, not from Fedora N to N+1, but that's not a big deal.

    I suspect we might have problems dealing with third-party RPM repositories, like RPM Fusion, Google Chrome, VS Code, etc.. It would be good if we could detect this in the older container and give the user a hint to somehow (eg., manually) add those repositories into the new container.

    Finally, instead of running the dnf --assumeyes install --skip-broken ... for the user, I wonder if it would be more wise to put the list of RPMs into a file, and ask the user to manually run dnf install $(</path/to/file-with-list-of-packages), just like with the third-party repositories above. This way we won't have to mop up a failed upgrade due to a DNF failure (caused by a network problem, running out of local disk space, RPM transaction problems, etc.) or deal with bug reports complaining about that.

  5. debarshiray commented on Jul 22, 2025

    @debarshiray
    Member

    #873 is related.

  6. sgallagher commented on Jul 23, 2025

    @sgallagher

    The script currently updates containers to newer builds of the same image, not from Fedora N to N+1, but that's not a big deal.

    For the record, it does also update from Fedora N to N+1 as the base of the image, whenever the new Fedora stable version is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. Feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions