Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Add option to build git from source to all definitions #783

@Chuxel

Description

@Chuxel

Currently definitions in this repository with the exception of codespaces-linux use the OS version of git. While this is enough for many people, we can also provide the option to build git from source. This can be done by default in pre-built images.

For Ubuntu, we could use a PPA source, but since we are generally focused on content provenance and this is a non-offical source, it is likely best to build from source.

#665 tracks the idea of storing pre-built git that can be reused, but not that this is OS and OS version specific so its more work than it sounds on the surface.

Largely this is just copying the git-from-src-debian.sh script into the library-scripts folder adding the following to all base.Dockerfiiles so it is done by default along with Dockerfiles in definitions w/o a pre-built image. The option comment will wire it into the selection UX for "Add Development Container Configuration Files..."

# [Option] Build and install latest git from source (this will take some time)
ARG BUILD_GIT_FROM_SOURCE=true
COPY library-scripts/git-from-src-debian.sh /tmp/scripts/
RUN if [ "${BUILD_GIT_FROM_SOURCE}" = "true" ]; then bash /tmp/scripts/git-from-src-debian.sh "latest"; fi;
    && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/git-from-src-debian.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions