Current dockerfile contains:
|
# WORKDIR is /var/www/html (inherited via "FROM php") |
|
# "/entrypoint.sh" will populate it at container startup from /usr/src/matomo |
|
VOLUME /var/www/html |
On docker run this creates anonymous volumes that are not clearly visible.
What is problematic is that the entrypoint script checks whether anything is already on that hidden volume:
|
if [ ! -e matomo.php ]; then |
And if not, then extracts the sourcecode:
|
tar cf - --one-file-system -C /usr/src/matomo . | tar xf - |
Besides the fact that this extraction is additive (i.e. not a sync) and can leave old files lingering there, the even more problematic issue is that if one upgrades the Matomo image version in the deployment dockerfile the new container may or may not (depending on how it is run) reuse the hidden volume and not update Matomo. Hence you may expect to see Matomo v5 based on the new image, but you see your old v4 still at runtime.
If someone wants to use a volume, this should be specified in docker run or in the compose file like here:
Hence I believe VOLUME should be a runtime option, not a hidden side-effect of the baseline image.
Current
dockerfilecontains:docker/apache/Dockerfile
Lines 96 to 98 in adb618a
On
docker runthis creates anonymous volumes that are not clearly visible.What is problematic is that the entrypoint script checks whether anything is already on that hidden volume:
docker/apache/docker-entrypoint.sh
Line 33 in adb618a
And if not, then extracts the sourcecode:
docker/apache/docker-entrypoint.sh
Line 55 in adb618a
Besides the fact that this extraction is additive (i.e. not a sync) and can leave old files lingering there, the even more problematic issue is that if one upgrades the Matomo image version in the deployment
dockerfilethe new container may or may not (depending on how it is run) reuse the hidden volume and not update Matomo. Hence you may expect to see Matomo v5 based on the new image, but you see your old v4 still at runtime.If someone wants to use a volume, this should be specified in
docker runor in the compose file like here:docker/.examples/apache/compose.yml
Line 24 in adb618a
Hence I believe VOLUME should be a runtime option, not a hidden side-effect of the baseline image.