Dagger
Search

dagger

https://dagger.io

Installation

dagger install github.com/dagger/dagger@e678cdd17bee86faea9837e10dd0c8612994aa7c

Entrypoint

Return Type
Dagger !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
versionString -No description provided
hostDockerConfigSecret -No description provided
Example
func (m *myModule) example(source *Directory) *Dagger  {
	return dag.
			Dagger(source)
}

Types

Dagger 🔗

A dev environment for the Dagger Engine

version() 🔗

Return Type
VersionInfo !
Example
func (m *myModule) example(source *Directory) *DaggerVersionInfo  {
	return dag.
			Dagger(source).
			Version()
}

cli() 🔗

Develop the Dagger CLI

Return Type
Cli !
Example
func (m *myModule) example(source *Directory) *DaggerCli  {
	return dag.
			Dagger(source).
			Cli()
}

engine() 🔗

Develop the Dagger engine container

Return Type
Engine !
Example
func (m *myModule) example(source *Directory) *DaggerEngine  {
	return dag.
			Dagger(source).
			Engine()
}

docs() 🔗

Develop the Dagger documentation

Return Type
Docs !
Example
func (m *myModule) example(source *Directory) *DaggerDocs  {
	return dag.
			Dagger(source).
			Docs()
}

test() 🔗

Run all tests

Return Type
Test !
Example
func (m *myModule) example(source *Directory) *DaggerTest  {
	return dag.
			Dagger(source).
			Test()
}

sdk() 🔗

Develop Dagger SDKs

Return Type
Sdk !
Example
func (m *myModule) example(source *Directory) *DaggerSdk  {
	return dag.
			Dagger(source).
			Sdk()
}

helm() 🔗

Return Type
Helm !
Example
func (m *myModule) example(source *Directory) *DaggerHelm  {
	return dag.
			Dagger(source).
			Helm()
}

dev() 🔗

Creates a dev container that has a running CLI connected to a dagger engine

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
targetDirectory -Mount a directory into the container's workdir, for convenience
experimentalGpusupportBoolean -Enable experimental GPU support
Example
func (m *myModule) example(source *Directory) *Container  {
	return dag.
			Dagger(source).
			Dev()
}

Cli 🔗

file() 🔗

Build the CLI binary

Return Type
File !
Arguments
NameTypeDefault ValueDescription
platformScalar -No description provided
Example
func (m *myModule) example() *File  {
	return dag.
			Dagger().
			Cli().
			File()
}

publish() 🔗

Publish the CLI using GoReleaser

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
gitDirDirectory !-No description provided
githubOrgNameString !-No description provided
githubTokenSecret !-No description provided
goreleaserKeySecret !-No description provided
awsAccessKeyIdSecret !-No description provided
awsSecretAccessKeySecret !-No description provided
awsRegionSecret !-No description provided
awsBucketSecret !-No description provided
artefactsFqdnSecret !-No description provided
Example
func (m *myModule) example(ctx context.Context, gitDir *Directory, githubOrgName string, githubToken *Secret, goreleaserKey *Secret, awsAccessKeyId *Secret, awsSecretAccessKey *Secret, awsRegion *Secret, awsBucket *Secret, artefactsFqdn *Secret)   {
	return dag.
			Dagger().
			Cli().
			Publish(ctx, gitDir, githubOrgName, githubToken, goreleaserKey, awsAccessKeyId, awsSecretAccessKey, awsRegion, awsBucket, artefactsFqdn)
}

testPublish() 🔗

Verify that the CLI builds without actually publishing anything

Return Type
Void !
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Dagger().
			Cli().
			TestPublish(ctx)
}

Engine 🔗

withConfig() 🔗

Return Type
Engine !
Arguments
NameTypeDefault ValueDescription
keyString !-No description provided
valueString !-No description provided
Example
func (m *myModule) example(key string, value string) *DaggerEngine  {
	return dag.
			Dagger().
			Engine().
			WithConfig(key, value)
}

withArg() 🔗

