oras
Distribute Artifacts Across OCI Registries With Ease
Installation
dagger install github.com/TruStacks/daggerverse/oras@v0.2.0
Entrypoint
Return Type
Oras !
Arguments
Name | Type | Description |
---|---|---|
registry | String ! | OCI registry |
plainHttp | Boolean | OCI registry username |
imageTag | String | Oras image version tag |
Example
dagger -m github.com/TruStacks/daggerverse/oras@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 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@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 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@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 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@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 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@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 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()
}
imageTag() 🔗
Return Type
String !
Example
dagger -m github.com/TruStacks/daggerverse/oras@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 call \
--registry string image-tag
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
dagger -m github.com/TruStacks/daggerverse/oras@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 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()
}
login() 🔗
Login to the container registry
Return Type
Oras !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
username | String | - | OCI registry password |
password | Secret | - | Allow insecure connections to registry without SSL check |
Example
dagger -m github.com/TruStacks/daggerverse/oras@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 call \
--registry string login
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
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | Artifact source directory |
path | String ! | - | Artifact name |
files | [String ! ] ! | - | Artifact file |
tag | String ! | - | Artifact tag |
artifactType | String | - | Artifact type |
Example
dagger -m github.com/TruStacks/daggerverse/oras@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 call \
--registry string push --source DIR_PATH --path string --files string1 --files string2 --tag string
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
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@5e2da743f6c3fd734d6de651c0d2a3d9210aa942 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)
}