Base upgrading techniques

Hi,

I’d like to ask is there any clean way to upgrade bases without doing it inside container?

I know bases are updated manually if I use aliases and --auto-update while lxc image copy.

output of lxc image list local:

+-----------------+--------+--------------------------------------------+--------------+-----------+----------+-----------------------------+
|      ALIAS      | PUBLIC |                DESCRIPTION                 | ARCHITECTURE |   TYPE    |   SIZE   |         UPLOAD DATE         |
+-----------------+--------+--------------------------------------------+--------------+-----------+----------+-----------------------------+
| alpinestable    | no     | Alpine 3.16 amd64 (20221201_13:01)         | x86_64       | CONTAINER | 2.49MB   | Dec 1, 2022 at 8:16pm (UTC) |
+-----------------+--------+--------------------------------------------+--------------+-----------+----------+-----------------------------+
| debianstable    | no     | Debian bullseye amd64 (20221201_05:24)     | x86_64       | CONTAINER | 83.54MB  | Dec 1, 2022 at 8:16pm (UTC) |
+-----------------+--------+--------------------------------------------+--------------+-----------+----------+-----------------------------+
| fedorastable    | no     | Fedora 36 amd64 (20221201_20:33)           | x86_64       | CONTAINER | 101.44MB | Dec 2, 2022 at 2:11am (UTC) |
+-----------------+--------+--------------------------------------------+--------------+-----------+----------+-----------------------------+
| opensusecurrent | no     | Opensuse tumbleweed amd64 (20221201_04:21) | x86_64       | CONTAINER | 41.90MB  | Dec 1, 2022 at 8:16am (UTC) |
+-----------------+--------+--------------------------------------------+--------------+-----------+----------+-----------------------------+

For instance I’d like to upgrade all Alpine 3.16 launched with alias alpinestable containers, to Alpine 3.17.
Also I’d like my new Alpine containers to be based on Alpine 3.17.

However my alias still points to 3.16

Is it possible to do so?

After reading your post a couple of times, I think you mean images with “bases.” You also seem to be under the belief that upgrading the image that a container was made from will somehow upgrade the container as well. It won’t.

The images are only used during creation of the container, not after it, and you can do whatever you like to the images after the container has been created – including delete the images – and it won’t change literally anything regarding the existing containers.

If you want to upgrade your containers, you will have to do it inside the containers.

1 Like