build
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/antonkad/build-image@81daff4f38b5b4cc7dd58ba9b7931b6e14602e58Entrypoint
Return Type
Build Example
dagger -m github.com/antonkad/build-image@81daff4f38b5b4cc7dd58ba9b7931b6e14602e58 call \
func (m *MyModule) Example() *dagger.Build {
return dag.
Build()
}@function
def example() -> dagger.Build:
return (
dag.build()
)@func()
example(): Build {
return dag
.build()
}Types
Build 🔗
buildEnv() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/antonkad/build-image@81daff4f38b5b4cc7dd58ba9b7931b6e14602e58 call \
build-env --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Build().
BuildEnv(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.build()
.build_env(source)
)@func()
example(source: Directory): Container {
return dag
.build()
.buildEnv(source)
}publish() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| id | String | - | No description provided |
| repository | String ! | - | No description provided |
| ref | String | - | No description provided |
| path | String | - | No description provided |
| projectId | String | - | No description provided |
| framework | String ! | - | No description provided |
| packageManager | String | - | No description provided |
| exposedPort | Integer | - | No description provided |
Example
dagger -m github.com/antonkad/build-image@81daff4f38b5b4cc7dd58ba9b7931b6e14602e58 call \
publish --repository string --framework stringfunc (m *MyModule) Example(ctx context.Context, repository string, framework string) string {
return dag.
Build().
Publish(ctxrepository, framework)
}@function
async def example(repository: str, framework: str) -> str:
return await (
dag.build()
.publish(repository, framework)
)@func()
async example(repository: string, framework: string): Promise<string> {
return dag
.build()
.publish(repository, framework)
}build() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| id | String | - | No description provided |
| repository | String ! | - | No description provided |
| ref | String | - | No description provided |
| path | String | - | No description provided |
| projectId | String | - | No description provided |
| packageManager | String | - | No description provided |
Example
dagger -m github.com/antonkad/build-image@81daff4f38b5b4cc7dd58ba9b7931b6e14602e58 call \
build --repository stringfunc (m *MyModule) Example(repository string) *dagger.Container {
return dag.
Build().
Build(repository)
}@function
def example(repository: str) -> dagger.Container:
return (
dag.build()
.build(repository)
)@func()
example(repository: string): Container {
return dag
.build()
.build(repository)
}buildNginx() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| id | String | - | No description provided |
| repository | String ! | - | No description provided |
| ref | String | - | No description provided |
| path | String | - | No description provided |
| projectId | String | - | No description provided |
| framework | String ! | - | No description provided |
| packageManager | String | - | No description provided |
| exposedPort | Integer | - | No description provided |
Example
dagger -m github.com/antonkad/build-image@81daff4f38b5b4cc7dd58ba9b7931b6e14602e58 call \
build-nginx --repository string --framework stringfunc (m *MyModule) Example(repository string, framework string) *dagger.Container {
return dag.
Build().
BuildNginx(repository, framework)
}@function
def example(repository: str, framework: str) -> dagger.Container:
return (
dag.build()
.build_nginx(repository, framework)
)@func()
example(repository: string, framework: string): Container {
return dag
.build()
.buildNginx(repository, framework)
}buildNext() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| id | String | - | No description provided |
| repository | String ! | - | No description provided |
| ref | String | - | No description provided |
| path | String | - | No description provided |
| projectId | String | - | No description provided |
| framework | String ! | - | No description provided |
| packageManager | String | - | No description provided |
| exposedPort | Integer | - | No description provided |
Example
dagger -m github.com/antonkad/build-image@81daff4f38b5b4cc7dd58ba9b7931b6e14602e58 call \
build-next --repository string --framework stringfunc (m *MyModule) Example(repository string, framework string) *dagger.Container {
return dag.
Build().
BuildNext(repository, framework)
}@function
def example(repository: str, framework: str) -> dagger.Container:
return (
dag.build()
.build_next(repository, framework)
)@func()
example(repository: string, framework: string): Container {
return dag
.build()
.buildNext(repository, framework)
}