Skip to content

Conversation

@itzonban
Copy link
Contributor

@itzonban itzonban commented Jul 8, 2025

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

@mschering
Copy link
Member

Thanks, but by removing the "VOLUME" commands in the docker file we will lose the volumes for the data I guess?

@itzonban
Copy link
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 -v.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants