Skip to main content

Types

In addition to basic types (string, boolean, integer, arrays...), the Dagger API also provides powerful types which you can use as both arguments and return values for Dagger Functions.

Each type page combines hand-curated guidance, when available, with a complete schema-generated API reference. The sidebar highlights commonly used core API types; see All types for the complete generated list.

The following table highlights commonly used types:

TypeDescription
CacheVolumeA directory whose contents persist across runs
ContainerAn OCI-compatible container
CurrentModuleThe current Dagger module and its context
EngineThe Dagger Engine configuration and state
DirectoryA directory (local path or Git reference)
EnvVariableAn environment variable name and value
EnvA collection of typed inputs and outputs for an LLM
FileA file
GitRepositoryA Git repository
GitRefA Git reference (tag, branch, or commit)
HostThe Dagger host environment
LLMA Large Language Model (LLM)
ModuleA Dagger module
PortA port exposed by a container
SecretA secret credential like a password, access token or key)
ServiceA content-addressed service providing TCP connectivity
SocketA Unix or TCP/IP socket that can be mounted into a container
TerminalAn interactive terminal session
tip

In addition to the default Dagger types, you can create and add your own custom types to Dagger. These custom types can be used in Dagger modules and can be composed with other types to create complex workflows. Learn more about creating custom types and developing Dagger modules.