[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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap