Dagger
Search

docker-to-dagger

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/samalba/dagger-modules/docker2dagger@3b4ec258aeef7496da5e0481c977c8853234f4b9

Entrypoint

Return Type
DockerToDagger
Example
dagger -m github.com/samalba/dagger-modules/docker2dagger@3b4ec258aeef7496da5e0481c977c8853234f4b9 call \
func (m *myModule) example() *DockerToDagger  {
	return dag.
			DockerToDagger()
}
@function
def example() -> dag.DockerToDagger:
	return (
		dag.docker_to_dagger()
	)
@func()
example(): DockerToDagger {
	return dag
		.dockerToDagger()
}

Types

DockerToDagger 🔗

fromDockerfile() 🔗

Convert a Dockerfile into a new Dagger module

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
anthropicApiKeySecret !-No description provided
dockerfileFile !-No description provided
Example
dagger -m github.com/samalba/dagger-modules/docker2dagger@3b4ec258aeef7496da5e0481c977c8853234f4b9 call \
 from-dockerfile --anthropic-api-key env:MYSECRET --dockerfile file:path
func (m *myModule) example(anthropicApiKey *Secret, dockerfile *File) *Directory  {
	return dag.
			DockerToDagger().
			FromDockerfile(anthropicApiKey, dockerfile)
}
@function
def example(anthropic_api_key: dagger.Secret, dockerfile: dagger.File) -> dagger.Directory:
	return (
		dag.docker_to_dagger()
		.from_dockerfile(anthropic_api_key, dockerfile)
	)
@func()
example(anthropicApiKey: Secret, dockerfile: File): Directory {
	return dag
		.dockerToDagger()
		.fromDockerfile(anthropicApiKey, dockerfile)
}