This project produces a set of single layer docker images containing git for common Linux distributions on amd64 and arm64.
This project primarily exists because "yum install git" installs a lot of dependencies including systemd which bloats docker images that use it.
For Amazon versions
COPY --from=truemark/git:amazonlinux-2023 /usr/local/ /usr/local/
COPY --from=truemark/git:amazonlinux-2022 /usr/local/ /usr/local/
COPY --from=truemark/git:amazonlinux-2 /usr/local/ /usr/local/
For Alpine versions
COPY --from=truemark/git:alpine-3.17 /usr/local/ /usr/local/
RUN apk add --no-cache libcurl
COPY --from=truemark/git:alpine-3.16 /usr/local/ /usr/local/
RUN apk add --no-cache libcurl
For Ubuntu versions
COPY --from=truemark/git:ubuntu-jammy /usr/local/ /usr/local/
RUN apt-get -qq update && apt-get install -qq libcurl4 && rm -rf /var/lib/apt/lists/*
COPY --from=truemark/git:ubuntu-focal /usr/local/ /usr/local/
RUN apt-get -qq update && apt-get install -qq libcurl4 && rm -rf /var/lib/apt/lists/*
For Debian versions
COPY --from=truemark/git:debian-bookworm /usr/local/ /usr/local/
RUN apt-get -qq update && apt-get install -qq libcurl4 && rm -rf /var/lib/apt/lists/*
COPY --from=truemark/git:debian-bullseye /usr/local/ /usr/local/
RUN apt-get -qq update && apt-get install -qq libcurl4 && rm -rf /var/lib/apt/lists/*
COPY --from=truemark/git:debian-buster /usr/local/ /usr/local/
RUN apt-get -qq update && apt-get install -qq libcurl4 && rm -rf /var/lib/apt/lists/*
You will need to have libcurl and an ssh client to clone from https and ssh repositories respectively.
The contents of this repository are released under the BSD 3-Clause license. See the license here.