Return Type
Engine !
Arguments
NameTypeDefault ValueDescription
keyString !-No description provided
valueString !-No description provided
Example
func (m *myModule) example(key string, value string) *DaggerEngine  {
	return dag.
			Dagger().
			Engine().
			WithArg(key, value)
}

withTrace() 🔗

Return Type
Engine !
Example
func (m *myModule) example() *DaggerEngine  {
	return dag.
			Dagger().
			Engine().
			WithTrace()
}

withBase() 🔗

Return Type
Engine !
Arguments
NameTypeDefault ValueDescription
imageString -No description provided
gpuSupportBoolean -No description provided
Example
func (m *myModule) example() *DaggerEngine  {
	return dag.
			Dagger().
			Engine().
			WithBase()
}

container() 🔗

Build the engine container

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
platformScalar -No description provided
Example
func (m *myModule) example() *Container  {
	return dag.
			Dagger().
			Engine().
			Container()
}

service() 🔗

Create a test engine service

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
Example
func (m *myModule) example(name string) *Service  {
	return dag.
			Dagger().
			Engine().
			Service(name)
}

lint() 🔗

Lint the engine

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
allBoolean -No description provided
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Dagger().
			Engine().
			Lint(ctx)
}

publish() 🔗

Publish all engine images to a registry

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-No description provided
platform[String ! ] -HACK: re-enable when dagger/dagger#7320 is fixed platform []Platform,
registryString -No description provided
registryUsernameString -No description provided
registryPasswordSecret -No description provided
Example
func (m *myModule) example(ctx context.Context, image string) string  {
	return dag.
			Dagger().
			Engine().
			Publish(ctx, image)
}

testPublish() 🔗

Verify that the engine builds without actually publishing anything

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
platform[String ! ] -HACK: re-enable when dagger/dagger#7320 is fixed platform []Platform,
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Dagger().
			Engine().
			TestPublish(ctx)
}

scan() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Dagger().
			Engine().
			Scan(ctx)
}

Docs 🔗

lint() 🔗

Lint documentation files

Return Type
Void !
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Dagger().
			Docs().
			Lint(ctx)
}

generate() 🔗

Regenerate the API schema and CLI reference docs

Return Type
Directory !
Example
func (m *myModule) example() *Directory  {
	return dag.
			Dagger().
			Docs().
			Generate()
}

generateSdl() 🔗

Regenerate the API schema

Return Type
Directory !
Example
func (m *myModule) example() *Directory  {
	return dag.
			Dagger().
			Docs().
			GenerateSdl()
}

generateCli() 🔗

Regenerate the CLI reference docs

Return Type
Directory !
Example
func (m *myModule) example() *Directory  {
	return dag.
			Dagger().
			Docs().
			GenerateCli()
}

Test 🔗

withCache() 🔗

Return Type
Test !
Arguments
NameTypeDefault ValueDescription
configString !-No description provided
Example
func (m *myModule) example(config string) *DaggerTest  {
	return dag.
			Dagger().
			Test().
			WithCache(config)
}

all() 🔗

Run all engine tests

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
raceBoolean -No description provided
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Dagger().
			Test().
			All(ctx)
}

important() 🔗

Run “important” engine tests

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
raceBoolean -No description provided
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Dagger().
			Test().
			Important(ctx)
}

custom() 🔗

Run custom engine tests

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
runString !-No description provided
pkgString "./..."No description provided
raceBoolean -No description provided
Example
func (m *myModule) example(ctx context.Context, run string)   {
	return dag.
			Dagger().
			Test().
			Custom(ctx, run)
}

Sdk 🔗

A dev environment for the official Dagger SDKs

go() 🔗

Develop the Dagger Go SDK

Return Type
GoSdk !
Example
func (m *myModule) example() *DaggerGoSdk  {
	return dag.
			Dagger().
			Sdk().
			Go()
}

python() 🔗

Develop the Dagger Python SDK

Return Type
PythonSdk !
Example
func (m *myModule) example() *DaggerPythonSdk  {
	return dag.
			Dagger().
			Sdk().
			Python()
}

