myoung34 / docker-github-actions-runner

This will run the new self-hosted github actions runners with docker-in-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sudo No Longer working

SteveBox0 opened this issue · comments

This has been working for a long time up until roughly 15 hours ago.

sudo apt-get update

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Error: Process completed with exit code 1.

This is likely due to #223.

The runner user is in the sudo group, but we might need to modify the sudoers file to allow runner to run sudo without a password.

https://askubuntu.com/a/340669

Want to put up a PR appending

%sudo  ALL=(ALL) NOPASSWD: ALL

to /etc/sudoers in Dockerfile.base?

I have just added the below as a temporary workaround. As I already got additional logic that destroys the container on each workflow run to match up with the hosted runners.

docker exec CONTAINERNAME sh -c 'echo ''%sudo ALL=\(ALL\) NOPASSWD: ALL'' >> \/etc\/sudoers'

I have a fix on its way out here

I have a fix on its way out here

Fix appears to work on the latest images on dockerhub.

Thanks all!