Docker & Network
Network topology#
Four network layers exist at runtime:
| Network | Scope | Containers | Purpose |
|---|---|---|---|
| glci-net-{pipelineID} | Per pipeline | glci-mock, glci-runner, glci-runner-<project> (if any) | Runners poll mock for jobs via Docker DNS (glci-mock:39741) |
| Per-build network | Per job | Job container, service sidecars | Service DNS aliases (postgres, redis, etc.) |
| glci-net-{pipelineID}-job-{jobID} | Per DinD job | DinD job, docker:dind, glci-mock (attached) | Isolates DinD docker alias; gives DinD access to the embedded registry |
glci-bus (glci-bus-{pid} when GLCI_HOME is set; glci-bus[-{pid}]-{runnerName} on a named runner’s own daemon) | Per daemon, outlives pipelines | glci-mock, runner containers, a relay proxy on a remote daemon | Runner↔mock traffic that survives pipeline teardown; its gateway is the address job containers map glci-mock to on most daemons. Its subnet is a /24 of bus_subnet |
glci doctor’s job-network check adds another, transient one: glci-net-probe-{random}, holding only the probe’s client container — plus, when it tests a network gateway, a second empty one (glci-net-probe-{random}-gw) whose gateway the client must reach, the way a job reaches glci’s bus network. That second network takes its subnet from bus_subnet like the bus network, so a route or firewall rule that treats the range differently shows up on the row. Its responder deliberately stays off those networks — it sits on the default bridge with a published host port, so the client has to reach it the way a job reaches the mock server, through the host rather than through Docker DNS. All of them are removed when the check finishes, and glci system prune collects them if it was killed first.
How each component reaches the mock server:
- Runners → Docker DNS on the pipeline network (
glci-mock:39741). The sharedglci-runnerholds N[[runners]]blocks from aconfig_template— each polls independently with its own HMAC-derived token. Per-project runners (glci-runner-<project>) are separate containers on the same network. - Job containers →
extra_hostsmappingglci-mockto an address of the Docker host, then the published host port (default39741). A job lands on a network gitlab-runner created (FF_NETWORK_PER_BUILD), which glci never sees, so the address must be reachable from any bridge — and from inside adocker:dindservice, which runs adocker0bridge of its own. glci picks it per daemon when a pipeline starts (see[network] host_gateway): on Docker Desktop’s WSL2 backend it is Docker’shost-gatewaysentinel, passed to--add-hostverbatim so the daemon resolves it per container; on every other daemon (native Linux, macOS Docker Desktop, colima, Podman, Windows) it is the gateway address of glci’s persistent bus network (glci-bus*), which is host-local there - DinD daemons →
glci-mockis attached to the per-job DinD network, configured viainsecure-registriesindaemon.json - Daemon →
docker exec -iwith muxproto binary framing over stdin/stdout (works with local and remote Docker) - Remote runner jobs → an
extra_hostsentry decided for that daemon by the same rule, pointing at its host, where the mock port is published — by a relay proxy container when that daemon is on a different machine, which forwards requests back to the daemon viadocker execmuxproto (see Per-runner Docker host below). The runner container itself carries the sameextra_hostsentry, so it reaches the mock the same way its jobs do. A pinnedhost_gatewayIP is not carried onto a runner with its own Docker endpoint — it describes the machine glci runs on — so"auto"applies there;host_gateway = "host-gateway"does carry over
Docker host configuration#
The endpoint can come from the config file or from the environment. [docker] host wins; an exported DOCKER_HOST (or CONTAINER_CONNECTION/CONTAINER_HOST under Podman) outranks the active docker context, matching the engines’ own precedence:
DOCKER_HOST=tcp://remote-host:2375 glci run # per shell, no config changes
The daemon resolves one endpoint at startup and is shared by every project, so switching later requires glci daemon stop. See Endpoint resolution order for the full table and Endpoint changes and the shared daemon for what glci reports when they disagree.
To set it persistently, configure the Docker daemon endpoint in ~/.glci/config.toml:
# ~/.glci/config.toml
[docker]
host = "tcp://remote-host:2375" # or "ssh://remote-host"
container_socket = "/var/run/docker.sock"
privileged = true # default; set false to disable --privileged
Global config only:
engine,host,container_socket, andprivilegedare honored only in~/.glci/config.toml. A project.glciconfig.tomlthat sets them has them dropped, with a warning naming each ignored key — a project file travels with the repository, so honoring it would let a cloned repo redirect glci to a container daemon it chose, or re-grant a privilege you turned off.privilegedis included because it applies to the runner container, the one glci mounts the engine socket into. See Config files > Container-endpoint keys.
Supported schemes for host:
unix:///var/run/docker.sock– local Docker socket (default)tcp://remote-host:2375– TCP connection to a remote Docker daemonssh://remote-host– SSH tunnel to a remote Docker daemonfd://– systemd socket activation (rare)
The container_socket setting controls the Docker socket path mounted inside runner containers. This is auto-detected by default. Manual configuration is only needed when the Docker daemon uses a non-standard socket path.
For named runners targeting Windows Docker daemons, glci auto-detects the daemon’s OS type via docker info and uses the correct socket path (//./pipe/docker_engine) automatically. If auto-detection fails (e.g. restricted docker info access), it falls back to /var/run/docker.sock (Linux default). Use container_socket on the named runner config to override. See Named Runners for details.
Set privileged = false in ~/.glci/config.toml to disable the --privileged flag on runner containers. This may be required on some security-hardened systems, but will break Docker-in-Docker pipelines. It is global-only: a project .glciconfig.toml cannot set it, and therefore cannot turn your privileged = false back on.
Podman#
Set engine = "podman" in [docker] to back the default daemon with Podman instead of Docker. This is orthogonal to [defaults] executor, which stays "docker" — gitlab-runner has no Podman executor, so glci points it at Podman’s Docker-compatible API socket (mounted into the runner container at the usual /var/run/docker.sock). Auto-fallback happens only when engine is unset (omitted): glci tries Docker first and falls back to Podman if only Podman is reachable. An explicit value is always honored — engine = "podman" never falls back to Docker, and engine = "docker" opts out of the Podman fallback.
# ~/.glci/config.toml
[docker]
engine = "podman"
Podman needs a running API socket (podman system service):
- Rootless:
systemctl --user enable --now podman.socket— socket at$XDG_RUNTIME_DIR/podman/podman.sock - Rootful:
sudo systemctl enable --now podman.socket— socket at/run/podman/podman.sock - macOS / Windows:
podman machine start
On macOS and Windows Podman runs inside a VM, and the default connection is an ssh:// endpoint. glci resolves it from podman system connection list and exports both CONTAINER_HOST (the URI) and CONTAINER_SSHKEY (the connection’s SSH identity) — the identity is required because CONTAINER_HOST overrides the named connection, so without it every subsequent podman call against a healthy machine fails as “not reachable”.
The socket mounted into containers is the path the machine connection itself reports (the ssh:// URI’s path), because that is the path on the side the containers actually run on. A default podman machine is rootless inside the VM, so that is /run/user/<uid>/podman/podman.sock; the rootful /run/podman/podman.sock is only used as a fallback and applies to podman machine init --rootful.
All five images that glci pulls for its own infrastructure — its sidecar, the runner container, the runner helper, the utility image and the QEMU binfmt helper — are fully qualified, docker.io/-prefixed where they live on Docker Hub. See The images glci pulls for itself, which is also where you retarget them at a mirror; qualifying them is what makes [images] registry a uniform “swap the host, keep the path” rewrite. Podman ships short-name-mode = "enforcing" in registries.conf, which cannot resolve a bare gitlab/gitlab-runner without a terminal to prompt on and would otherwise fail the run with short-name resolution enforced but cannot prompt without a TTY. Docker treats the prefix as equivalent, so this is engine-agnostic. Images in your .gitlab-ci.yml are passed through verbatim and resolved by Podman’s Docker-compatible API, which applies the usual Docker Hub default.
glci also needs two Podman namespace defaults, both of which a normal installation already has. If containers.conf overrides them (as podman-in-podman images such as quay.io/podman/stable do), pipelines fail:
netnsmust not behost. glci wires the mock, registry and runner together over per-pipeline networks and resolves them by container name. Undernetns="host"every container is host-networked andpodman network connectfails withError: "" is not supported: invalid network mode.utsnsmust not behost. gitlab-runner sets a hostname on each job container, which Podman rejects withcannot set hostname when running in the host UTS namespace.
For remote or named Podman endpoints, [docker] host and the per-runner docker_host/docker_context keys also accept Podman sockets and connection names. Internally, glci uses one of two mutually exclusive paths per endpoint:
- Raw endpoint (
docker_host,[docker] host) — sets the engine’s endpoint environment variable:DOCKER_HOSTfor Docker,CONTAINER_HOSTfor Podman. - Named context/connection (
docker_context) — passes a flag instead:docker --context <name>for Docker,podman --connection <name>for Podman.
Both paths first strip DOCKER_HOST, CONTAINER_HOST, DOCKER_CERT_PATH, and DOCKER_TLS_VERIFY from the command environment. This matters most for the flag path: both engines give the endpoint environment variable precedence over the flag, so an inherited DOCKER_HOST/CONTAINER_HOST would silently redirect a context-based runner to the wrong daemon. With the variables removed, the flag is authoritative.
Per-runner Docker host#
Named runners can override the Docker daemon individually with docker_host (endpoint URL) or docker_context (Docker context name) in [runners.<name>] of ~/.glci/config.toml. Like the [docker] endpoint keys, the per-runner engine, docker_host, docker_context, container_socket, tls_cert_path, and tls_verify keys are global config only — a project .glciconfig.toml that sets them has them dropped with a warning (see Config files > Container-endpoint keys). A per-runner engine = "podman" selects Podman for that runner; because the default daemon is process-global, it is only meaningful alongside a distinct docker_host/docker_context pointing at the Podman endpoint. For tcp:// endpoints requiring TLS, configure tls_cert_path and tls_verify per runner. See Named Runners for configuration details.
tls_cert_path/tls_verify are Docker-only: they map to DOCKER_CERT_PATH/DOCKER_TLS_VERIFY, which Podman does not honor. A tcp:// endpoint on a runner with engine = "podman" therefore carries no TLS even with both keys set, and glci config --network warns about it. Use an ssh:// endpoint instead — Podman’s only authenticated and encrypted remote transport. A podman system connection referenced via docker_context is only as secure as its own URI; a connection pointing at tcp:// is still unencrypted and unauthenticated.
When a named runner targets a daemon on a different machine (not localhost or a unix socket), the network topology changes significantly — the runner and its job containers live on a separate Docker host that can’t directly reach the mock server:
Key differences for remote runners:
- Dedicated bus network: Each remote runner gets its own bus network (
glci-bus-{runnerName}, orglci-bus-{pid}-{runnerName}whenGLCI_HOMEis set, where{pid}is the daemon’s) on the remote daemon, since it can’t join the local one. It takes its subnet frombus_subnetlike the local bus network, checked against that daemon’s own networks - Relay proxy container: When the remote daemon is on a different machine, a
glci-proxy-*container is deployed there, joined to the bus network with theglci-mockalias and publishing the mock port on that host. The runner and its job containers reach it through theirextra_hostsentry forglci-mock(which/etc/hostsgives precedence over Docker DNS) - Muxproto relay: The relay serializes runner HTTP requests as binary frames over
docker execstdin/stdout back to the daemon, which forwards them to the real mock server. A frame carries at most 1 GB, so a larger request is rejected with413(and a larger response with502) rather than truncated - No direct connectivity needed: The remote host doesn’t need TCP access back to the daemon machine — everything flows through Docker’s exec transport
Docker-in-Docker#
For CI pipelines that use Docker-in-Docker services (docker:dind), glci automatically:
- Mounts the Docker socket for DinD service containers
- Injects a
buildkitd.tomlmarking the mock registry as insecure (HTTP) - Fixes wrong-architecture buildx plugins (e.g. CI downloads amd64 binary but container is arm64)
- Registers QEMU binfmt handlers for cross-platform builds
- Configures every pipeline’s DinD as a pull-through mirror of the embedded registry
- Wraps
docker buildx createto inject--config(registry trust) and--driver-opt network=(pipeline DNS). The wrapper replaces thedockerbinary where the job’s user can write, and otherwise goes onPATH— see How the wrapper is installed - Waits for DinD’s TLS certificates, but only in jobs that declare a DinD service, so a global
DOCKER_TLS_CERTDIRdoes not cost every other job 30 seconds
Under Podman, rootful DinD works (privileged defaults to true). Rootless Podman DinD is best-effort and unsupported — nested privileged containers are unreliable in a rootless environment, so use a rootful Podman socket for DinD pipelines.
Build layer cache#
glci does not inject BuildKit cache flags automatically. Use --cache-from / --cache-to in your .gitlab-ci.yml as you would on GitLab CI. Since the embedded registry persists across runs, type=registry cache references work without extra setup.
Network configuration#
Fine-tune how containers reach the mock server, registry, and host services:
# ~/.glci/config.toml — the whole [network] section is honored in this file
# only; a project .glciconfig.toml that sets any of these keys is reported as
# ignored, because they are facts about this machine rather than a repository.
[network]
mock_server_port = 39741 # host port for mock server (default); change requires daemon restart
host_gateway = "auto" # address containers reach the host on (default)
bus_subnet = "172.16.0.0/16" # range glci's bus networks take a /24 from (default); "auto" lets the engine pick
[network.extra_hosts]
entries = ["internal-registry.corp:10.0.0.50"] # additional /etc/hosts entries for job containers
glci’s own extra_hosts entry is keyed on the mock server’s container name (glci-mock), and $CI_REGISTRY is built from that same name. To give containers a name of your own, use [network.extra_hosts] entries. Older versions documented five more [network] keys — mock_server_bind, container_host, registry_bind, registry_http_bind and daemon_socket — that had no effect; a config that still sets one gets a warning naming it, see Removed keys.
[network.extra_hosts] entries are appended to every job container’s /etc/hosts, on remote-runner daemons as well as the local one. Each entry must be name:address, where name is a hostname (letters, digits, hyphens, underscores and dots) or several separated by single spaces (how Docker spells aliases), and address is an IP or the host-gateway sentinel — glci refuses to start a pipeline with one it cannot parse, rather than letting the runner container fail on an opaque engine error. An entry naming the mock server itself is dropped: ordering alone would not protect it, because musl’s resolver (every Alpine-based job image) collects every matching /etc/hosts line and would treat the second address as a fallback.
The host_gateway is what job (and service) containers resolve glci-mock to. It takes one of three values:
"auto"(the default) — decided per daemon when a pipeline starts. On Docker Desktop’s WSL2 backend (recognised fromdocker info: operating system “Docker Desktop” with a WSL2/microsoftkernel) it is Docker’shost-gatewaysentinel, because there a bridge’s gateway is unreachable from another bridge: packets are dropped, and every job hangs at “Getting source from Git repository” for ~130s (#179). On every other daemon — native Linux, macOS Docker Desktop, colima, Podman, Windows — it is the gateway address of glci’s bus network, which is host-local there. A remote runner’s daemon is decided by the same rule. It is deliberately nothost-gatewayon a native Linux daemon: there the sentinel resolves todocker0’s172.17.0.1, the same address adocker:dindservice gives its own bridge, so from inside DinD it is a local interface anddocker login $CI_REGISTRYis refused. Podman before 4.7 also rejects the sentinel outright."host-gateway"— forces Docker’s sentinel on every daemon, remote runners included — except Podman and Windows-container daemons, which cannot take it and keep their bus network gateway (logged). On a native Linux daemon this isdocker0’s172.17.0.1, sodocker login $CI_REGISTRYinsidedocker:dindwill be refused.- an IP address — pins that address for local job containers. It is not carried onto a runner with its own Docker endpoint (
docker_host/docker_context), where"auto"applies instead. Do not pick one in172.17.0.0/16, whichdocker:dinduses for its own bridge.
A hostname is rejected, because --add-host takes an address on that side, and glci refuses to start a pipeline with a value that could never resolve. The value is read for every pipeline, so a change applies without restarting the daemon. glci config --network prints it with what "auto" becomes — host_gateway = "auto" (default — host-gateway on Docker Desktop WSL2, glci's bus network gateway elsewhere). glci doctor verifies the resulting path end to end on its Job network row. Like the other keys that decide how glci reaches the host, it is honored only in ~/.glci/config.toml — see Container-endpoint keys.
mock_server_port decides which port of your machine glci listens on, which is why it is global-only with the rest of the section. The mock server always listens on all interfaces inside its own container; mock_server_port is the host port it is published on, which CI job containers use to reach it through the Docker host. This port must be available on every Docker host where glci runs. Changing it requires a full daemon restart (glci daemon stop && glci daemon start).
Use glci config --network to see all resolved network settings:
glci config --network
Bus network subnet#
bus_subnet is the IPv4 range glci’s bus networks (glci-bus*) take their subnet from. Each bus network takes one /24 of it (the whole range, if you give a /25 or /26), picked from the network’s name so it is the same on every run, and the next free /24 if that one is taken. Its gateway, the address job containers map glci-mock to, is the subnet’s first address (for example 172.16.175.1). The default, 172.16.0.0/16, is the one /16 of 172.16.0.0/12 outside Docker’s default address pools (172.17.0.0/16 to 172.31.0.0/16, then 192.168.0.0/16), and Podman’s (10.88.0.0/16, then 10.89.0.0 onwards).
This matters for docker:dind. Without a fixed subnet, the bus network used to get the first free range of the default pools, usually 172.18.0.0/16. A docker:dind service starts with an empty daemon that hands out ranges from the same pools, so the first network a job created inside DinD got the bus network’s range. From then on DinD routed the bus gateway (the address $CI_REGISTRY and glci-mock resolve to) to its own bridge, and docker login $CI_REGISTRY was refused (#249).
- Values: an IPv4 range from
/8to/26(host bits are dropped, so10.20.1.1/16means10.20.0.0/16), or"auto"to let the engine pick, as glci did before. glci refuses to start a pipeline with an IPv6 range, a prefix outside that span, or a loopback, link-local or multicast range. A range that overlaps an engine’s default pools is accepted, butglci config --network(and the daemon log, for every pipeline) warns that DinD jobs may then hit the same collision; a range outside private (RFC 1918) space is accepted with a warning too. - A subnet already in use: glci skips a /24 that overlaps an address or route of this machine (a LAN or VPN subnet; read when the engine runs here or in a VM here, not for a remote daemon, and ignoring aggregate routes broader than a /16 such as a VPN’s
172.16.0.0/12, which every subnet overlaps alike), and tries the next one when the engine reports a /24 as taken (by another network, or on the host for Podman), up to 16. If none is free, or the engine refuses--subnetitself, glci lets the engine pick, logs a warning that names this setting, and keeps that network as it is for the rest of the daemon’s life. Pipelines still run, but DinD jobs can hit the collision above until you set a free range. Docker itself checks an explicit subnet only against its own networks, so if your VPN routes part of172.16.0.0/16through an aggregate route, setbus_subnetto a range it does not use. - An existing bus network outside the range (created by an older glci, or before you changed the setting) is removed and recreated, but only when no container is attached to it. glci’s own mock server and runners stay attached while the daemon runs, so a network that is in use is kept, with a warning logged once, until the daemon stops — it removes its bus network then, and the next daemon creates it in the range. So
glci daemon stopis how a new range takes effect. A pipeline resumed after a crash never recreates it: its surviving job containers still map the mock server to the old gateway. - Remote and named-runner daemons: a runner’s bus network on its own daemon follows the same rules on that daemon. On a Windows-container daemon the engine always picks, since its
natnetworks carry no DinD jobs. - Podman takes the same range. glci reads the subnet and gateway with Podman’s own
network inspectfields (.Subnets, not Docker’s.IPAM.Config), and Podman’s “already used on the host” error moves on to the next candidate like Docker’s “Pool overlaps”.
The value is read for every pipeline, but a bus network that already exists keeps its subnet until the daemon stops (see above). glci config --network prints it, and the daemon log (glci daemon logs) shows the subnet glci gave each bus network it created, or the one the engine picked on a fallback. Like the rest of [network], it is honored only in ~/.glci/config.toml.
CI cache#
GitLab CI cache: keywords work the same as production, including key: files: (MD5-based), prefix:, and fallback_keys:. Entries persist across pipeline runs via daemon-managed disk storage on the glci-cache-<hash> container engine volume of the daemon’s GLCI_HOME.
[cache]
persistent = true # default; set false to disable
max_size = "500MB" # reject uploads when exceeded (default: 500MB)
ttl = "24h" # entry expiry (default: 24h)
glci system cache clean # wipe all CI cache entries of this GLCI_HOME
Setting persistent = false disables cross-pipeline caching entirely; each pipeline starts with cold caches.
System management#
# Disk usage of all glci resources
glci system df
# Remove unused containers, networks, volumes, and caches (not the CI cache)
glci system prune
# Remove everything including registry data and pipeline history
glci system prune --all
# Skip the confirmation prompt
glci system prune --force
# Manage daemon logs
glci system logs info # show log file path and size
glci system logs clean # remove the log file
# Inspect container-engine resources (Docker or Podman)
glci system engine containers
glci system engine networks
glci system engine volumes
# (aliased as `glci system docker ...` for backward compatibility)
glci system prune (without --all) removes this GLCI_HOME’s stopped containers, unused networks and orphaned volumes, the bare repo cache, the include cache, and the daemon log. Persistent daemon volumes (CI cache, registry storage, registry CA) are preserved. Containers, networks and volumes are matched by the glci.home=<hash> label of this GLCI_HOME, so on a shared engine another GLCI_HOME’s resources - possibly those of a pipeline running right now - are never touched. The label is derived from the GLCI_HOME path, so machines that share one remote engine must not use the same GLCI_HOME path (two /root/.glci devcontainers, say): they would share the label, and the per-home volume names, too. Networks, volumes and job containers created by a release that did not label them yet are never pruned; remove those once by hand (glci system engine containers|networks|volumes lists them).
glci system prune --all additionally removes registry data, pipeline history, and all persistent volumes: the registry and CI cache volumes of this GLCI_HOME’s daemon. Another GLCI_HOME’s volumes on the same engine are left alone. With no daemon running, they are removed on the endpoint a daemon would use ([docker] host when set).
Either way, a running daemon is stopped first and restarted after, so nothing it uses is removed under it. Prune refuses, touching nothing, while the daemon runs a pipeline, when it does not answer, or when this shell’s socket path is too long to restart it on. A daemon that does not exit within 30 seconds of the stop leaves everything in place too, and the command fails. A restart that fails makes the command exit non-zero. See glci system prune.
Daemon#
The daemon runs automatically — you rarely need these commands:
glci daemon status # show PID, uptime, active pipelines, version, engine + endpoint
glci daemon stop # graceful shutdown (cancels running pipelines)
glci daemon start # manually start
glci daemon logs # show last 50 lines
glci daemon logs -F # follow in real time
glci daemon logs -n 100 # show last 100 lines
The daemon auto-stops after 30 minutes with no active pipelines (configurable via [daemon] idle_timeout). After make install, the next CLI invocation automatically restarts the daemon if it is a different build (a different commit or release). A changed container-engine endpoint is reported rather than auto-restarted — run glci daemon stop to apply it.
Configure daemon settings in ~/.glci/config.toml:
[daemon]
idle_timeout = "1h" # stop after this long with no active pipelines (default: 30m)
max_log_size = "50MB" # rotate when log exceeds this size (default: 50MB, "0" to disable)
max_log_files = 3 # rotated backups to keep (default: 3)
[daemon] is honored only in ~/.glci/config.toml; a project .glciconfig.toml that sets one of its keys is reported as ignored (see Config merging). glci config prints the section when any of the three keys is set.
The daemon listens on $GLCI_HOME/daemon.sock (~/.glci/daemon.sock by default) unless the GLCI_DAEMON_SOCK environment variable moves it, and always logs to daemon.log in the glci home. The [daemon] socket and [daemon] log_file keys older versions documented had no effect; a config that still sets one gets a warning naming it, see Removed keys.
Idle timeout#
idle_timeout is how long the daemon waits with no active pipelines before it stops. It must be a Go duration of at least one minute — "30m", "2h", "1h30m". Anything else (a value that does not parse, "0", "30s", a negative duration) produces a warning — in glci config --network, as a glci doctor row and in the daemon log — and the daemon uses the default, 30m; glci config show prints the value it falls back to. The value is read when the daemon starts, so a change applies after glci daemon stop; the next command that needs the daemon (glci run, say) starts one with the new value. The daemon log’s initializing (idle_timeout=...) line shows the value in force.
A pipeline that is still being prepared counts as active. The daemon also does not stop while the embedded registry holds images: when the timeout passes with no active pipelines but a non-empty registry, it logs idle timeout reached but registry has content, staying alive and checks again after another idle_timeout. Run glci registry clean to empty the registry, or glci daemon stop to stop the daemon outright.
Log rotation#
Log rotation happens at daemon startup. When daemon.log exceeds max_log_size, it is renamed to daemon.log.1 (shifting older backups up to .N), and a fresh log is started. Set max_log_size = "0" to disable rotation.
Crash recovery#
On startup the daemon checks for pipelines whose Docker containers survived the crash. If both the mock server and runner containers are still alive, the daemon resumes execution — re-attaching to running jobs and dispatching pending ones. A job using retry: resumes on the attempt it had reached, with the retries it had left. Pipelines whose containers died are marked as failed. Orphaned containers, volumes and networks are cleaned up automatically.
That cleanup only touches resources carrying this GLCI_HOME’s glci.home label, so another GLCI_HOME’s daemon on the same engine keeps its networks. A glci-net-* or glci-bus* network is also kept while any container, running or stopped, is still connected to it, while it is less than 15 minutes old, or when the engine cannot say either (the daemon log says keeping network <name>: <why>, or keeping N orphaned network(s): their checks did not finish within the 30s start-up budget when the engine is too slow to check them all; a later start retries them). That covers a daemon on another machine whose GLCI_HOME path is the same as this one’s, and so shares its label, including one still pulling images for a pipeline network it has just created. A network kept for its age is removed by a later start. Networks created by a release that did not label them yet are never removed by the cleanup; the daemon’s own bus network is still removed by name when it stops.
Version#
glci version
# glci v0.9.0 (commit abc123def456...)
# daemon v0.9.0 (commit abc123def456...) (pid 12345, up 2h15m)