Dagger
Search

cosign

Sign a container image using Cosign

Installation

dagger install github.com/opopops/daggerverse/cosign@v1.2.0

Entrypoint

Return Type
Cosign !
Arguments
NameTypeDescription
imageString !Cosign image
registryUsernameString No description provided
registryPasswordSecret No description provided
userString !Cosign image user
containerContainer No description provided
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string
func (m *myModule) example(image string, user string) *Cosign  {
	return dag.
			Cosign(image, user)
}
@function
def example(image: str, user: str, ) -> dag.Cosign:
	return (
		dag.cosign(image, user)
	)
@func()
example(image: string, user: string, ): Cosign {
	return dag
		.cosign(image, user)
}

Types

Cosign 🔗

Cosign CLI

image() 🔗

Cosign image

Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string image
func (m *myModule) example(ctx context.Context, image string, user string) string  {
	return dag.
			Cosign(image, user).
			Image(ctx)
}
@function
async def example(image: str, user: str, ) -> str:
	return await (
		dag.cosign(image, user)
		.image()
	)
@func()
async example(image: string, user: string, ): Promise<string> {
	return dag
		.cosign(image, user)
		.image()
}

registryUsername() 🔗

Return Type
String 
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string registry-username
func (m *myModule) example(ctx context.Context, image string, user string) string  {
	return dag.
			Cosign(image, user).
			RegistryUsername(ctx)
}
@function
async def example(image: str, user: str, ) -> str:
	return await (
		dag.cosign(image, user)
		.registry_username()
	)
@func()
async example(image: string, user: string, ): Promise<string> {
	return dag
		.cosign(image, user)
		.registryUsername()
}

registryPassword() 🔗

Return Type
Secret 
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string registry-password
func (m *myModule) example(image string, user string) *Secret  {
	return dag.
			Cosign(image, user).
			RegistryPassword()
}
@function
def example(image: str, user: str, ) -> dagger.Secret:
	return (
		dag.cosign(image, user)
		.registry_password()
	)
@func()
example(image: string, user: string, ): Secret {
	return dag
		.cosign(image, user)
		.registryPassword()
}

user() 🔗

Cosign image user

Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string user
func (m *myModule) example(ctx context.Context, image string, user string) string  {
	return dag.
			Cosign(image, user).
			User(ctx)
}
@function
async def example(image: str, user: str, ) -> str:
	return await (
		dag.cosign(image, user)
		.user()
	)
@func()
async example(image: string, user: string, ): Promise<string> {
	return dag
		.cosign(image, user)
		.user()
}

container() 🔗

Returns container

Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string container
func (m *myModule) example(image string, user string) *Container  {
	return dag.
			Cosign(image, user).
			Container()
}
@function
def example(image: str, user: str, ) -> dagger.Container:
	return (
		dag.cosign(image, user)
		.container()
	)
@func()
example(image: string, user: string, ): Container {
	return dag
		.cosign(image, user)
		.container()
}

withRegistryAuth() 🔗

Authenticate with registry

Return Type
Cosign !
Arguments
NameTypeDefault ValueDescription
usernameString !-Registry username
secretSecret !-Registry password
addressString "docker.io"No description provided
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string with-registry-auth --username string --secret env:MYSECRET
func (m *myModule) example(image string, user string, username string, secret *Secret) *Cosign  {
	return dag.
			Cosign(image, user).
			WithRegistryAuth(username, secret)
}
@function
def example(image: str, user: str, username: str, secret: dagger.Secret) -> dag.Cosign:
	return (
		dag.cosign(image, user)
		.with_registry_auth(username, secret)
	)
@func()
example(image: string, user: string, username: string, secret: Secret): Cosign {
	return dag
		.cosign(image, user)
		.withRegistryAuth(username, secret)
}

sign() 🔗

Sign image with Cosign

Return Type
String !
Arguments
NameTypeDefault ValueDescription
digestString !-Image digest
privateKeySecret !-Cosign private key
passwordSecret !-Cosign password
recursiveBoolean falseNo description provided
dockerConfigDirectory nullNo description provided
registryUsernameString nullNo description provided
registryPasswordSecret nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/cosign@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string --user string sign --digest string --private-key env:MYSECRET --password env:MYSECRET
func (m *myModule) example(ctx context.Context, image string, user string, digest string, privateKey *Secret, password *Secret) string  {
	return dag.
			Cosign(image, user).
			Sign(ctx, digest, privateKey, password)
}
@function
async def example(image: str, user: str, digest: str, private_key: dagger.Secret, password: dagger.Secret) -> str:
	return await (
		dag.cosign(image, user)
		.sign(digest, private_key, password)
	)
@func()
async example(image: string, user: string, digest: string, privateKey: Secret, password: Secret): Promise<string> {
	return dag
		.cosign(image, user)
		.sign(digest, privateKey, password)
}