mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-04 09:15:33 +00:00
The runner pages had drifted from the runner. They claimed Podman is unsupported, a registration retry limit of 10, a `container.env` proxy override that has no effect, and they used the deprecated `generate-config` command, while the actual instructions were buried under implementation details. The develop and 5.x pages are rewritten from the current runner sources (`main` is `v5.2.0`). They are shorter and aimed at operators, with a new page covering what jobs get. The reference generator now documents the `config` command, and the quickstart pages in every language use the `gitea-runner` binary name. Reviewed-on: https://gitea.com/gitea/docs/pulls/600 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: silverwind <[email protected]>
43 lines
1.7 KiB
Markdown
43 lines
1.7 KiB
Markdown
---
|
|
sidebar_position: 7
|
|
---
|
|
|
|
# Proxies
|
|
|
|
Set proxy variables in the runner's environment. Use `Environment=` in a systemd unit, `docker run -e`, or `env:` in Kubernetes:
|
|
|
|
```sh
|
|
http_proxy=http://proxy.example:3128
|
|
https_proxy=http://proxy.example:3128
|
|
no_proxy=gitea.internal,.example.local
|
|
```
|
|
|
|
The runner uses these variables for its own requests. It passes them to every job and service container in lowercase and uppercase. Dockerfile actions receive them as build arguments.
|
|
|
|
The runner adds the following to `no_proxy` so jobs reach them directly:
|
|
|
|
- The runner's cache server
|
|
- `localhost`, `127.0.0.1` and `::1`
|
|
- The job's service containers
|
|
- The Docker daemon, when reached over `tcp://`
|
|
|
|
Add Gitea to `no_proxy` if jobs should reach it directly. The runner does not add it automatically.
|
|
|
|
## Changing the proxy for jobs
|
|
|
|
| Scope | Where to set it |
|
|
| --- | --- |
|
|
| One step | Set the step's `env:`. |
|
|
| The rest of a job | Write lowercase and uppercase variable names to `$GITHUB_ENV`. |
|
|
| Every job | Set `runner.envs`. Values in `no_proxy` are added to the list above. |
|
|
|
|
Proxy values set at the workflow or job level, or in `container.env`, cannot replace the runner's proxy values.
|
|
|
|
## Docker daemon
|
|
|
|
The Docker daemon pulls images and needs its own proxy settings. See [the Docker documentation](https://docs.docker.com/engine/daemon/proxy/). The Docker daemon bundled with the `dind` images reads the runner's proxy variables. The runner warns at startup if it has a proxy but the Docker daemon does not.
|
|
|
|
## Credentials
|
|
|
|
The runner masks passwords in proxy URLs in job logs, but every step can read them from its environment. Prefer a proxy that authenticates by source address.
|