dagger
https://dagger.ioInstallation
dagger install github.com/dagger/dagger@e678cdd17bee86faea9837e10dd0c8612994aa7c
Entrypoint
Return Type
Dagger !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
version | String | - | No description provided |
hostDockerConfig | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
target | Directory | - | Mount a directory into the container's workdir, for convenience |
experimentalGpusupport | Boolean | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | - | No description provided |
Example
func (m *myModule) example() *File {
return dag.
Dagger().
Cli().
File()
}
publish() 🔗
Publish the CLI using GoReleaser
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
gitDir | Directory ! | - | No description provided |
githubOrgName | String ! | - | No description provided |
githubToken | Secret ! | - | No description provided |
goreleaserKey | Secret ! | - | No description provided |
awsAccessKeyId | Secret ! | - | No description provided |
awsSecretAccessKey | Secret ! | - | No description provided |
awsRegion | Secret ! | - | No description provided |
awsBucket | Secret ! | - | No description provided |
artefactsFqdn | Secret ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
key | String ! | - | No description provided |
value | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
key | String ! | - | No description provided |
value | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String | - | No description provided |
gpuSupport | Boolean | - | No description provided |
Example
func (m *myModule) example() *DaggerEngine {
return dag.
Dagger().
Engine().
WithBase()
}
container() 🔗
Build the engine container
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | - | No description provided |
Example
func (m *myModule) example() *Container {
return dag.
Dagger().
Engine().
Container()
}
service() 🔗
Create a test engine service
Return Type
Service !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
all | Boolean | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | No description provided |
platform | [String ! ] | - | HACK: re-enable when dagger/dagger#7320 is fixed platform []Platform, |
registry | String | - | No description provided |
registryUsername | String | - | No description provided |
registryPassword | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
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
Name | Type | Default Value | Description |
---|---|---|---|
config | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
race | Boolean | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
race | Boolean | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
run | String ! | - | No description provided |
pkg | String | "./..." | No description provided |
race | Boolean | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
githubToken | Secret | - | No description provided |
dryRun | Boolean | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
dryRun | Boolean | - | No description provided |
gitRepo | String | "https://github.com/dagger/dagger-go-sdk.git" | No description provided |
gitUserName | String | "dagger-ci" | No description provided |
gitUserEmail | String | "hello@dagger.io" | No description provided |
githubToken | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
dryRun | Boolean | - | No description provided |
pypiRepo | String | - | No description provided |
pypiToken | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
dryRun | Boolean | - | No description provided |
npmToken | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
dryRun | Boolean | - | No description provided |
hexApikey | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
dryRun | Boolean | - | No description provided |
cargoRegistryToken | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
dryRun | Boolean | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | No description provided |
dryRun | Boolean | - | No description provided |
gitRepo | String | "https://github.com/dagger/dagger-php-sdk.git" | No description provided |
gitUserName | String | "dagger-ci" | No description provided |
gitUserEmail | String | "hello@dagger.io" | No description provided |
githubToken | Secret | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | No description provided |
Example
Function DaggerPhpsdk.bump is not accessible from the dagger module