Page 1 of 1

Easier container upgrade?

Posted: Thu Nov 30, 2023 8:12 pm
by chiem
Right now, updating/upgrading a container appears to require stopping a container, removing it, re-adding it, and then starting it. This is made more difficult by the fact that /container/export doesn't provide the full command needed to re-add a container--it's missing the remote-image attribute.

Can this be made easier, into a single command? ie. an Upgrade button in Winbox next to Start/Stop? and something like
/container/upgrade #
in the CLI?

Re: Easier container upgrade?

Posted: Thu Nov 30, 2023 8:38 pm
by optio
It will be great feature in ROS to have something like that, but currently you need manually create new container configuration with same properties, even configuration copy for me in the past was created issues -> viewtopic.php?t=193109, did not try copy again on newer ROS versions. I'm doing this by opening current configuration window in Winbox, creating new and c/p from current into new, stopping and removing from current config window, waiting a bit for cleanup and then by pressing OK in new config window.

Re: Easier container upgrade?

Posted: Thu Nov 30, 2023 9:40 pm
by Amm0
This is made more difficult by the fact that /container/export doesn't provide the full command needed to re-add a container--it's missing the remote-image attribute.
I did file a bug SUP-128652 a couple month back on that remote-image= should be in the exported config; with a response:
The bug has been opened, and will be fixed in future RouterOS builds, unfortunately I cannot provide any ETA for fix.

But scripting the entire /container/stop, (wait for stop), /container/remove, /container/add, (wait for extract), then /container/start is about your only choice today.

Re: Easier container upgrade?

Posted: Sat Dec 02, 2023 11:06 am
by elico
@Amm0 scripting something like docker-compose would be pretty simple to some degree.
An upgrade can be done with a "spec" of the container making sure that the data is saved.
There is even probably an option to take an existing container, delete it and recreate it with a set of commands.