Skopeo
A module for DaggerSkopeo functions
Installation
dagger install github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7Entrypoint
Return Type
Skopeo !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| skopeoImageTag | String ! | "latest" | Version tag for quay.io/skopeo/stable |
Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag stringfunc (m *MyModule) Example(skopeoImageTag string) *dagger.Skopeo {
return dag.
Skopeo(skopeoImageTag)
}@function
def example(skopeoimagetag: str) -> dagger.Skopeo:
return (
dag.skopeo(skopeoimagetag)
)@func()
example(skopeoImageTag: string): Skopeo {
return dag
.skopeo(skopeoImageTag)
}Types
Skopeo 🔗
skopeoImageTag() 🔗
Return Type
String ! Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string skopeo-image-tagfunc (m *MyModule) Example(ctx context.Context, skopeoImageTag string) string {
return dag.
Skopeo(skopeoImageTag).
Skopeoimagetag(ctx)
}@function
async def example(skopeoimagetag: str) -> str:
return await (
dag.skopeo(skopeoimagetag)
.skopeoimagetag()
)@func()
async example(skopeoImageTag: string): Promise<string> {
return dag
.skopeo(skopeoImageTag)
.skopeoImageTag()
}base() 🔗
Return a Container from the official trivy image.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| trivyImageTag | String | "latest" | Trivy image version tag. |
Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string basefunc (m *MyModule) Example(skopeoImageTag string) *dagger.Container {
return dag.
Skopeo(skopeoImageTag).
Base()
}@function
def example(skopeoimagetag: str) -> dagger.Container:
return (
dag.skopeo(skopeoimagetag)
.base()
)@func()
example(skopeoImageTag: string): Container {
return dag
.skopeo(skopeoImageTag)
.base()
}scanImage() 🔗
Scan an image ref.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageRef | String ! | - | Reference to the image to scan |
| severity | String | "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" | which severity levels to include in the scan |
| exitCode | Integer | 0 | exit code to return if vulnerabilities are found |
| format | String | "table" | output format of the scan results |
| trivyImageTag | String | "latest" | Trivy image version tag |
| auth | Secret ! | - | token for authentication |
Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string scan-image --image-ref string --auth env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, skopeoImageTag string, imageRef string, auth *dagger.Secret) string {
return dag.
Skopeo(skopeoImageTag).
Scanimage(ctx, imageRef, auth)
}@function
async def example(skopeoimagetag: str, imageref: str, auth: dagger.Secret) -> str:
return await (
dag.skopeo(skopeoimagetag)
.scanimage(imageref, auth)
)@func()
async example(skopeoImageTag: string, imageRef: string, auth: Secret): Promise<string> {
return dag
.skopeo(skopeoImageTag)
.scanImage(imageRef, auth)
}mirrorOne() 🔗
MirrorOne mirrors a single image from a source registry to a destination registry using Skopeo.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| awsCreds | File | - | path for AWS credentials file used for authentication |
| awsRegion | String | - | AWS region for ECR |
| srcRegistry | String ! | - | source and destination registries and repository tag |
| dstRegistry | String ! | - | No description provided |
| repoTag | String ! | - | No description provided |
| dstUser | String ! | - | destination user for authentication |
| dstPass | Secret | - | destination password for authentication |
| dstRef | String | - | default=“” destination reference for the image, if empty, uses the repoTag |
| awsPull | Boolean ! | - | wether to pull the image from AWS ECR or not |
Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string mirror-one --src-registry string --dst-registry string --repo-tag string --dst-user string --aws-pull booleanfunc (m *MyModule) Example(ctx context.Context, skopeoImageTag string, srcRegistry string, dstRegistry string, repoTag string, dstUser string, awsPull bool) {
return dag.
Skopeo(skopeoImageTag).
Mirrorone(ctxsrcRegistry, dstRegistry, repoTag, dstUser, awsPull)
}@function
async def example(skopeoimagetag: str, srcregistry: str, dstregistry: str, repotag: str, dstuser: str, awspull: bool) -> None:
return await (
dag.skopeo(skopeoimagetag)
.mirrorone(srcregistry, dstregistry, repotag, dstuser, awspull)
)@func()
async example(skopeoImageTag: string, srcRegistry: string, dstRegistry: string, repoTag: string, dstUser: string, awsPull: boolean): Promise<void> {
return dag
.skopeo(skopeoImageTag)
.mirrorOne(srcRegistry, dstRegistry, repoTag, dstUser, awsPull)
}mirrorMany() 🔗
MirrorMany mirrors multiple images from a source registry to a destination registry using Skopeo.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| awsCreds | File ! | - | path for AWS credentials file used for authentication |
| awsRegion | String ! | - | AWS region for ECR |
| srcRegistry | String ! | - | source and destination registries and repository tags |
| dstRegistry | String ! | - | No description provided |
| repoTags | [String ! ] ! | - | repository tags to mirror |
| dstUser | String ! | - | destination user for authentication |
| dstPass | Secret ! | - | destination password for authentication |
| dstRef | String | - | default=“” destination reference for the image, if empty, uses the repoTag |
| awsPull | Boolean ! | - | whether to pull the image from AWS ECR or not |
Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string mirror-many --aws-creds file:path --aws-region string --src-registry string --dst-registry string --repo-tags string1 --repo-tags string2 --dst-user string --dst-pass env:MYSECRET --aws-pull booleanfunc (m *MyModule) Example(ctx context.Context, skopeoImageTag string, awsCreds *dagger.File, awsRegion string, srcRegistry string, dstRegistry string, repoTags []string, dstUser string, dstPass *dagger.Secret, awsPull bool) {
return dag.
Skopeo(skopeoImageTag).
Mirrormany(ctx, awsCreds, awsRegion, srcRegistry, dstRegistry, repoTags, dstUser, dstPass, awsPull)
}@function
async def example(skopeoimagetag: str, awscreds: dagger.File, awsregion: str, srcregistry: str, dstregistry: str, repotags: List[str], dstuser: str, dstpass: dagger.Secret, awspull: bool) -> None:
return await (
dag.skopeo(skopeoimagetag)
.mirrormany(awscreds, awsregion, srcregistry, dstregistry, repotags, dstuser, dstpass, awspull)
)@func()
async example(skopeoImageTag: string, awsCreds: File, awsRegion: string, srcRegistry: string, dstRegistry: string, repoTags: string[], dstUser: string, dstPass: Secret, awsPull: boolean): Promise<void> {
return dag
.skopeo(skopeoImageTag)
.mirrorMany(awsCreds, awsRegion, srcRegistry, dstRegistry, repoTags, dstUser, dstPass, awsPull)
}skopeoInspect() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageRef | String ! | - | Reference to the image to inspect |
| format | String | "{{.Name}}:{{.Tag}} Digest: {{.Digest}} Arch: {{.Architecture}} | OS: {{.Os}}" | Go template format string for skopeo inspect |
| registry | String ! | - | No description provided |
Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string skopeo-inspect --image-ref string --registry stringfunc (m *MyModule) Example(ctx context.Context, skopeoImageTag string, imageRef string, registry string) string {
return dag.
Skopeo(skopeoImageTag).
Skopeoinspect(ctx, imageRef, registry)
}@function
async def example(skopeoimagetag: str, imageref: str, registry: str) -> str:
return await (
dag.skopeo(skopeoimagetag)
.skopeoinspect(imageref, registry)
)@func()
async example(skopeoImageTag: string, imageRef: string, registry: string): Promise<string> {
return dag
.skopeo(skopeoImageTag)
.skopeoInspect(imageRef, registry)
}version() 🔗
Check version of the skopeo image used.
Return Type
String ! Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string versionfunc (m *MyModule) Example(ctx context.Context, skopeoImageTag string) string {
return dag.
Skopeo(skopeoImageTag).
Version(ctx)
}@function
async def example(skopeoimagetag: str) -> str:
return await (
dag.skopeo(skopeoimagetag)
.version()
)@func()
async example(skopeoImageTag: string): Promise<string> {
return dag
.skopeo(skopeoImageTag)
.version()
}delete() 🔗
Delete an image from a registry.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageRef | String ! | - | Reference to the image to delete |
| registry | String ! | - | No description provided |
Example
dagger -m github.com/EladAviczer/skopeo@fde20c78f17a528dfcb39425491a048e11ddc6e7 call \
--skopeo-image-tag string delete --image-ref string --registry stringfunc (m *MyModule) Example(ctx context.Context, skopeoImageTag string, imageRef string, registry string) string {
return dag.
Skopeo(skopeoImageTag).
Delete(ctx, imageRef, registry)
}@function
async def example(skopeoimagetag: str, imageref: str, registry: str) -> str:
return await (
dag.skopeo(skopeoimagetag)
.delete(imageref, registry)
)@func()
async example(skopeoImageTag: string, imageRef: string, registry: string): Promise<string> {
return dag
.skopeo(skopeoImageTag)
.delete(imageRef, registry)
}