{"id":21942536,"url":"https://github.com/markhilton/docker-git-clone","last_synced_at":"2025-10-14T05:21:57.917Z","repository":{"id":68163313,"uuid":"130865185","full_name":"markhilton/docker-git-clone","owner":"markhilton","description":"Docker image to clone requested github or bitbucket repository","archived":false,"fork":false,"pushed_at":"2018-04-25T00:19:17.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T18:26:01.489Z","etag":null,"topics":["bitbucket","deployment","git","github","init-containers","kubernetes","rsa-key","ssh-key"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markhilton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-24T14:15:18.000Z","updated_at":"2021-10-24T13:13:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"9886ae1a-4447-4d78-8269-1d2ed9a045ec","html_url":"https://github.com/markhilton/docker-git-clone","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/markhilton/docker-git-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhilton%2Fdocker-git-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhilton%2Fdocker-git-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhilton%2Fdocker-git-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhilton%2Fdocker-git-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markhilton","download_url":"https://codeload.github.com/markhilton/docker-git-clone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhilton%2Fdocker-git-clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018015,"owners_count":26086237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","deployment","git","github","init-containers","kubernetes","rsa-key","ssh-key"],"created_at":"2024-11-29T03:21:00.973Z","updated_at":"2025-10-14T05:21:57.882Z","avatar_url":"https://github.com/markhilton.png","language":"Shell","readme":"# docker-git-clone\n\nDocker image to clone requested github or bitbucket repository.\n\n## Use case\n\nKubernetes deployments where init containers usually copy/move code from docker container into emptyDir volume to share between other deployment containers.\n\nIn case of push to deploy instead of waiting for the Docker container to be build with a specific repository tag, use this universal container to specify deployment SSH key file authorized to clone requested repository code from specified branch or tag.\n\n## Environment variables\n\n### required\n`REPO_LINK` - github or bitbucket repository SSH clone link\n\nIt is also required to mount a volume where the repository will be cloned from local file system into container `/repository` folder.\n\nIn case of private repositories you also have to mount deployment SSH key authorized to clone code repository\n\n### optional\n`TAG` - clone specified tag\n\n`BRANCH` - clone specified branch (defaults to master)\n\n`REPO_KEY` - RSA key filename (defaults to id_rsa)\n\nif cloning using repository username/password instead SSH deployment key, please provide `REPO_LINK` without leading `https://`\n\n`REPO_USER` - authorized user to clone requested repository\n\n`REPO_PASS` - authorized user password to clone requested repository\n\n\n## Example run\n\n```\ndocker run --rm -ti \\\n    -v /path/to/clone/repository:/repository \\\n    -v /path/to/authorized/id_rsa:/key:ro \\\n    -e REPO_LINK=crunchgeek/git-clone\n    -e REPO_BRANCH=master\n    -e REPO_TAG=1.0.0\n    crunchgeek/git-clone\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhilton%2Fdocker-git-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkhilton%2Fdocker-git-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhilton%2Fdocker-git-clone/lists"}