Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Upgrading existing image #37

Closed
MihaMarkic opened this issue Dec 6, 2015 · 7 comments
Closed

Upgrading existing image #37

MihaMarkic opened this issue Dec 6, 2015 · 7 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@MihaMarkic
Copy link

Hi guys,

I wonder how the upgrade is handled. Let's say I'm running owncloud image 7.0 and I want to upgrade to the latest. How should one handle that?
I assume a volume container should be used for data but will new image over the data from older image able to handle the (if necessary) upgrade?

@yosifkit
Copy link
Member

yosifkit commented Dec 7, 2015

There is nothing we have added to the image to handle upgrading. On startup, the script only copies in the owncloud files if version.php does not exist (

if [ ! -e '/var/www/html/version.php' ]; then
tar cf - --one-file-system -C /usr/src/owncloud . | tar xf -
chown -R www-data /var/www/html
fi
), so killing your first container and starting a new version with the same volume would not change the owncloud files.

I would assume that the regular upgrade process would work: https://doc.owncloud.org/server/8.0/admin_manual/maintenance/upgrade.html.

@pierreozoux
Copy link
Contributor

I noticed that self upgrading from the webUI failed:
libresh/compose-owncloud#4

I personally prefer to mount just the necessary data (like just apps, data and config folder), and then I just docker pull and docker-compose stop, rm, up.
Then, before, I was going to the webUI to start the upgrade of the database, but the thing is that it fails!
owncloud/core#17823

I found a "nice" way of handling that, I run this:
libresh/compose-owncloud#3

I post this here for people that might be interested to upgrade on an unattended way.

But I'd like to know if you are interested in a PR that we could put this in the docker-entrypoint.
I don't know what is the 'policy' for upgrade of official docker images, but I believe it would be nice :)

Let me know!

@toplac
Copy link

toplac commented Mar 9, 2016

Any news on this? Currently i am using version 8-apache and i would like to upgrade to version 9-apache.

Data is stored inside a volume, and mysql is running in a second container. Is it enough to stop the container, delete the file verison.php, pull in the newest version and start up everything again?

@pierreozoux
Copy link
Contributor

I just upgraded, it was almost "smooth".

I have my own setup on docker-compose:
https://github.com/indiehosters/ownCloud

I replaced this line: https://github.com/indiehosters/ownCloud/blob/master/docker-compose.yml#L10

I pulled and restarted, and everything was almost fine.
I have some notes of what needed to be done:
libresh/compose-owncloud#3 (comment)

@vbauchart
Copy link

I also don't like the way this image is build, because all code is in a volume instead of the image itself !

Take a look at this Nextcloud image https://github.com/chrootLogin/docker-nextcloud/blob/master/Dockerfile to see how to build a portable and upgradable image

@pierreozoux
Copy link
Contributor

@vbauchart this is free software, please use what you feel comfortable with :)

In the mean time, we are discussing this also in Nextcloud:
nextcloud/docker#23

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Apr 25, 2018
@tianon
Copy link
Member

tianon commented Jun 8, 2018

Just tried the self-updater, and it appears the problem with it is a simple fix:

sh: 1: unzip: not found

😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

7 participants