From f52eb8f1f5b51a57d51016ce8356ac69a1cbd10e Mon Sep 17 00:00:00 2001 From: John Wesley Walker III <81404201+jww3@users.noreply.github.com> Date: Fri, 3 May 2024 17:45:45 +0200 Subject: [PATCH] Make it easy to install `git` on an Action Runner Image (We don't actually install `git`. We simply get the prerequisites out of the way.) --- images/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/images/Dockerfile b/images/Dockerfile index 2bd1a338473..97cd8118f9f 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -39,12 +39,14 @@ ENV RUNNER_MANUALLY_TRAP_SIG=1 ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1 ENV ImageOS=ubuntu22 -RUN apt-get update -y \ - && apt-get install -y --no-install-recommends \ - sudo \ - lsb-release \ +RUN apt update -y \ + && apt install -y --no-install-recommends sudo lsb-release software-properties-common \ && rm -rf /var/lib/apt/lists/* +# Configure git-core/ppa based on guidance here: https://git-scm.com/download/linux +RUN add-apt-repository ppa:git-core/ppa \ + && apt update -y + RUN adduser --disabled-password --gecos "" --uid 1001 runner \ && groupadd docker --gid 123 \ && usermod -aG sudo runner \