Sign inSign up

instantlinux/git-pull

By instantlinux

•Updated 5 days ago

Single-shot or continuous git-pull for cloning and updating a repo mount point across a swarm.

Helm
Image
0

10K+

instantlinux/git-pull repository overview

⁠git-pull

Git pull, plain and simple (why wasn't there already a published container to do this?) - with multi-architecture support.

⁠Usage

This provides a way to distribute administrative configuration files or other content across each instance of a cluster.

See the kubernetes.yaml / docker-compose.yml file for a simple example (add additional services to pick up content pulled by this image). A Makefile is provided to generate the deploy key as a Docker secret; after doing so, upload the new public key to your git server.

This image will continuously update a path on each Docker cluster node from contents of a particular repo; if you define an environment variable ADMIN_PATH (or Docker named volume) and place configuration files for each service in subdirectories of that repo, this is a handy way of propagating configurations (such as /etc files) across the cluster. Note that any Docker mounts must be made with ro (read-only) set to keep this container running without merge conflicts.

This repo has complete instructions for building a kubernetes cluster⁠ where you can launch with helm⁠ or kubernetes.yaml⁠ using make and customizing Makefile.vars⁠ after cloning this repo:

git clone https://github.com/instantlinux/docker-tools.git
cd docker-tools/k8s
# admin-git.yaml is a symlink to git-pull/kubernetes.yaml
make admin-git

There's less need for this tool under Kubernetes than Docker Swarm: see the ConfigMap⁠ documentation for the current recommended method for making config files available.

⁠Variables
VariableDefaultDescription
DEST.destination directory under /git
GIT_COMMITmasterbranch name or hash
GIT_HOSTgithub.comhostname of git repo (for keyscan)
GIT_REPOurirepository name
INTERVAL0polling interval, 0 for one-shot
⁠Secrets
SecretDescription
git-deploy-sshkeyprivate half of deploy keypair
⁠Contributing

If you want to make improvements to this image, see CONTRIBUTING⁠.

Tag summary

Content type

Image

Digest

sha256:1b7aa084d…

Size

14.2 MB

Last updated

3 months ago

docker pull instantlinux/git-pull