k3s/contrib/git-sync
Johan Euphrosine d67db4ecfa config/git-sync: add envvar prefix, fix README 2014-12-22 17:34:56 -08:00
..
Dockerfile config/git-sync: add envvar prefix, fix README 2014-12-22 17:34:56 -08:00
README.md config/git-sync: add envvar prefix, fix README 2014-12-22 17:34:56 -08:00
main.go config/git-sync: add envvar prefix, fix README 2014-12-22 17:34:56 -08:00

README.md

git-sync

git-sync is a command that periodically sync a git repository to a local directory.

It can be used to source a container volume with the content of a git repo.

Usage

# build the container
docker build -t git-sync .
# run the git-sync container
docker run -d -e GIT_SYNC_INTERVAL=1s -e GIT_SYNC_REPO=https://github.com/GoogleCloudPlatform/kubernetes -e GIT_SYNC_BRANCH=gh-pages -v /git-data:/git git-sync
# run a nginx container to serve sync'ed content
docker run -d -p 8080:80 -v /git-data:/usr/share/nginx/html nginx