[Docker] Install Git on Alpine Linux

If you want to install Git the distributed Version Control System on Alpine Linux as a Docker Container, then you should choose the official alpine/git image from Docker Hub.

Docker Hub: https://hub.docker.com/r/alpine/git

Git Repo: https://github.com/alpine-docker/git

docker pull alpine/git

% docker pull alpine/git
Using default tag: latest
latest: Pulling from alpine/git
9b18e9b68314: Already exists 
f73995dadbe1: Pull complete 
fe98fba3ad13: Pull complete 
Digest: sha256:7b9c96bea8268579e925b17170ae208788e90d508ec334421384913ba61cd610
Status: Downloaded newer image for alpine/git:latest
Usage Example:
% docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git clone https://github.com/alpine-docker/git.git
Installing Alpine Git Docker

Have Questions? Post them here!
Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.