Make it easy to install git on an Action Runner Image (#3273)

(We don't actually install `git`.  We simply get the prerequisites out of the way.)
This commit is contained in:
John Wesley Walker III
2024-05-15 20:01:06 +02:00
committed by GitHub
parent 76dc3a28c0
commit 0f15173045

View File

@@ -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 \