Skip to main content

Dagger CUE SDK Environment Variables Reference

Environment variables have two purposes:

  • Extend Dagger capabilities
  • Persist CLI options

Extend Dagger CUE SDK capabilities

To avoid burdening the user experience with rarely used options, a small list of environment variables can be set:

Environment variableSourceDescription
BUILDKIT_HOSTcustom buildkitLink the Dagger Engine to custom Buildkit instance
DOCKER_HOSTcustom buildkit w/DockerLink the Dagger Engine to custom Buildkit instance running in Docker
OTEL_EXPORTER_JAEGER_ENDPOINTopentelemetryOpentelemetry Jaeger endpoint
JAEGER_TRACEopentelemetryJaeger UI endpoint
DOCKERHUB_AUTH_USERimage.cueDocker.#Pull repository login
DOCKERHUB_AUTH_PASSWORDimage.cueDocker.#Pull repository password

Persist CLI options

CLI options can be replaced with environment variables:

dagger-cue version

optionUsageDescription
--checkexport DAGGER_CHECK=1check if dagger-cue is up to date

dagger-cue project

init

optionUsageDescription
--nameexport DAGGER_NAME=stringproject name
--templateexport DAGGER_TEMPLATE=stringTemplate name [hello]

update

optionUsageDescription
--private-key-fileexport DAGGER_PRIVATE_KEY_FILE=stringPrivate ssh key
--private-key-passwordexport DAGGER_PRIVATE_KEY_PASSWORD=stringPrivate ssh key password
--updateexport DAGGER_UPDATE=1Update to latest version of specified packages

info

optionUsageDescription
--planexport DAGGER_PLAN=stringPath to plan (defaults to current directory) (default ".")

dagger-cue do

optionUsageDescription
--cache-fromexport DAGGER_CACHE_FROM=stringExternal cache sources (eg. user/app:cache, type=local,src=path/to/dir)
--cache-toexport DAGGER_CACHE_TO=stringCache destinations (eg. user/app:cache, type=local,dest=path/to/dir)
--dry-runexport DAGGER_DRY_RUN=1Dry run mode
--no-cacheexport DAGGER_NO_CACHE=1Disable caching
--outputexport DAGGER_OUTPUT=stringFile path to write the action's output values. Prints to stdout if empty
--output-formatexport DAGGER_OUTPUT_FORMAT=stringFormat for output values (plain, json, yaml)
--planexport DAGGER_PLAN=stringPath to plan (defaults to current directory) (default ".")
--platformexport DAGGER_PLATFORM=stringSet target build platform (requires experimental)
--withexport DAGGER_WITH=stringSet value of dagger value at runtime