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

Docker Image for armv7? #197

Open
malik-n opened this issue Dec 6, 2024 · 7 comments
Open

Docker Image for armv7? #197

malik-n opened this issue Dec 6, 2024 · 7 comments

Comments

@malik-n
Copy link

malik-n commented Dec 6, 2024

There were lots of difficulties in trying to package actions-runner inside a docker image for armv7.

What about this alternative? Is it doable? Has someone already done it?

@ChristopherHX
Copy link
Owner

Has someone already done it?

I didn't, all my running systems are migrated to arm64 a long time ago.

Should be just matter of extracting binary-linux-arm.tar.gz into the image of your favorite armv7 linux distribution.

Then define ACTIONS_RUNNER_INPUT_JITCONFIG with an jitconfig token from the api to run exactly one job.

@malik-n
Copy link
Author

malik-n commented Dec 13, 2024

I have the following issue.
I tried the following line in my entrypoint.sh: github-act-runner new --url ${GH_URL} --name ${name} --token ${GH_TOKEN}. Writing it like github-act-runner new --url ${GH_URL} --name ${name} --token "${GH_TOKEN}" causes the same error:

	ERROR: unknown option: BXJEX2L5AYX7XMHPXXXSBXLHXQAXX

I replaced some letters in the token to make it invalid.
So the token is perceived as option?

@ChristopherHX
Copy link
Owner

ChristopherHX commented Dec 13, 2024

In docker you should possible avoid the systemd wrapper.

I would need to check the wrapper later if it has problems, eventually is your $name unset and --token is used as name.
Always double quote the varables, to make sure this is never the case.
e.g.
--name "${name}" --token "${GH_TOKEN}"

The following should apply to the debian package as well (copy from releases page).
Did I update the --help text of the wrapper?

replace with
./config.sh github-act-runner configure
./config.sh remove github-act-runner remove
./run.sh github-act-runner run

edit removed ./ as the wrapper is globally accessible

The runner configuration is saved in / loaded from your current working directory, while using the github-act-runner command directly.

So do something like this first if your cwd is / : mkdir -p /data && cd data

@malik-n
Copy link
Author

malik-n commented Dec 13, 2024

I see so I came to this state:

running as user 'actions-runner'
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
	WARNING: Lingering is not enabled for user 'actions-runner'. Lingering is needed to make user services start at boot and to prevent them from being stopped when user logs out. Enable lingering using command 'loginctl enable-linger'.
mkdir: cannot create directory '/home/actions-runner': Permission denied

So I should not use the systemd wrapper and use the commands from the table github-act-runner configure and github-act-runner run instead?

@ChristopherHX
Copy link
Owner

So I should not use the systemd wrapper and use the commands from the table github-act-runner configure and github-act-runner run instead?

Yes, use configure and run instead.

This is also worth reading https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-just-in-time-runners with the env variable ACTIONS_RUNNER_INPUT_JITCONFIG set to the base64 token you get from rest api

@malik-n
Copy link
Author

malik-n commented Dec 19, 2024

The entrypoint.sh now looks something like this:

github-act-runner configure --url ${GH_URL} --name "${name}" --token "${GH_TOKEN}" --labels "self-hosted,Linux,$TARGETARCH"
github-act-runner run &

It calls success than disconnects and immediately reruns no matter if there is the & or not

@ChristopherHX
Copy link
Owner

The & is definetly wrong besides this and you said that you tried without &, I don't know due to the lack of more details from your side e.g. Dockerfile why you have a problem.

Bringing me to write this from scratch myself can take a while.

We could also switch this discussion to the german language.

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