Skip to content

Fix for #26#29

Open
itzonban wants to merge 3 commits into
Intermesh:masterfrom
itzonban:fix-#26
Open

Fix for #26#29
itzonban wants to merge 3 commits into
Intermesh:masterfrom
itzonban:fix-#26

Conversation

@itzonban

@itzonban itzonban commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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.

@itzonban

Copy link
Copy Markdown
Contributor Author

Hi Merijn,

I found some time to retest a bit and I re-added the VOLUME directive. The main solution (for me) really are the checks in the docker-go-entrypoint.sh. In my tests I was now able to start/install GO:

  • without any changes
  • changing the volumes in the compose.yaml to bind mount volumes
  • disabling all volumes in the compose.yaml so it just uses the VOLUME directive from the Dockerfile

Does this work on your end, too?

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