docker-compose
For now, compatibility is limited to the following:- Fully compatible parser
- services.X.image
- services.X.build
- services.X.ports
- services.X.environment
- services.X.entrypoint
- services.X.command
Installation
dagger install github.com/shykes/daggerverse/docker-compose@v0.1.1
Entrypoint
Return Type
DockerCompose
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
func (m *myModule) example() *DockerCompose {
return dag.
DockerCompose()
}
@function
def example() -> dag.DockerCompose:
return (
dag.docker_compose()
)
@func()
example(): DockerCompose {
return dag
.dockerCompose()
}
Types
DockerCompose 🔗
A Dagger module to integrate with Docker Compose
example() 🔗
An example Docker Compose project
Return Type
DockerComposeProject !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
example
func (m *myModule) example() *DockerComposeProject {
return dag.
DockerCompose().
Example()
}
@function
def example() -> dag.DockerComposeProject:
return (
dag.docker_compose()
.example()
)
@func()
example(): DockerComposeProject {
return dag
.dockerCompose()
.example()
}
project() 🔗
Load a Docker Compose project
Return Type
DockerComposeProject !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | The project directory |
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project
func (m *myModule) example() *DockerComposeProject {
return dag.
DockerCompose().
Project()
}
@function
def example() -> dag.DockerComposeProject:
return (
dag.docker_compose()
.project()
)
@func()
example(): DockerComposeProject {
return dag
.dockerCompose()
.project()
}
DockerComposeProject 🔗
A Docker Compose project
configFile() 🔗
Return Type
File !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
config-file
func (m *myModule) example() *File {
return dag.
DockerCompose().
Project().
ConfigFile()
}
@function
def example() -> dagger.File:
return (
dag.docker_compose()
.project()
.config_file()
)
@func()
example(): File {
return dag
.dockerCompose()
.project()
.configFile()
}
config() 🔗
The raw project configuration yaml
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
config
func (m *myModule) example(ctx context.Context) string {
return dag.
DockerCompose().
Project().
Config(ctx)
}
@function
async def example() -> str:
return await (
dag.docker_compose()
.project()
.config()
)
@func()
async example(): Promise<string> {
return dag
.dockerCompose()
.project()
.config()
}
service() 🔗
A Docker Compose Service
Return Type
DockerComposeComposeService !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
service --name string
func (m *myModule) example(name string) *DockerComposeComposeService {
return dag.
DockerCompose().
Project().
Service(name)
}
@function
def example(name: str) -> dag.DockerComposeComposeService:
return (
dag.docker_compose()
.project()
.service(name)
)
@func()
example(name: string): DockerComposeComposeService {
return dag
.dockerCompose()
.project()
.service(name)
}
services() 🔗
Return Type
[DockerComposeComposeService ! ] !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
services
func (m *myModule) example() []*DockerComposeComposeService {
return dag.
DockerCompose().
Project().
Services()
}
@function
def example() -> List[dag.DockerComposeComposeService]:
return (
dag.docker_compose()
.project()
.services()
)
@func()
example(): DockerComposeComposeService[] {
return dag
.dockerCompose()
.project()
.services()
}
DockerComposeComposeService 🔗
A Docker Compose service
project() 🔗
Return Type
DockerComposeProject !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
service --name string \
project
func (m *myModule) example(name string) *DockerComposeProject {
return dag.
DockerCompose().
Project().
Service(name).
Project()
}
@function
def example(name: str) -> dag.DockerComposeProject:
return (
dag.docker_compose()
.project()
.service(name)
.project()
)
@func()
example(name: string): DockerComposeProject {
return dag
.dockerCompose()
.project()
.service(name)
.project()
}
name() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
service --name string \
name
func (m *myModule) example(ctx context.Context, name string) string {
return dag.
DockerCompose().
Project().
Service(name).
Name(ctx)
}
@function
async def example(name: str) -> str:
return await (
dag.docker_compose()
.project()
.service(name)
.name()
)
@func()
async example(name: string): Promise<string> {
return dag
.dockerCompose()
.project()
.service(name)
.name()
}
config() 🔗
The service configuration, encoded as YAML
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
service --name string \
config
func (m *myModule) example(ctx context.Context, name string) string {
return dag.
DockerCompose().
Project().
Service(name).
Config(ctx)
}
@function
async def example(name: str) -> str:
return await (
dag.docker_compose()
.project()
.service(name)
.config()
)
@func()
async example(name: string): Promise<string> {
return dag
.dockerCompose()
.project()
.service(name)
.config()
}
baseContainer() 🔗
The container for this docker compose service, without compose-specific modifications
Return Type
Container !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
service --name string \
base-container
func (m *myModule) example(name string) *Container {
return dag.
DockerCompose().
Project().
Service(name).
BaseContainer()
}
@function
def example(name: str) -> dagger.Container:
return (
dag.docker_compose()
.project()
.service(name)
.base_container()
)
@func()
example(name: string): Container {
return dag
.dockerCompose()
.project()
.service(name)
.baseContainer()
}
up() 🔗
Bring the compose service up, running its container directly on the Dagger Engine
Return Type
Service !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
service --name string \
up
func (m *myModule) example(name string) *Service {
return dag.
DockerCompose().
Project().
Service(name).
Up()
}
@function
def example(name: str) -> dagger.Service:
return (
dag.docker_compose()
.project()
.service(name)
.up()
)
@func()
example(name: string): Service {
return dag
.dockerCompose()
.project()
.service(name)
.up()
}
container() 🔗
The container for this service
Return Type
Container !
Example
dagger -m github.com/shykes/daggerverse/docker-compose@c448f929b53be0f09eafe884cc77612a6d6fc7f9 call \
project \
service --name string \
container
func (m *myModule) example(name string) *Container {
return dag.
DockerCompose().
Project().
Service(name).
Container()
}
@function
def example(name: str) -> dagger.Container:
return (
dag.docker_compose()
.project()
.service(name)
.container()
)
@func()
example(name: string): Container {
return dag
.dockerCompose()
.project()
.service(name)
.container()
}