Docker.Commands.Compose.Common (docker_wrapper v0.1.2)

Copy Markdown View Source

Shared fields and arg helpers for compose subcommands.

All compose commands support project-level options like -f (file), -p (project name), and --env-file. This module provides macros and functions to avoid duplicating that logic.

Summary

Functions

Common compose fields to include in defstruct.

Builds the compose prefix args from common fields.

Functions

compose_fields(extra \\ [])

(macro)

Common compose fields to include in defstruct.

compose_prefix(cmd)

@spec compose_prefix(struct()) :: [String.t()]

Builds the compose prefix args from common fields.

Returns ["compose", "-f", file, "-p", project, ...] with only non-nil values included.