oras
Distribute Artifacts Across OCI Registries With Ease
Installation
dagger install github.com/TruStacks/daggerverse/oras@v0.1.0
Entrypoint
Return Type
Oras !
Arguments
Name | Type | Description |
---|---|---|
registry | String ! | OCI registry |
username | String | OCI registry password |
password | Secret | Allow insecure connections to registry without SSL check |
plainHttp | Boolean | OCI registry username |
imageTag | String | Oras image version tag |
Example
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string
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
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string registry
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
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string username
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
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string password
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
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string plain-http
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()
}
version() 🔗
Return Type
String !
Example
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string version
func (m *myModule) example(ctx context.Context, registry string) string {
return dag.
Oras(registry).
Version(ctx)
}
@function
async def example(registry: str, ) -> str:
return await (
dag.oras(registry)
.version()
)
@func()
async example(registry: string, ): Promise<string> {
return dag
.oras(registry)
.version()
}
container() 🔗
Return Type
Container !
Example
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string container
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()
}
push() 🔗
Push an artifact to an oci registry
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | Artifact source directory |
name | String ! | - | Artifact name |
file | String ! | - | Artifact file |
tag | String ! | - | Artifact tag |
artifactType | String | - | Artifact type |
Example
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string push --source DIR_PATH --name string --file string --tag string
func (m *myModule) example(ctx context.Context, registry string, source *Directory, name string, file string, tag string) {
return dag.
Oras(registry).
Push(ctx, source, name, file, tag)
}
@function
async def example(registry: str, source: dagger.Directory, name: str, file: str, tag: str) -> None:
return await (
dag.oras(registry)
.push(source, name, file, tag)
)
@func()
async example(registry: string, source: Directory, name: string, file: string, tag: string): Promise<void> {
return dag
.oras(registry)
.push(source, name, file, tag)
}
pull() 🔗
Pull an artifact from an oci registry.
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | Artifact source directory |
name | String ! | - | Artifact name |
tag | String ! | - | Artifact tag |
subPath | String | - | Export the directory subpath |
Example
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry string pull --source DIR_PATH --name string --tag string
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)
}