typescript() 🔗

Develop the Dagger Typescript SDK

Return Type
TypescriptSdk !
Example
func (m *myModule) example() *DaggerTypescriptSdk  {
	return dag.
			Dagger().
			Sdk().
			Typescript()
}

elixir() 🔗

Develop the Dagger Elixir SDK (experimental)

Return Type
ElixirSdk !
Example
func (m *myModule) example() *DaggerElixirSdk  {
	return dag.
			Dagger().
			Sdk().
			Elixir()
}

rust() 🔗

Develop the Dagger Rust SDK (experimental)

Return Type
RustSdk !
Example
func (m *myModule) example() *DaggerRustSdk  {
	return dag.
			Dagger().
			Sdk().
			Rust()
}

java() 🔗

Develop the Dagger Java SDK (experimental)

Return Type
JavaSdk !
Example
func (m *myModule) example() *DaggerJavaSdk  {
	return dag.
			Dagger().
			Sdk().
			Java()
}

php() 🔗

Develop the Dagger PHP SDK (experimental)

Return Type
Phpsdk !
Example
func (m *myModule) example() *DaggerPhpsdk  {
	return dag.
			Dagger().
			Sdk().
			Php()
}

Helm 🔗

test() 🔗

Return Type
Void !
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Dagger().
			Helm().
			Test(ctx)
}

publish() 🔗

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
githubTokenSecret -No description provided
dryRunBoolean -No description provided
Example
func (m *myModule) example(ctx context.Context, tag string)   {
	return dag.
			Dagger().
			Helm().
			Publish(ctx, tag)
}

VersionInfo 🔗

tag() 🔗

Return Type
String !
Example
Function DaggerVersionInfo.tag is not accessible from the dagger module

commit() 🔗

Return Type
String !
Example
Function DaggerVersionInfo.commit is not accessible from the dagger module

dev() 🔗

Return Type
String !
Example
Function DaggerVersionInfo.dev is not accessible from the dagger module

string() 🔗

Return Type
String !
Example
Function DaggerVersionInfo.string is not accessible from the dagger module

GoSdk 🔗

lint() 🔗

Lint the Go SDK

Return Type
Void !
Example
Function DaggerGoSdk.lint is not accessible from the dagger module

test() 🔗

Test the Go SDK

Return Type
Void !
Example
Function DaggerGoSdk.test is not accessible from the dagger module

generate() 🔗

Regenerate the Go SDK API

Return Type
Directory !
Example
Function DaggerGoSdk.generate is not accessible from the dagger module

publish() 🔗

Publish the Go SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
dryRunBoolean -No description provided
gitRepoString "https://github.com/dagger/dagger-go-sdk.git"No description provided
gitUserNameString "dagger-ci"No description provided
gitUserEmailString "hello@dagger.io"No description provided
githubTokenSecret -No description provided
Example
Function DaggerGoSdk.publish is not accessible from the dagger module

bump() 🔗

Bump the Go SDK’s Engine dependency

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
Function DaggerGoSdk.bump is not accessible from the dagger module

PythonSdk 🔗

lint() 🔗

Lint the Python SDK

Return Type
Void !
Example
Function DaggerPythonSdk.lint is not accessible from the dagger module

test() 🔗

Test the Python SDK

Return Type
Void !
Example
Function DaggerPythonSdk.test is not accessible from the dagger module

generate() 🔗

Regenerate the Python SDK API

Return Type
Directory !
Example
Function DaggerPythonSdk.generate is not accessible from the dagger module

publish() 🔗

Publish the Python SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
dryRunBoolean -No description provided
pypiRepoString -No description provided
pypiTokenSecret -No description provided
Example
Function DaggerPythonSdk.publish is not accessible from the dagger module

bump() 🔗

Bump the Python SDK’s Engine dependency

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
Function DaggerPythonSdk.bump is not accessible from the dagger module

TypescriptSdk 🔗

lint() 🔗

Lint the Typescript SDK

Return Type
Void !
Example
Function DaggerTypescriptSdk.lint is not accessible from the dagger module

