fix: fetch rootless Docker scripts on Arch Linux
Arch Linux's docker package does not ship the rootless setup scripts (dockerd-rootless-setuptool.sh, dockerd-rootless.sh) or rootlesskit, unlike Debian's docker-ce-rootless-extras. The role now fetches them from moby/moby contrib/ at a pinned ref and installs rootlesskit explicitly. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
48503611a9
commit
f8ae28601d
@@ -53,7 +53,7 @@ main.yml → systemd_check → user_setup → rootless_docker → install_runner
|
||||
| `main.yml` | Entry point — includes all other task files in order |
|
||||
| `systemd_check.yml` | Verifies systemd is available on the target host |
|
||||
| `user_setup.yml` | Creates the per-runner system user, enables lingering, configures subuid/subgid, creates data and config directories |
|
||||
| `rootless_docker.yml` | Installs Docker packages (apt for Debian/Ubuntu, pacman for Arch), runs `dockerd-rootless-setuptool.sh install`, starts and enables the rootless Docker daemon |
|
||||
| `rootless_docker.yml` | Installs Docker packages (apt for Debian/Ubuntu, pacman for Arch), provisions the rootless setup scripts on Arch (not shipped by the `docker` package), runs `dockerd-rootless-setuptool.sh install`, starts and enables the rootless Docker daemon |
|
||||
| `install_runner.yml` | Downloads the gitea_runner binary, creates the config file, validates the binary, registers the runner with Gitea, creates and starts the systemd user service |
|
||||
| `download_gitea_runner.yml` | Downloads the gitea_runner binary from GitHub releases |
|
||||
| `validate.yml` | Validates the downloaded binary |
|
||||
@@ -190,6 +190,13 @@ per-workaround DNS hacks.
|
||||
|
||||
Containers launched by the runner never have root access to the host. The rootless Docker daemon is started as a systemd user service and persists via lingering.
|
||||
|
||||
#### Platform-specific rootless provisioning
|
||||
|
||||
The rootless setup scripts (`dockerd-rootless-setuptool.sh` and `dockerd-rootless.sh`) are provided differently per OS:
|
||||
|
||||
- **Debian/Ubuntu** — shipped by the `docker-ce-rootless-extras` package (installed via the Docker APT repo).
|
||||
- **Arch Linux** — the `docker` package does **not** include these scripts, and no official Arch package provides them. The role fetches them from the upstream `moby/moby` `contrib/` directory at a pinned, overridable git ref (`gitea_runner_rootless_scripts_ref`, default `v28.5.1`) and installs them into `/usr/bin` — co-located with `docker`/`dockerd`/`rootlesskit`, which is required because `dockerd-rootless-setuptool.sh` derives its `BIN` directory from its own location and expects those binaries alongside it. The `rootlesskit` package (a required rootless runtime dependency that is not pulled in by Arch's `docker` package) is also installed explicitly.
|
||||
|
||||
### Secret handling
|
||||
|
||||
Registration tokens and admin API tokens are never exposed on the command line. The `RunnerManager._extra_vars_file()` context manager:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -105,6 +105,8 @@ grm remove prod-runner --force
|
||||
|
||||
GRM supports Arch Linux (rolling), Ubuntu 22.04/24.04, and Debian 12. All supported OSes are tested in CI via Molecule scenarios on every PR that changes Ansible files.
|
||||
|
||||
On Arch Linux, the rootless Docker setup scripts (`dockerd-rootless-setuptool.sh`, `dockerd-rootless.sh`) and the `rootlesskit` runtime are provisioned automatically — Arch's `docker` package does not ship them. No extra setup is required.
|
||||
|
||||
## How to change the UI language
|
||||
|
||||
Set the `GRM_LANG` environment variable to one of the supported languages: `en` (English, default), `bg` (Bulgarian), `de` (German), `ru` (Russian), `zh` (Chinese), `pl` (Polish).
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
|
||||
## Installation Issues
|
||||
|
||||
### `No such file or directory: dockerd-rootless-setuptool.sh` (Arch Linux)
|
||||
|
||||
**Symptom:** `grm install` fails on an Arch Linux host during rootless Docker setup with `Error executing command: [Errno 2] No such file or directory: b'dockerd-rootless-setuptool.sh'`.
|
||||
|
||||
**Cause:** Arch's `docker` package does not ship the rootless setup scripts (unlike Debian/Ubuntu's `docker-ce-rootless-extras`), and `rootlesskit` is not a dependency of the `docker` package.
|
||||
|
||||
**Solution:** This is handled automatically by GRM ≥ v0.19.0. Ensure you are on the latest release (`git checkout $(git describe --tags --abbrev=0)`). The role fetches the scripts from upstream `moby/moby` and installs `rootlesskit` automatically. If it still fails, verify the host can reach `raw.githubusercontent.com` (the script source) and check the Ansible log under `~/.local/state/grm/logs/`.
|
||||
|
||||
### Ansible connection fails (UNREACHABLE)
|
||||
|
||||
**Symptom:** Ansible reports `UNREACHABLE` when trying to connect to the target host.
|
||||
@@ -179,6 +187,7 @@ If Docker is not installed, install it via your package manager or [Docker's off
|
||||
| Symptom | Likely Cause | Solution |
|
||||
|---------|-------------|----------|
|
||||
| Ansible UNREACHABLE | SSH connection failed | Verify `--user`, `--key`, and host reachability |
|
||||
| `No such file ... dockerd-rootless-setuptool.sh` (Arch) | Arch `docker` pkg lacks rootless scripts + `rootlesskit` | Fixed in v0.19.0; update GRM to latest release |
|
||||
| `GITEA_URL must be set` | Missing environment variable | Set `GITEA_URL` in `.env` or pass `--url` |
|
||||
| `GITEA_REGISTRATION_TOKEN must be set` | Missing environment variable | Set `GITEA_REGISTRATION_TOKEN` in `.env` or pass `--token` |
|
||||
| Runner appears offline | Registration failed or service not running | Check GITEA_URL, token validity, and service status |
|
||||
|
||||
Reference in New Issue
Block a user