glci reads environment variables to control its own behavior and sets CI/CD variables inside job containers to emulate GitLab CI. This page covers both categories.
Override the data directory where glci stores daemon state, pipeline history, registry data, and logs. Useful for test isolation or running multiple daemon instances.
GLCI_NO_DEFAULT_CONFIG
(unset)
Set to 1 to prevent glci from auto-creating a .glciconfig.toml when none exists. By default, glci creates one with [skip] stages = [".pre"].
# Use a custom data directoryexportGLCI_HOME=/tmp/glci-test
glci run
# Disable auto-creation of .glciconfig.tomlGLCI_NO_DEFAULT_CONFIG=1 glci run
Docker daemon endpoint. glci resolves this at startup via: (1) [docker] host in config, (2) active Docker context, (3) inherited DOCKER_HOST, (4) Docker CLI defaults.
DOCKER_CONFIG
~/.docker
Directory containing Docker config.json. Used for Docker Hub credentials that are propagated into DinD containers.
# Point glci at a remote Docker daemonexportDOCKER_HOST=ssh://remote-host
glci run
# Use a custom Docker config directoryexportDOCKER_CONFIG=/path/to/docker-config
glci run
Set to 1 to use the GitLab Lint API as the primary CI config parser instead of the offline parser. The offline parser is the default (with API as fallback).
These variables are set internally by the daemon when launching the mock server container. They are documented here for completeness but are not typically set by users.
Variable
Default
Description
GLCI_MOCK_PORT
39741
Port the mock server listens on inside its container. Set by the daemon from the resolved mock_server_port config value. Configurable via [network] mock_server_port in config.toml.
GLCI_CACHE_DIR
(unset)
Disk-backed cache directory for the mock server. Set by the daemon to /cache-store inside the mock container. When unset, cache stays in memory.
GLCI_CACHE_MAX_SIZE
500MB
Maximum total size for CI cache entries. Uploads are rejected when this limit is exceeded. Accepts suffixes: KB, MB, GB.
GLCI_CACHE_TTL
24h
Time-to-live for cached entries. Entries older than this are expired. Uses Go duration format (e.g. 1h30m, 24h).
glci populates standard GitLab CI/CD predefined variables inside job containers. Commit, project, server, pipeline, job, user, and runner variables are all derived from local git state and mock server configuration, matching what GitLab CI would set.
The following variables behave differently in glci compared to GitLab CI:
CI_ENVIRONMENT_* variables are set when a job has an environment: keyword. CI_RELEASE_DESCRIPTION is set when a job has a release: keyword (truncated to 1024 chars).