Fix permission problem at runtime level once and for all (allow switching between webserver without any action) #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello
I was stuck with permission problem, no pre-creating the volumes or folders was working, no chmod/chown was working and I was stuck.
I compared with a dockerfile for roudcube that uses apache and sqlite and they did the image a bit differently, ie : they got the source package uncompressed in another folder (/usr/src/...) and they were using the entrypoint to copy the files in the /var/www folder then applying the permissions.
this take care of a lot of issue as the presented volume contain no data overwritten by the package
the folder are set to the correct permission before the webserver starts and after the docker started running
this apply the permission on the fly in the presented volumes allowing switching from nginx to apache without any action
changes made :
I tested the 4 dockerfile, I could swtich from any version without losing configuration or data