Posts

Showing posts from March, 2017

Syncing from GitLab to Docker Host Volume

Image
This week I was asked to help solve a problem encountered during a POC. The team were working with an application in a docker container which needs to read configuration data on startup. Rather than having the configuration data baked into the container, the application reads it from a docker data volume which is mapped to a directory on the host. The configuration data was copied to the host, the volumes and directories mapped and the application tested successfully. The configuration data files are maintained in a git repository, and for the first test these had just been copied to the host.  However, the team were asked if we could keep the configuration data in sync with the git repository, so we'd have something like: Not something I had done before.  However I was fairly sure that I wasn't the first. I had a quick search on dockerhub and found an image that looked useful:  https://hub.docker.com/r/openweb/git-sync/ Basically it polls a git repo