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

Permission issue inside my docker container GitHub Runner #62

Open
leahy268 opened this issue Jan 25, 2024 · 2 comments
Open

Permission issue inside my docker container GitHub Runner #62

leahy268 opened this issue Jan 25, 2024 · 2 comments

Comments

@leahy268
Copy link

I am attempting to get docker to slim down my github actions runner.

When the GitHub actions runs it runs this code:
while :;
do
cp -f "$DIR"/run-helper.sh.template "$DIR"/run-helper.sh
"$DIR"/run-helper.sh $* &
PID=$!
wait -f $PID
returnCode=$?
if [[ $returnCode -eq 2 ]]; then
echo "Restarting runner..."
else
echo "Exiting runner..."
# Unregister signal handling before exit
trap - INT TERM
# wait for last parts to be logged
wait $PID
exit $returnCode
fi
done
}
Essentially this copies run-helper.sh.template to run-helper.sh

However when I run this using slim build it fails to cp the file.

I have ran this with the option --run-target-as-user --keep-perms as the runner is running under the user 'runner'. However this doesn't change the outcome.

Any thoughts?

@iximiuz
Copy link
Collaborator

iximiuz commented Feb 6, 2024

Hi @leahy268! Thanks for the report!

Could you provide the complete slim build command that leads to that error and the actual output of the failed cp command?

@leahy268
Copy link
Author

leahy268 commented Feb 7, 2024

Hi, I'll have to go back and try again.
In the mean time I've given up and moved a different direction.

I can run the image locally without an issue and it connects to github as a runner. I can run everything I need to and it works without issue.

When running it through slimbuild I end up with an image 1/4 of the size but as the GitHub runner won't start it contains none of the things that I need in the image. In the next couple of days I'll try again and see if I can get you more details.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants