Update github-runner-deploy.md
This commit is contained in:
@@ -79,6 +79,61 @@ sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now act_runner
|
||||
```
|
||||
|
||||
### Rootless Podman Configuration for act_runner
|
||||
|
||||
#### 1. User Setup
|
||||
|
||||
The service user needs a proper home directory and shell:
|
||||
```bash
|
||||
sudo usermod -m -d /home/act_runner -s /bin/bash act_runner
|
||||
sudo mkdir -p /home/act_runner
|
||||
sudo chown act_runner:act_runner /home/act_runner
|
||||
```
|
||||
|
||||
#### 2. User Namespace Mappings
|
||||
|
||||
Required for rootless containers to map UIDs/GIDs:
|
||||
```bash
|
||||
sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 act_runner
|
||||
podman system migrate
|
||||
```
|
||||
|
||||
#### 3. Enable Linger and Podman Socket
|
||||
```bash
|
||||
sudo loginctl enable-linger act_runner
|
||||
sudo -u act_runner XDG_RUNTIME_DIR=/run/user/$(id -u act_runner) systemctl --user enable --now podman.socket
|
||||
```
|
||||
|
||||
#### 4. Configure act_runner
|
||||
|
||||
In `/etc/act_runner/config.yaml`:
|
||||
```yaml
|
||||
container:
|
||||
docker_host: unix:///run/user/<UID>/podman/podman.sock
|
||||
```
|
||||
|
||||
Replace `<UID>` with output of `id -u act_runner`.
|
||||
|
||||
#### 5. Configure Registries
|
||||
|
||||
In `/etc/containers/registries.conf`:
|
||||
```toml
|
||||
unqualified-search-registries = ["docker.io", "docker.gitea.com"]
|
||||
```
|
||||
|
||||
#### 6. systemd Unit Environment
|
||||
|
||||
Add to `/etc/systemd/system/act_runner.service` under `[Service]`:
|
||||
```ini
|
||||
Environment="XDG_RUNTIME_DIR=/run/user/%U"
|
||||
```
|
||||
|
||||
#### 7. Apply Changes
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart act_runner
|
||||
```
|
||||
|
||||
## Docker Runner
|
||||
|
||||
WIP
|
||||
Reference in New Issue
Block a user