A sidecar app which clones a git repo and keeps it in sync with the upstream.
Go to file
Tim Hockin 5f4837491f Overhaul Makefile and Dockerfile
Trying to standardize builds across architectures.  We wrote this basic
Makefile/Dockerfile template for another container, but it works well, so reuse
it here.
2016-09-16 08:35:22 -07:00
Godeps Scrub 'contrib' 2016-08-20 14:17:17 -07:00
demo Scrub 'contrib' 2016-08-20 14:17:17 -07:00
docs Add files from github.com/kubernetes/contrib/git-sync 2016-08-20 14:14:27 -07:00
.gitignore Overhaul Makefile and Dockerfile 2016-09-16 08:35:22 -07:00
CONTRIBUTING.md Create CONTRIBUTING.md 2016-08-22 16:18:11 -07:00
Dockerfile Overhaul Makefile and Dockerfile 2016-09-16 08:35:22 -07:00
LICENSE Initial commit 2016-08-20 14:09:57 -07:00
Makefile Overhaul Makefile and Dockerfile 2016-09-16 08:35:22 -07:00
OWNERS Add files from github.com/kubernetes/contrib/git-sync 2016-08-20 14:14:27 -07:00
README.md Scrub 'contrib' 2016-08-20 14:17:17 -07:00
code-of-conduct.md Create code-of-conduct.md 2016-08-22 16:18:58 -07:00
main.go Scrub 'contrib' 2016-08-20 14:17:17 -07:00
main_test.go Add files from github.com/kubernetes/contrib/git-sync 2016-08-20 14:14:27 -07:00
ssh-wrapper.sh Add files from github.com/kubernetes/contrib/git-sync 2016-08-20 14:14:27 -07:00

README.md

git-sync

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

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

In order to ensure that the git repository content is cloned and updated atomically, you cannot use a volume root directory as the directory for your local repository.

The local repository is created in a subdirectory of /git, with the subdirectory name specified by GIT_SYNC_DEST.

Usage

# build the container
docker build -t git-sync .
# run the git-sync container
docker run -d GIT_SYNC_REPO=https://github.com/GoogleCloudPlatform/kubernetes GIT_SYNC_DEST=/git -e GIT_SYNC_BRANCH=gh-pages -r HEAD -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 

Analytics