Skip to content

Permission issue inside my docker container GitHub Runner #62

Open
@leahy268

Description

@leahy268

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions