usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.48k stars 577 forks source link

[BUG] THERE'S NO UPDATE/UPGRADE BOTTON FOR DOCKER CONTAINERS #1174

Open salmankavanur opened 6 months ago

salmankavanur commented 6 months ago

There's no update or upgrade feature for docker containers without lossing existing data.

usmannasir commented 6 months ago

Kindly describe your problem a bit more.

salmankavanur commented 6 months ago

The users need to get a facility to update applications in docker containers within Cyberpanel without losing all the data. The only existing option is reinstalling but then all data is overwritten.

usmannasir commented 6 months ago

May i know are you talking about our new docker apps feature or the old one ?

salmankavanur commented 6 months ago

I'm talking about the existing one. there's no update/upgrade feature for the existing containers. because most of the docker images will updated frequently by the developers. so we need to update in a single click instead of removing and reinstalling the docker images.

usmannasir commented 5 months ago

https://www.cherryservers.com/blog/how-to-update-docker-image

Is it safe to do so? As containers have to be deleted and recreated and could create issues for people not knowing what to do.

salmankavanur commented 5 months ago

When we use the docker images like nextcloud, it's not possible or practical to do like this. to delete the image and recreate is not practical always.

klebed commented 4 months ago

It should be safe to remove and redeploy docker containers with new image versions. Docker were designed that way. You only need kind of general understanding what's going on to get along with that.

Any valuable data of the container could be persisted through volumes, which maps some machine disk folders into container's FS, therefore all data being written to the machine disk and only disappear if you don't bother to set such volumes up. But if you do, so even if you deleted container, and running new one with command or compose, you will get same volumes mapped inside new containers.

You may create persistent named volume as described there: https://docs.docker.com/storage/volumes/ You may map folder to container from comandline option -v /path/to/local/folder:/path/inside/container or -v volume-name:/path/inside/container You may use compose file and define volumes inside of it: https://docs.docker.com/compose/compose-file/compose-file-v3/#volume-configuration-reference