You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
@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.
Activity
JakobDev commentedon Nov 15, 2023
You can actually update the Fedora version inside the Container
debarshiray commentedon Jan 29, 2024
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-toolboximage, 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.
debarshiray commentedon Jul 22, 2025
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 rundnf 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.debarshiray commentedon Jul 22, 2025
#873 is related.
sgallagher commentedon Jul 23, 2025
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.