-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Docker Config Volume #1891
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks @Genei180! 🎉
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
I am currently Working on a Update, to make it Possible to Include the Config via the -v Option. The Config.json needs to be moved into its own Directory for that, in my Understanding. |
…into docker-config
…into docker-config
Well as is it turns out the Problem i was trying to avoid cant be solved with the Current State of Docker. It would have been Possible if some sort of Shell would be Installed in the Container, that would have allowed copying of the Config File into the Mounted Folder on Runtime. Instead, a Pre-written Config File now needs to be Copied into the Mounted Folder. Nonetheless Option 1), this should now allow for easy and persisting Configuration that is Compatible with Docker Compose, not like the Previous Option 3) Chosen. |
What's Up with the What Purpose does it have? |
Hi,it seems that I can't use "volumes: - /path/config:/config" in docker-compose file. |
Summary
There were three Possible Choices to Implement a Mount for a Config File in Docker:
docker run -v:
You could specify a Volume at the Start of a Container, but it has the Problem that the Folder on the Container, gets overwritten by the Host. So the Config File would have needed to be Included Explicitly. Additional, it would have needed to be separated from the Other files, because they would have been deleted otherwise in the Process of mounting.
Docker Volume:
Instead of creating it at runtime, it could be created beforehand, which would solve the Above Issue and would Allow for Sharing of Files from the Container with the Host. But this would complicate the Setup needed even further. Therefore, three was chosen.
Dockerfile Volume:
As the focalboard Database already gets its own Volume Created in the Dockerfile to persist, I added a Volume Creation for the Config File as well in the Dockerfile. This requires less Setup, while still allowing for Easy Access of the Config File.
The Config File Source on the Host System can be found via the following Command:
docker inspect *Container Name* | grep -B 1 "/opt/focalboard" | grep "Source"
Be Aware that with a WSL 2 Docker Setup under Windows, the Folder Location differs from the one displayed.
(Note: The Container needs to be Restarted for the Updates to take Place)
Ticket Link
Provides Solution too #1889