-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(dockerfile): set more lenient permissions on /home/runner #4083
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
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 |
|---|---|---|
|
|
@@ -54,14 +54,15 @@ RUN add-apt-repository ppa:git-core/ppa \ | |
| && apt install -y git \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /home/runner | ||
|
|
||
| RUN adduser --disabled-password --gecos "" --uid 1001 runner \ | ||
| && groupadd docker --gid 123 \ | ||
| && 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 | ||
| && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers \ | ||
| && chmod 777 /home/runner | ||
|
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. @TingluoHuang @nikola-jokic This is a breaking change after upgrading the GitHub runner from 2.329.0 to 2.330.0. We are now seeing the error “failed to initialize build cache.” We need to revert back to 2.329.0. Could you please fix this so we don’t need separate handling on our side?. failed to initialize build cache at /home/runner/.cache/go-build: mkdir /home/runner/.cache/go-build: permission denied
Contributor
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. issues cloning private repositories
Contributor
Author
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. @nikola-jokic - one difference I'm seeing is in the owner uid/gid of the
I think the ownership change is due to moving |
||
|
|
||
| COPY --chown=runner:docker --from=build /actions-runner . | ||
| COPY --from=build /usr/local/lib/docker/cli-plugins/docker-buildx /usr/local/lib/docker/cli-plugins/docker-buildx | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.