{"id":21702637,"url":"https://github.com/alpine-docker/git","last_synced_at":"2025-04-03T21:13:13.485Z","repository":{"id":5258319,"uuid":"49933001","full_name":"alpine-docker/git","owner":"alpine-docker","description":"A useful simple git container running in alpine linux, especially for tiny linux distro, such as RancherOS, which don't have package manager.","archived":false,"fork":false,"pushed_at":"2024-10-03T05:06:37.000Z","size":55,"stargazers_count":160,"open_issues_count":3,"forks_count":89,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T20:13:55.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpine-docker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["ozbillwang"],"custom":["https://www.buymeacoffee.com/ozbillwang","https://github.com/sponsors/ozbillwang"]}},"created_at":"2016-01-19T06:55:15.000Z","updated_at":"2025-03-27T08:43:38.000Z","dependencies_parsed_at":"2023-11-17T00:08:53.824Z","dependency_job_id":"fa3c06d4-50ae-4613-a211-9ce04963219c","html_url":"https://github.com/alpine-docker/git","commit_stats":{"total_commits":71,"total_committers":18,"mean_commits":"3.9444444444444446","dds":0.6901408450704225,"last_synced_commit":"fcba8e9b5f7aa0b867f237c33dd53d901d0fe1b3"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpine-docker%2Fgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpine-docker%2Fgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpine-docker%2Fgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpine-docker%2Fgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpine-docker","download_url":"https://codeload.github.com/alpine-docker/git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247078862,"owners_count":20879952,"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","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":[],"created_at":"2024-11-25T21:17:01.886Z","updated_at":"2025-04-03T21:13:13.467Z","avatar_url":"https://github.com/alpine-docker.png","language":"Shell","funding_links":["https://github.com/sponsors/ozbillwang","https://www.buymeacoffee.com/ozbillwang"],"categories":["置顶"],"sub_categories":["2、智能开发与部署"],"readme":"### docker-git-alpine\n\n[If enjoy, please consider buying me a coffee.](https://www.buymeacoffee.com/ozbillwang)\n\nA useful simple git container running in alpine Linux, especially for tiny Linux distro, such as RancherOS, which doesn't have a package manager.\n\n[![DockerHub Badge](http://dockeri.co/image/alpine/git)](https://hub.docker.com/r/alpine/git/)\n\n### notes about new github action pipeline\n\nFrom 3rd Oct 2024, the automation build and deploy pipeline has been switched from Circle CI to Github Action (#68 and #70)\n\n### notes about multi-arch images\n\nThis feature was added on 23th May 2021.\n\n1. Version v2.30.2 and 1.0.30 are manually pushed by me with multi-arch image supported\n2. Older version will be not updated as multi-arch images\n3. Newer vesions from now on will be multi-arch images (`--platform linux/amd64,linux/arm/v7,linux/arm64/v8,linux/arm/v6,linux/ppc64le,linux/s390x,linux/386`)\n4. I don't support other architectures, except `amd64`, because I have no other environment to do that. If you have any issues with other arch, you need raise PR to fix it.\n5. There would be no difference for `docker pull` , `docker run` command with other arch, you can run it as normal. For example, if you need pull image from arm (such as new Mac M1 chip), you can run `docker pull alpine/git:v2.30.2` to get the image directly.\n\n### Github Repo\n\nhttps://github.com/alpine-docker/git\n\n### CI build logs\n\nhttps://github.com/alpine-docker/git/actions\n\n### Docker image tags\n\nhttps://hub.docker.com/r/alpine/git/tags/\n\n### Usage\n\n    docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git \u003cgit_command\u003e\n\nFor example, if you need clone this repository, you can run\n\n    docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git clone https://github.com/alpine-docker/git.git\n    \n### Optional usage 1:\n\nTo save your type, add this fuction to `~/.bashrc` or `~/.profile`\n    \n    $ cat ~/.profile\n    \n    ...\n    \n    function git () {\n        (docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git \"$@\")\n    }\n    \n    ...\n    \n    $ source ~/.profile\n\nfor example, if you need clone this repository, with the function you just set, you can run it as local command\n\n    git clone https://github.com/alpine-docker/git.git\n\n### Optional usage 2:\n\n    alias git=\"docker run -ti --rm -v $(pwd):/git -v $HOME/.ssh:/root/.ssh alpine/git\"\n    \n#### NOTES:\n\n- You need redefine (re-run) the alias, when you switch between different repositories\n- You need run above alias command only under git repository's root directory.\n\n### Optional usage 3:\n\n    alias git='docker run -ti --rm -u$(id -u):$(id -g) -e HOME=${HOME} -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group -v ${HOME}:${HOME} -v $(pwd):/git alpine/git'\n\n### NOTES:\n\n- set uid:gid and provide passwd and group from host\n- run git as the current user instead of root for proper ownership of files\n- can be used at any directory as evaluation of $(pwd) is defered until alias is used\n\n## Demo\n\n    $ cd application\n    $ alias git=\"docker run -ti --rm -v $(pwd):/git -v $HOME/.ssh:/root/.ssh alpine/git\"\n    $ git clone git@github.com:YOUR_ACCOUNT/YOUR_REPO.git\n    $ cd YOUR_REPO\n    $ alias git=\"docker run -ti --rm -v $(pwd):/git -v $HOME/.ssh:/root/.ssh alpine/git\"\n    # edit several files\n    $ git add . \n    $ git status\n    $ git commit -m \"test\"\n    $ git push -u origin master\n    \n### The Protocols\n\nSupports git, http/https and ssh protocols.\n\nRefer:\n[Git on the Server - The Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols)\n\n### Automation builds\n\nSet CI to run builds per week\n\n- build latest alpine image with multi-arch supported\n- Get the git version from the image\n- use the git's version as image tag as well (`v${GIT_VERSION}`)\n- update `latest` tag for this image\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpine-docker%2Fgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpine-docker%2Fgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpine-docker%2Fgit/lists"}