Dagger
Search

wolfi

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5

Entrypoint

Return Type
Wolfi !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -Source directory
githubActionsBoolean falseEnable GitHub Actions
githubActorString ""GitHub Actor
githubRepositoryString ""The owner and repository name
githubRepositoryOwnerString ""The repository owner's username
githubTokenSecret nullGitHub Token
githubOidcProviderTokenSecret nullGitHub OIDC provider Token
githubOidcProviderUrlSecret nullGitHub OIDC provider URL
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
func (m *MyModule) Example() *dagger.Wolfi  {
	return dag.
			Wolfi()
}
@function
def example() -> dagger.Wolfi:
	return (
		dag.wolfi()
	)
@func()
example(): Wolfi {
	return dag
		.wolfi()
}

Types

Wolfi 🔗

Build Wolfi base images

apko() 🔗

Return the apko container

Return Type
Container !
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 apko
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Wolfi().
			Apko()
}
@function
def example() -> dagger.Container:
	return (
		dag.wolfi()
		.apko()
	)
@func()
example(): Container {
	return dag
		.wolfi()
		.apko()
}

build() 🔗

Build an image from a YAML config file and returns it as a directory

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
imageString !-Image name
variantString "prod"Image variant
platform[Scalar ! ] nullPlatforms
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 build --image string
func (m *MyModule) Example(image string) *dagger.Directory  {
	return dag.
			Wolfi().
			Build(image)
}
@function
def example(image: str) -> dagger.Directory:
	return (
		dag.wolfi()
		.build(image)
	)
@func()
example(image: string): Directory {
	return dag
		.wolfi()
		.build(image)
}

config() 🔗

Return the Apko config derived from loading a YAML file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
configFile !-A file.
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 config --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.File  {
	return dag.
			Wolfi().
			Config(config)
}
@function
def example(config: dagger.File) -> dagger.File:
	return (
		dag.wolfi()
		.config(config)
	)
@func()
example(config: File): File {
	return dag
		.wolfi()
		.config(config)
}

container() 🔗

Return the image container built from a YAML config file

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
imageString !-Image name
variantString "prod"Image variant
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 container --image string
func (m *MyModule) Example(image string) *dagger.Container  {
	return dag.
			Wolfi().
			Container(image)
}
@function
def example(image: str) -> dagger.Container:
	return (
		dag.wolfi()
		.container(image)
	)
@func()
example(image: string): Container {
	return dag
		.wolfi()
		.container(image)
}

cosign() 🔗

Return the cosign container

Return Type
Container !
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 cosign
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Wolfi().
			Cosign()
}
@function
def example() -> dagger.Container:
	return (
		dag.wolfi()
		.cosign()
	)
@func()
example(): Container {
	return dag
		.wolfi()
		.cosign()
}

crane() 🔗

Return the crane container

Return Type
Container !
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 crane
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Wolfi().
			Crane()
}
@function
def example() -> dagger.Container:
	return (
		dag.wolfi()
		.crane()
	)
@func()
example(): Container {
	return dag
		.wolfi()
		.crane()
}

grype() 🔗

Return the grype container

Return Type
Container !
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 grype
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Wolfi().
			Grype()
}
@function
def example() -> dagger.Container:
	return (
		dag.wolfi()
		.grype()
	)
@func()
example(): Container {
	return dag
		.wolfi()
		.grype()
}

publish() 🔗

Publish an image from a YAML config file

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-Image name
variantString "prod"Image variant
tag[String ! ] ![]Image tags
versionString !""Image version. Used when no tags provided
platform[Scalar ! ] nullPlatforms
scanBoolean !trueScan the image for vulnerabilities
scanFailOnString !""Fails if a vulnerability is found with a severity >= the given severity
signBoolean !falseSign the image with cosign
cosignAnnotations[String ! ] []Extra key=value pairs to sign
cosignKeySecret nullPrivate key to use for image signing
cosignPasswordSecret nullPassword used to decrypt the Cosign Private key
oidcProviderString !""Specify the provider to get the OIDC token from
forceBoolean falseForce image publishing (invalidate cache)
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 publish --image string --tag string1 --tag string2 --version string --scan boolean --scan-fail-on string --sign boolean --oidc-provider string
func (m *MyModule) Example(ctx context.Context, image string, tag []string, version string, scan bool, scanFailOn string, sign bool, oidcProvider string) string  {
	return dag.
			Wolfi().
			Publish(ctx, image, tag, version, scan, scanFailOn, sign, oidcProvider)
}
@function
async def example(image: str, tag: List[str], version: str, scan: bool, scan_fail_on: str, sign: bool, oidc_provider: str) -> str:
	return await (
		dag.wolfi()
		.publish(image, tag, version, scan, scan_fail_on, sign, oidc_provider)
	)
@func()
async example(image: string, tag: string[], version: string, scan: boolean, scanFailOn: string, sign: boolean, oidcProvider: string): Promise<string> {
	return dag
		.wolfi()
		.publish(image, tag, version, scan, scanFailOn, sign, oidcProvider)
}

sbom() 🔗

