Dagger
Search

docker

No long description provided.

Installation

dagger install github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec

Entrypoint

Return Type
Docker
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
func (m *myModule) example() *Docker  {
	return dag.
			Docker()
}
@function
def example() -> dag.Docker:
	return (
		dag.docker()
	)
@func()
example(): Docker {
	return dag
		.docker()
}

Types

Docker 🔗

Docker exposes APIs for using Docker and Docker related tools.

daemon() 🔗

Daemon returns an API for using a Docker Daemon.

Return Type
Daemon !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 daemon
func (m *myModule) example() *DockerDaemon  {
	return dag.
			Docker().
			Daemon()
}
@function
def example() -> dag.DockerDaemon:
	return (
		dag.docker()
		.daemon()
	)
@func()
example(): DockerDaemon {
	return dag
		.docker()
		.daemon()
}

compose() 🔗

Compose returns an API for using Docker Compose.

Return Type
Compose !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-No description provided
files[String ! ] ["docker-compose.yml"]No description provided
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 compose --dir DIR_PATH
func (m *myModule) example(dir *Directory) *DockerCompose  {
	return dag.
			Docker().
			Compose(dir)
}
@function
def example(dir: dagger.Directory) -> dag.DockerCompose:
	return (
		dag.docker()
		.compose(dir)
	)
@func()
example(dir: Directory): DockerCompose {
	return dag
		.docker()
		.compose(dir)
}

Daemon 🔗

Compose is an API for using a Docker daemon.

version() 🔗

The version of Docker to use.

Return Type
String !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 daemon \
 version
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Docker().
			Daemon().
			Version(ctx)
}
@function
async def example() -> str:
	return await (
		dag.docker()
		.daemon()
		.version()
	)
@func()
async example(): Promise<string> {
	return dag
		.docker()
		.daemon()
		.version()
}

cache() 🔗

An optional cache volume to mount at /var/lib/docker.

Return Type
CacheVolume !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 daemon \
 cache
func (m *myModule) example() *CacheVolume  {
	return dag.
			Docker().
			Daemon().
			Cache()
}
@function
def example() -> dagger.CacheVolume:
	return (
		dag.docker()
		.daemon()
		.cache()
	)
@func()
example(): CacheVolume {
	return dag
		.docker()
		.daemon()
		.cache()
}

withVersion() 🔗

WithVersion allows you to specify a Docker version to use.

Return Type
Daemon !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 daemon \
 with-version --version string
func (m *myModule) example(version string) *DockerDaemon  {
	return dag.
			Docker().
			Daemon().
			WithVersion(version)
}
@function
def example(version: str) -> dag.DockerDaemon:
	return (
		dag.docker()
		.daemon()
		.with_version(version)
	)
@func()
example(version: string): DockerDaemon {
	return dag
		.docker()
		.daemon()
		.withVersion(version)
}

withCache() 🔗

WithCache sets a cache volume to mount at /var/lib/docker.

Return Type
Daemon !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume !-No description provided
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 daemon \
 with-cache --cache VOLUME_NAME
func (m *myModule) example(cache *CacheVolume) *DockerDaemon  {
	return dag.
			Docker().
			Daemon().
			WithCache(cache)
}
@function
def example(cache: dagger.CacheVolume) -> dag.DockerDaemon:
	return (
		dag.docker()
		.daemon()
		.with_cache(cache)
	)
@func()
example(cache: CacheVolume): DockerDaemon {
	return dag
		.docker()
		.daemon()
		.withCache(cache)
}

service() 🔗

Service returns a Docker daemon service.

Return Type
Service !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 daemon \
 service
func (m *myModule) example() *Service  {
	return dag.
			Docker().
			Daemon().
			Service()
}
@function
def example() -> dagger.Service:
	return (
		dag.docker()
		.daemon()
		.service()
	)
@func()
example(): Service {
	return dag
		.docker()
		.daemon()
		.service()
}

Compose 🔗

Compose is an API for using Docker Compose.

dir() 🔗

The directory to use as the context for the Compose project.

Return Type
Directory !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 compose --dir DIR_PATH \
 dir
func (m *myModule) example(dir *Directory) *Directory  {
	return dag.
			Docker().
			Compose(dir).
			Dir()
}
@function
def example(dir: dagger.Directory) -> dagger.Directory:
	return (
		dag.docker()
		.compose(dir)
		.dir()
	)
@func()
example(dir: Directory): Directory {
	return dag
		.docker()
		.compose(dir)
		.dir()
}

files() 🔗

The Compose config files to use, within the directory.

Return Type
[String ! ] !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 compose --dir DIR_PATH \
 files
func (m *myModule) example(ctx context.Context, dir *Directory) []string  {
	return dag.
			Docker().
			Compose(dir).
			Files(ctx)
}
@function
async def example(dir: dagger.Directory) -> List[str]:
	return await (
		dag.docker()
		.compose(dir)
		.files()
	)
@func()
async example(dir: Directory): Promise<string[]> {
	return dag
		.docker()
		.compose(dir)
		.files()
}

env() 🔗

Environment variables to interpolate into the Compose config files.

Return Type
[Env ! ] !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 compose --dir DIR_PATH \
 env
func (m *myModule) example(dir *Directory) []*DockerEnv  {
	return dag.
			Docker().
			Compose(dir).
			Env()
}
@function
def example(dir: dagger.Directory) -> List[dag.DockerEnv]:
	return (
		dag.docker()
		.compose(dir)
		.env()
	)
@func()
example(dir: Directory): DockerEnv[] {
	return dag
		.docker()
		.compose(dir)
		.env()
}

withEnv() 🔗

WithEnv sets an environment variable that may be interpolated into the Compose config files.

Return Type
Compose !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
valString !-No description provided
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 compose --dir DIR_PATH \
 with-env --name string --val string
func (m *myModule) example(dir *Directory, name string, val string) *DockerCompose  {
	return dag.
			Docker().
			Compose(dir).
			WithEnv(name, val)
}
@function
def example(dir: dagger.Directory, name: str, val: str) -> dag.DockerCompose:
	return (
		dag.docker()
		.compose(dir)
		.with_env(name, val)
	)
@func()
example(dir: Directory, name: string, val: string): DockerCompose {
	return dag
		.docker()
		.compose(dir)
		.withEnv(name, val)
}

all() 🔗

All returns a proxy service that forwards traffic to all defined services.

Return Type
Service !
Example
dagger -m github.com/vito/daggerverse/docker@7fca39d2beca4ffa5a169d35cc5aad3c6704f4ec call \
 compose --dir DIR_PATH \
 all
func (m *myModule) example(dir *Directory) *Service  {
	return dag.
			Docker().
			Compose(dir).
			All()
}
@function
def example(dir: dagger.Directory) -> dagger.Service:
	return (
		dag.docker()
		.compose(dir)
		.all()
	)
@func()
example(dir: Directory): Service {
	return dag
		.docker()
		.compose(dir)
		.all()
}

Env 🔗

Env represents an environment variable to interpolate into the Compose config files.

name() 🔗

Return Type
String !
Example
Function DockerEnv.name is not accessible from the docker module
Function DockerEnv.name is not accessible from the docker module
Function DockerEnv.name is not accessible from the docker module
Function DockerEnv.name is not accessible from the docker module

value() 🔗

Return Type
String !
Example
Function DockerEnv.value is not accessible from the docker module
Function DockerEnv.value is not accessible from the docker module
Function DockerEnv.value is not accessible from the docker module
Function DockerEnv.value is not accessible from the docker module