Dagger
Search

oras

Distribute Artifacts Across OCI Registries With Ease

Installation

dagger install github.com/TruStacks/daggerverse/oras@v0.2.0

Entrypoint

Return Type
Oras !
Arguments
NameTypeDescription
registryString !OCI registry
plainHttpBoolean OCI registry username
imageTagString Oras image version tag
Example
func (m *myModule) example(registry string) *Oras  {
	return dag.
			Oras(registry)
}
@function
def example(registry: str, ) -> dag.Oras:
	return (
		dag.oras(registry)
	)
@func()
example(registry: string, ): Oras {
	return dag
		.oras(registry)
}

Types

Oras 🔗

registry() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, registry string) string  {
	return dag.
			Oras(registry).
			Registry(ctx)
}
@function
async def example(registry: str, ) -> str:
	return await (
		dag.oras(registry)
		.registry()
	)
@func()
async example(registry: string, ): Promise<string> {
	return dag
		.oras(registry)
		.registry()
}

username() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, registry string) string  {
	return dag.
			Oras(registry).
			Username(ctx)
}
@function
async def example(registry: str, ) -> str:
	return await (
		dag.oras(registry)
		.username()
	)
@func()
async example(registry: string, ): Promise<string> {
	return dag
		.oras(registry)
		.username()
}

password() 🔗

Return Type
Secret !
Example
func (m *myModule) example(registry string) *Secret  {
	return dag.
			Oras(registry).
			Password()
}
@function
def example(registry: str, ) -> dagger.Secret:
	return (
		dag.oras(registry)
		.password()
	)
@func()
example(registry: string, ): Secret {
	return dag
		.oras(registry)
		.password()
}

plainHttp() 🔗

Return Type
Boolean !
Example
func (m *myModule) example(ctx context.Context, registry string) bool  {
	return dag.
			Oras(registry).
			PlainHttp(ctx)
}
@function
async def example(registry: str, ) -> bool:
	return await (
		dag.oras(registry)
		.plain_http()
	)
@func()
async example(registry: string, ): Promise<boolean> {
	return dag
		.oras(registry)
		.plainHttp()
}

imageTag() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, registry string) string  {
	return dag.
			Oras(registry).
			ImageTag(ctx)
}
@function
async def example(registry: str, ) -> str:
	return await (
		dag.oras(registry)
		.image_tag()
	)
@func()
async example(registry: string, ): Promise<string> {
	return dag
		.oras(registry)
		.imageTag()
}

container() 🔗

Return Type
Container !
Example
func (m *myModule) example(registry string) *Container  {
	return dag.
			Oras(registry).
			Container()
}
@function
def example(registry: str, ) -> dagger.Container:
	return (
		dag.oras(registry)
		.container()
	)
@func()
example(registry: string, ): Container {
	return dag
		.oras(registry)
		.container()
}

login() 🔗

Login to the container registry

Return Type
Oras !
Arguments
NameTypeDefault ValueDescription
usernameString -OCI registry password
passwordSecret -Allow insecure connections to registry without SSL check
Example
func (m *myModule) example(registry string) *Oras  {
	return dag.
			Oras(registry).
			Login()
}
@function
def example(registry: str, ) -> dag.Oras:
	return (
		dag.oras(registry)
		.login()
	)
@func()
example(registry: string, ): Oras {
	return dag
		.oras(registry)
		.login()
}

push() 🔗

Push an artifact to an oci registry

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Artifact source directory
pathString !-Artifact name
files[String ! ] !-Artifact file
tagString !-Artifact tag
artifactTypeString -Artifact type
Example
func (m *myModule) example(ctx context.Context, registry string, source *Directory, path string, files []string, tag string)   {
	return dag.
			Oras(registry).
			Push(ctx, source, path, files, tag)
}
@function
async def example(registry: str, source: dagger.Directory, path: str, files: List[str], tag: str) -> None:
	return await (
		dag.oras(registry)
		.push(source, path, files, tag)
	)
@func()
async example(registry: string, source: Directory, path: string, files: string[], tag: string): Promise<void> {
	return dag
		.oras(registry)
		.push(source, path, files, tag)
}

pull() 🔗

Pull an artifact from an oci registry.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Artifact source directory
nameString !-Artifact name
tagString !-Artifact tag
subPathString -Export the directory subpath
Example
func (m *myModule) example(registry string, source *Directory, name string, tag string) *Directory  {
	return dag.
			Oras(registry).
			Pull(source, name, tag)
}
@function
def example(registry: str, source: dagger.Directory, name: str, tag: str) -> dagger.Directory:
	return (
		dag.oras(registry)
		.pull(source, name, tag)
	)
@func()
example(registry: string, source: Directory, name: string, tag: string): Directory {
	return dag
		.oras(registry)
		.pull(source, name, tag)
}