Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Comment on lines +42 to 44
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm combining these into a single line to aid readability. (One command per line).

The net change here is to install software-properties-common. (We still install sudo and lsb-release.)

software-properties-common is required for the new instruction on line 47, add-apt-repository


# 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 \
Expand Down