docker icon indicating copy to clipboard operation
docker copied to clipboard

docker image 3.10 distributes matomo 3.9 files from volume after update

Open markuman opened this issue 5 years ago • 8 comments

This docker image uses /var/www/html as volume. And on an init startup e.g. of 3.9, it moves all files to that path/volume https://github.com/matomo-org/docker/blob/master/apache/docker-entrypoint.sh#L5
When I start docker image version 3.10, this step won't be executet. So I run matomo docker image 3.10, but my volume distributes still the files from matomo 3.9

markuman avatar Jul 09 '19 05:07 markuman

Why is the moving necessary? Can't we just do this during the build of the docker container? Installing plugins should still be possible because of OverlayFS. Database Migrations should also be run at container start.

msander avatar Jul 24 '19 06:07 msander

I agree this is a quite serious issue. So - how are you supposed to do a proper upgrade using Docker containers? Would anybody know?

larsskj avatar Nov 21 '19 16:11 larsskj

Whoa, this is quite unexpected. My container is on 3.13.1 but the codebase served is still 3.12.

What is the workflow to keep the version up to date? How are other people doing it that run Matomo in production using Docker?

dbrgn avatar Jan 22 '20 08:01 dbrgn

My workflow atm is:

  1. update matomo using the webfrontend
  2. update the docker container to the same version

dunno how others handle this? maybe most matomo users doesn't use docker in production?

markuman avatar Jan 22 '20 08:01 markuman

I did (3.13.0 -> 3.13.1):

  1. Update docker container.
  2. Update through web interface.

And it seems to work as well.

carlosgeos avatar Feb 01 '20 12:02 carlosgeos

Yeah, but caution: this will work as long as matomo didn't change their behaviour and won't touch the volume location in a future docker image release.
And update the image is necessary, because otherwise the underlying base image won't get any persistent updates too.

markuman avatar Feb 02 '20 08:02 markuman

I am not able to upgrade from 3.13.6 to 4.x.x. Pressing check for updates in the web interface tells me that 3.13.6 is latest version (hogwash! :anger: ) I have also updated the docker container several times but still cannot get past 3.13.6. Am I missing something?

houfu avatar Dec 30 '20 14:12 houfu

See related https://github.com/matomo-org/docker/issues/281 Just experienced the same thing! Upgraded the image, restarted the container, and still on the old version, because the mounted /var/www/html/ hasn't updated at all.

There needs to be a check on start up to copy the files over or so! (without replacing important things in the state, like config.ini.php)

ghnp5 avatar Apr 14 '22 07:04 ghnp5

duplicate of https://github.com/matomo-org/docker/issues/248

J0WI avatar Nov 26 '22 15:11 J0WI