k3s/contrib/git-sync/README.md

17 lines
552 B
Markdown
Raw Normal View History

2014-12-22 21:13:47 +00:00
# git-sync
git-sync is a command that pull a git repository to a local directory.
2014-12-22 21:13:47 +00:00
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
2015-02-06 01:11:44 +00:00
docker run -d GIT_SYNC_REPO=https://github.com/GoogleCloudPlatform/kubernetes GIT_SYNC_DEST=/git -e GIT_SYNC_BRANCH=gh-pages -r HEAD GIT_SYNC_DEST=/git -v /git-data:/git git-sync
2014-12-22 21:13:47 +00:00
# run a nginx container to serve sync'ed content
docker run -d -p 8080:80 -v /git-data:/usr/share/nginx/html nginx
2014-12-22 21:13:47 +00:00
```