Open
Conversation
Member
|
Thanks, but by removing the "VOLUME" commands in the docker file we will lose the volumes for the data I guess? |
Contributor
Author
|
The persistent data volumes are controlled only by the volume definitions in the docker-compose or if you run the image by using AFAIK the VOLUME declaration in the Dockerfile does not define any persistency by itself but only in conjuction with one of the above volume declarations but also with the flaw described when using a bind-mount. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi Merijn,
this is a possible fix for #26 ...
If I understand this correctly, by using VOLUME inside the Dockerfile the data inside are reserverd inside the image as a volume and when you start the container using a volume mount the data are copied there. But when you create a bind-mount instead, it is empty when you start the containers for the first time.
In this fix I removed the creation of the volumes and only copied the needed files inside the image. The creation is now moved to the docker entrypoint, so if the files or folders are missing, they are created/copied, otherwise ignored. This way it doesn't matter what is being used as a data mount.
Best regards
Daniel