Dagger
Search

buildx

This module provides a set of functions to build an OCI image from your project using buildx.

Installation

dagger install github.com/tsirysndr/daggerverse/buildx@86c5ac1711b1939825e03e30f7eea540ad1b0638

Entrypoint

Return Type
Buildx
Example
dagger -m github.com/tsirysndr/daggerverse/buildx@86c5ac1711b1939825e03e30f7eea540ad1b0638 call \
func (m *myModule) example() *Buildx  {
	return dag.
			Buildx()
}
@function
def example() -> dag.Buildx:
	return (
		dag.buildx()
	)
@func()
example(): Buildx {
	return dag
		.buildx()
}

Types

Buildx 🔗

build() 🔗

Build an OCI image from your project using buildx

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
tagString !-No description provided
platformString "linux/amd64"No description provided
pathString "."No description provided
Example
dagger -m github.com/tsirysndr/daggerverse/buildx@86c5ac1711b1939825e03e30f7eea540ad1b0638 call \
 build --src DIR_PATH --tag string
func (m *myModule) example(ctx context.Context, src *Directory, tag string) string  {
	return dag.
			Buildx().
			Build(ctx, src, tag)
}
@function
async def example(src: dagger.Directory, tag: str) -> str:
	return await (
		dag.buildx()
		.build(src, tag)
	)
@func()
async example(src: Directory, tag: string): Promise<string> {
	return dag
		.buildx()
		.build(src, tag)
}

dev() 🔗

Return a Container with Docker Buildx installed

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
Example
dagger -m github.com/tsirysndr/daggerverse/buildx@86c5ac1711b1939825e03e30f7eea540ad1b0638 call \
 dev
func (m *myModule) example() *Container  {
	return dag.
			Buildx().
			Dev()
}
@function
def example() -> dagger.Container:
	return (
		dag.buildx()
		.dev()
	)
@func()
example(): Container {
	return dag
		.buildx()
		.dev()
}

publish() 🔗

Publish an OCI image to a registry

Return Type
String !
Arguments
NameTypeDefault ValueDescription
usernameString !-No description provided
passwordSecret !-No description provided
refString !-No description provided
registryString "docker.io"No description provided
Example
dagger -m github.com/tsirysndr/daggerverse/buildx@86c5ac1711b1939825e03e30f7eea540ad1b0638 call \
 publish --username string --password env:MYSECRET --ref string
func (m *myModule) example(ctx context.Context, username string, password *Secret, ref string) string  {
	return dag.
			Buildx().
			Publish(ctx, username, password, ref)
}
@function
async def example(username: str, password: dagger.Secret, ref: str) -> str:
	return await (
		dag.buildx()
		.publish(username, password, ref)
	)
@func()
async example(username: string, password: Secret, ref: string): Promise<string> {
	return dag
		.buildx()
		.publish(username, password, ref)
}