wolfi
This module has been generated via dagger init and serves as a reference tobasic 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@ba8198f60972f6e9cf10dffc56b41498a8ddd081
Entrypoint
Return Type
Wolfi !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | Source directory |
githubActions | Boolean | false | Enable GitHub Actions |
githubActor | String | "" | GitHub Actor |
githubRepository | String | "" | The owner and repository name |
githubRepositoryOwner | String | "" | The repository owner's username |
githubToken | Secret | null | GitHub Token |
githubOidcProviderToken | Secret | null | GitHub OIDC provider Token |
githubOidcProviderUrl | Secret | null | GitHub OIDC provider URL |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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 🔗
Wolfi Pipeline
apko() 🔗
Return the apko container
Return Type
Container !
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | APKO config file |
platform | [Scalar ! ] | null | Platforms |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 call \
build --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.Directory {
return dag.
Wolfi().
Build(config)
}
@function
def example(config: dagger.File) -> dagger.Directory:
return (
dag.wolfi()
.build(config)
)
@func()
example(config: File): Directory {
return dag
.wolfi()
.build(config)
}
config() 🔗
Return the Apko config derived from loading a YAML file
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | A file. |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | APKO config file |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 call \
container --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.Container {
return dag.
Wolfi().
Container(config)
}
@function
def example(config: dagger.File) -> dagger.Container:
return (
dag.wolfi()
.container(config)
)
@func()
example(config: File): Container {
return dag
.wolfi()
.container(config)
}
cosign() 🔗
Return the cosign container
Return Type
Container !
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | APKO config file |
tag | [String ! ] ! | [] | Image tags |
version | String ! | "" | Image version. Used when no tags provided |
platform | [Scalar ! ] | null | Platforms |
scan | Boolean ! | true | Scan the image for vulnerabilities |
scanFailOn | String ! | "" | Fails if a vulnerability is found with a severity >= the given severity |
sign | Boolean ! | false | Sign the image with cosign |
cosignAnnotations | [String ! ] | [] | Extra key=value pairs to sign |
cosignKey | Secret | null | Private key to use for image signing |
cosignPassword | Secret | null | Password used to decrypt the Cosign Private key |
oidcProvider | String ! | "" | Specify the provider to get the OIDC token from |
force | Boolean | false | Force image publishing (invalidate cache) |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 call \
publish --config file:path --tag string1 --tag string2 --version string --scan boolean --scan-fail-on string --sign boolean --oidc-provider string
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, version string, scan bool, scanFailOn string, sign bool, oidcProvider string) string {
return dag.
Wolfi().
Publish(ctx, config, tag, version, scan, scanFailOn, sign, oidcProvider)
}
@function
async def example(config: dagger.File, tag: List[str], version: str, scan: bool, scan_fail_on: str, sign: bool, oidc_provider: str) -> str:
return await (
dag.wolfi()
.publish(config, tag, version, scan, scan_fail_on, sign, oidc_provider)
)
@func()
async example(config: File, tag: string[], version: string, scan: boolean, scanFailOn: string, sign: boolean, oidcProvider: string): Promise<string> {
return dag
.wolfi()
.publish(config, tag, version, scan, scanFailOn, sign, oidcProvider)
}
sbom() 🔗
Return the SBOM for the sepecified image config file
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | APKO config file |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 call \
sbom --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.File {
return dag.
Wolfi().
Sbom(config)
}
@function
def example(config: dagger.File) -> dagger.File:
return (
dag.wolfi()
.sbom(config)
)
@func()
example(config: File): File {
return dag
.wolfi()
.sbom(config)
}
scan() 🔗
Scan an image built from a YAML config file for vulnerabilities
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | APKO config file |
failOn | String ! | "" | Fails if a vulnerability is found with a severity >= the given severity |
format | String ! | "table" | Output format |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 call \
scan --config file:path --fail-on string --format string
func (m *MyModule) Example(config *dagger.File, failOn string, format string) *dagger.File {
return dag.
Wolfi().
Scan(config, failOn, format)
}
@function
def example(config: dagger.File, fail_on: str, format: str) -> dagger.File:
return (
dag.wolfi()
.scan(config, fail_on, format)
)
@func()
example(config: File, failOn: string, format: string): File {
return dag
.wolfi()
.scan(config, failOn, format)
}
scanImage() 🔗
Scan an image for vulnerabilities
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
address | String ! | - | Address of the image to scan |
failOn | String ! | "" | Fails if a vulnerability is found with a severity >= the given severity |
format | String ! | "table" | Output format |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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
Name | Type | Default Value | Description |
---|---|---|---|
source | Socket ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | Name of the environment variable |
value | String ! | - | Value of the environment variable |
expand | Boolean | false | Replace “${VAR}” or “$VAR” in the value according to the current environment variables defined in the container |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | Registry username |
secret | Secret ! | - | Registry password |
address | String ! | "ghcr.io" | Registry host |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | Name of the secret variable |
secret | Secret ! | - | Identifier of the secret value |
Example
dagger -m github.com/opopops/wolfi@ba8198f60972f6e9cf10dffc56b41498a8ddd081 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)
}