Skip to content

Docker container for shallow cloning private repository

License

Notifications You must be signed in to change notification settings

emblica/git-cloner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-cloner

Docker container for shallow cloning private repository

Use it as Docker container or deploy into Kubernetes as initContainer

Usage

# Pull the image
docker pull emblica/git-cloner
# Run it
docker run -it --rm -e REPOSITORY_URL=git@github.com:emblica/git-cloner.git -e SSH_PRIVATE_KEY="$(cat ~/.ssh/deploy-key)" -v $(pwd)/git:/mnt/git emblica/git-cloner

Usage with Kubernetes

# Create secret from private key:
kubectl create secret generic git-repo --from-file=deploy-key

# Apply pod:
kubectl apply -f k8s/example.yml

Build

docker build -t git-cloner .

About

Docker container for shallow cloning private repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published