oras
Distribute Artifacts Across OCI Registries With Ease
Installation
dagger install github.com/TruStacks/daggerverse/oras@v0.1.0Entrypoint
Return Type
Oras !Arguments
| Name | Type | Default Value | 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 | "v1.1.0" | Oras image version tag |
Example
dagger -m github.com/TruStacks/daggerverse/oras@9f198cb3e1c827f16ca3cb1033deb67593b65a3e call \
--registry stringfunc (m *MyModule) Example(registry string) *dagger.Oras {
return dag.
Oras(registry)
}@function
def example(registry: str, ) -> dagger.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 registryfunc (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 usernamefunc (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 passwordfunc (m *MyModule) Example(registry string) *dagger.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-httpfunc (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 versionfunc (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 containerfunc (m *MyModule) Example(registry string) *dagger.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 stringfunc (m *MyModule) Example(ctx context.Context, registry string, source *dagger.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 stringfunc (m *MyModule) Example(registry string, source *dagger.Directory, name string, tag string) *dagger.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)
}