-
Notifications
You must be signed in to change notification settings - Fork 997
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
Change runner image to make user/folder align with ubuntu-latest hosted runner. #2469
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,26 @@ RUN export DOCKER_ARCH=x86_64 \ | |
|
||
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0 | ||
|
||
ENV RUNNER_ALLOW_RUNASROOT=1 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV RUNNER_MANUALLY_TRAP_SIG=1 | ||
ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1 | ||
|
||
WORKDIR /actions-runner | ||
COPY --from=build /actions-runner . | ||
RUN apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
sudo \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN adduser --disabled-password --gecos "" --uid 1001 runner \ | ||
&& groupadd docker --gid 123 \ | ||
Comment on lines
+36
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to extract those as ARGs? Is there ever a scenario where we'll want to change those at build time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will change it to ARG once we need to. 😄 |
||
&& usermod -aG sudo runner \ | ||
&& usermod -aG docker runner \ | ||
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \ | ||
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers | ||
|
||
WORKDIR /home/runner | ||
|
||
COPY --chown=runner:docker --from=build /actions-runner . | ||
|
||
RUN install -o root -g root -m 755 docker/* /usr/bin/ && rm -rf docker | ||
|
||
RUN install -o root -g root -m 755 docker/* /usr/bin/ && rm -rf docker | ||
USER runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking out loud here, do we have a need for the
ca-certificates
package to be installed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add git as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the dotnet base image we use already installed
ca-certificates
https://github.com/dotnet/dotnet-docker/blob/main/src/runtime-deps/6.0/bullseye-slim/amd64/Dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will avoid
git
for now, since that will require us to patch the image every timegit
has a security patch.