Return the SBOM for the sepecified image config file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
imageString !-Image name
variantString "prod"Image variant
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 sbom --image string
func (m *MyModule) Example(image string) *dagger.File  {
	return dag.
			Wolfi().
			Sbom(image)
}
@function
def example(image: str) -> dagger.File:
	return (
		dag.wolfi()
		.sbom(image)
	)
@func()
example(image: string): File {
	return dag
		.wolfi()
		.sbom(image)
}

scan() 🔗

Scan an image built from a YAML config file for vulnerabilities

Return Type
File !
Arguments
NameTypeDefault ValueDescription
imageString !-Image name
variantString "prod"Image variant
failOnString !""Fails if a vulnerability is found with a severity >= the given severity
formatString !"table"Output format
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 scan --image string --fail-on string --format string
func (m *MyModule) Example(image string, failOn string, format string) *dagger.File  {
	return dag.
			Wolfi().
			Scan(image, failOn, format)
}
@function
def example(image: str, fail_on: str, format: str) -> dagger.File:
	return (
		dag.wolfi()
		.scan(image, fail_on, format)
	)
@func()
example(image: string, failOn: string, format: string): File {
	return dag
		.wolfi()
		.scan(image, failOn, format)
}

scanImage() 🔗

Scan an image for vulnerabilities

Return Type
File !
Arguments
NameTypeDefault ValueDescription
addressString !-Address of the image to scan
failOnString !""Fails if a vulnerability is found with a severity >= the given severity
formatString !"table"Output format
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 scan-image --address string --fail-on string --format string
func (m *MyModule) Example(address string, failOn string, format string) *dagger.File  {
	return dag.
			Wolfi().
			ScanImage(address, failOn, format)
}
@function
def example(address: str, fail_on: str, format: str) -> dagger.File:
	return (
		dag.wolfi()
		.scan_image(address, fail_on, format)
	)
@func()
example(address: string, failOn: string, format: string): File {
	return dag
		.wolfi()
		.scanImage(address, failOn, format)
}

withDockerSocket() 🔗

Mounts a Docker Unix socket

Return Type
Wolfi !
Arguments
NameTypeDefault ValueDescription
sourceSocket !-Identifier of the Docker socket to forward (e.g /var/run/docker.sock)
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(source *dagger.Socket) *dagger.Wolfi  {
	return dag.
			Wolfi().
			WithDockerSocket(source)
}
@function
def example(source: dagger.Socket) -> dagger.Wolfi:
	return (
		dag.wolfi()
		.with_docker_socket(source)
	)
@func()
example(source: Socket): Wolfi {
	return dag
		.wolfi()
		.withDockerSocket(source)
}

withEnvVariable() 🔗

Set a new environment variable

Return Type
Wolfi !
Arguments
NameTypeDefault ValueDescription
nameString !-Name of the environment variable
valueString !-Value of the environment variable
expandBoolean falseReplace “${VAR}” or “$VAR” in the value according to the current environment variables defined in the container
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 with-env-variable --name string --value string
func (m *MyModule) Example(name string, value string) *dagger.Wolfi  {
	return dag.
			Wolfi().
			WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dagger.Wolfi:
	return (
		dag.wolfi()
		.with_env_variable(name, value)
	)
@func()
example(name: string, value: string): Wolfi {
	return dag
		.wolfi()
		.withEnvVariable(name, value)
}

withRegistryAuth() 🔗

Authenticate with registry

Return Type
Wolfi !
Arguments
NameTypeDefault ValueDescription
usernameString !-Registry username
secretSecret !-Registry password
addressString !"ghcr.io"Registry host
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 with-registry-auth --username string --secret env:MYSECRET --address string
func (m *MyModule) Example(username string, secret *dagger.Secret, address string) *dagger.Wolfi  {
	return dag.
			Wolfi().
			WithRegistryAuth(username, secret, address)
}
@function
def example(username: str, secret: dagger.Secret, address: str) -> dagger.Wolfi:
	return (
		dag.wolfi()
		.with_registry_auth(username, secret, address)
	)
@func()
example(username: string, secret: Secret, address: string): Wolfi {
	return dag
		.wolfi()
		.withRegistryAuth(username, secret, address)
}

withSecretVariable() 🔗

Set a new environment variable, using a secret value

Return Type
Wolfi !
Arguments
NameTypeDefault ValueDescription
nameString !-Name of the secret variable
secretSecret !-Identifier of the secret value
Example
dagger -m github.com/opopops/wolfi@c65ab999b4087d507052c855550b81ebd6cc90a5 call \
 with-secret-variable --name string --secret env:MYSECRET
func (m *MyModule) Example(name string, secret *dagger.Secret) *dagger.Wolfi  {
	return dag.
			Wolfi().
			WithSecretVariable(name, secret)
}
@function
def example(name: str, secret: dagger.Secret) -> dagger.Wolfi:
	return (
		dag.wolfi()
		.with_secret_variable(name, secret)
	)
@func()
example(name: string, secret: Secret): Wolfi {
	return dag
		.wolfi()
		.withSecretVariable(name, secret)
}