Community discussions

MikroTik App
 
chiem
newbie
Topic Author
Posts: 42
Joined: Fri Oct 24, 2014 4:48 pm

Easier container upgrade?

Thu Nov 30, 2023 8:12 pm

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?
 
optio
Forum Veteran
Forum Veteran
Posts: 751
Joined: Mon Dec 26, 2022 2:57 pm

Re: Easier container upgrade?

Thu Nov 30, 2023 8:38 pm

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.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3797
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Easier container upgrade?

Thu Nov 30, 2023 9:40 pm

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.
 
elico
Member Candidate
Member Candidate
Posts: 156
Joined: Mon Nov 07, 2016 3:23 am

Re: Easier container upgrade?

Sat Dec 02, 2023 11:06 am

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

Who is online

Users browsing this forum: No registered users and 1 guest