test() 🔗

Test the Typescript SDK

Return Type
Void !
Example
Function DaggerTypescriptSdk.test is not accessible from the dagger module

generate() 🔗

Regenerate the Typescript SDK API

Return Type
Directory !
Example
Function DaggerTypescriptSdk.generate is not accessible from the dagger module

publish() 🔗

Publish the Typescript SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
dryRunBoolean -No description provided
npmTokenSecret -No description provided
Example
Function DaggerTypescriptSdk.publish is not accessible from the dagger module

bump() 🔗

Bump the Typescript SDK’s Engine dependency

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
Function DaggerTypescriptSdk.bump is not accessible from the dagger module

ElixirSdk 🔗

lint() 🔗

Lint the Elixir SDK

Return Type
Void !
Example
Function DaggerElixirSdk.lint is not accessible from the dagger module

test() 🔗

Test the Elixir SDK

Return Type
Void !
Example
Function DaggerElixirSdk.test is not accessible from the dagger module

generate() 🔗

Regenerate the Elixir SDK API

Return Type
Directory !
Example
Function DaggerElixirSdk.generate is not accessible from the dagger module

publish() 🔗

Publish the Elixir SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
dryRunBoolean -No description provided
hexApikeySecret -No description provided
Example
Function DaggerElixirSdk.publish is not accessible from the dagger module

bump() 🔗

Bump the Elixir SDK’s Engine dependency

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
Function DaggerElixirSdk.bump is not accessible from the dagger module

RustSdk 🔗

lint() 🔗

Lint the Rust SDK

Return Type
Void !
Example
Function DaggerRustSdk.lint is not accessible from the dagger module

test() 🔗

Test the Rust SDK

Return Type
Void !
Example
Function DaggerRustSdk.test is not accessible from the dagger module

generate() 🔗

Regenerate the Rust SDK API

Return Type
Directory !
Example
Function DaggerRustSdk.generate is not accessible from the dagger module

publish() 🔗

Publish the Rust SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
dryRunBoolean -No description provided
cargoRegistryTokenSecret -No description provided
Example
Function DaggerRustSdk.publish is not accessible from the dagger module

bump() 🔗

Bump the Rust SDK’s Engine dependency

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
Function DaggerRustSdk.bump is not accessible from the dagger module

JavaSdk 🔗

lint() 🔗

Lint the Java SDK

Return Type
Void !
Example
Function DaggerJavaSdk.lint is not accessible from the dagger module

test() 🔗

Test the Java SDK

Return Type
Void !
Example
Function DaggerJavaSdk.test is not accessible from the dagger module

generate() 🔗

Regenerate the Java SDK API

Return Type
Directory !
Example
Function DaggerJavaSdk.generate is not accessible from the dagger module

publish() 🔗

Publish the Java SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
dryRunBoolean -No description provided
Example
Function DaggerJavaSdk.publish is not accessible from the dagger module

bump() 🔗

Bump the Java SDK’s Engine dependency

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
Function DaggerJavaSdk.bump is not accessible from the dagger module

Phpsdk 🔗

lint() 🔗

Lint the PHP SDK

Return Type
Void !
Example
Function DaggerPhpsdk.lint is not accessible from the dagger module

test() 🔗

Test the PHP SDK

Return Type
Void !
Example
Function DaggerPhpsdk.test is not accessible from the dagger module

generate() 🔗

Regenerate the PHP SDK API

Return Type
Directory !
Example
Function DaggerPhpsdk.generate is not accessible from the dagger module

publish() 🔗

Publish the PHP SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
dryRunBoolean -No description provided
gitRepoString "https://github.com/dagger/dagger-php-sdk.git"No description provided
gitUserNameString "dagger-ci"No description provided
gitUserEmailString "hello@dagger.io"No description provided
githubTokenSecret -No description provided
Example
Function DaggerPhpsdk.publish is not accessible from the dagger module

bump() 🔗

Bump the PHP SDK’s Engine dependency

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
Function DaggerPhpsdk.bump is not accessible from the dagger module