matomo-org / matomo-org/docker
Remove explicit VOLUME creation in dockerfile
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1k
- Forks
- 384
- PR merge metrics
- No merged PRs in 30d
Description
Current `dockerfile` contains:
https://github.com/matomo-org/docker/blob/adb618afe1527cfed9655983fe79a6275b65ad1b/apache/Dockerfile#L96-L98
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:
https://github.com/matomo-org/docker/blob/adb618afe1527cfed9655983fe79a6275b65ad1b/apache/docker-entrypoint.sh#L33
And if not, then extracts the sourcecode:
https://github.com/matomo-org/docker/blob/adb618afe1527cfed9655983fe79a6275b65ad1b/apache/docker-entrypoint.sh#L55
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:
https://github.com/matomo-org/docker/blob/adb618afe1527cfed9655983fe79a6275b65ad1b/.examples/apache/compose.yml#L24
Hence I believe VOLUME should be a runtime option, not a hidden side-effect of the baseline image.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apache/Dockerfile lines 96-98 and compare the runtime behavior with apache/docker-entrypoint.sh lines 33 and 55. Review the .examples/apache/compose.yml volume configuration, then verify that the baseline image no longer creates an implicit volume and that explicit volume use remains available through runtime configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100