Full Code of docker/compose for AI

main b043368028e9 cached
650 files
1.8 MB
509.4k tokens
2199 symbols
1 requests
Download .txt
Showing preview only (1,976K chars total). Download the full file or copy to clipboard to get everything.
Repository: docker/compose
Branch: main
Commit: b043368028e9
Files: 650
Total size: 1.8 MB

Directory structure:
gitextract_6bdxpuyg/

├── .dockerignore
├── .gitattributes
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.yaml
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── SECURITY.md
│   ├── dependabot.yml
│   ├── stale.yml
│   └── workflows/
│       ├── ci.yml
│       ├── docs-upstream.yml
│       ├── merge.yml
│       ├── scorecards.yml
│       └── stale.yml
├── .gitignore
├── .go-version
├── .golangci.yml
├── BUILDING.md
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── Makefile
├── NOTICE
├── README.md
├── cmd/
│   ├── cmdtrace/
│   │   ├── cmd_span.go
│   │   └── cmd_span_test.go
│   ├── compatibility/
│   │   ├── convert.go
│   │   └── convert_test.go
│   ├── compose/
│   │   ├── alpha.go
│   │   ├── attach.go
│   │   ├── bridge.go
│   │   ├── build.go
│   │   ├── commit.go
│   │   ├── completion.go
│   │   ├── compose.go
│   │   ├── compose_oci_test.go
│   │   ├── compose_test.go
│   │   ├── config.go
│   │   ├── cp.go
│   │   ├── create.go
│   │   ├── down.go
│   │   ├── events.go
│   │   ├── exec.go
│   │   ├── export.go
│   │   ├── generate.go
│   │   ├── images.go
│   │   ├── kill.go
│   │   ├── list.go
│   │   ├── logs.go
│   │   ├── options.go
│   │   ├── options_test.go
│   │   ├── pause.go
│   │   ├── port.go
│   │   ├── ps.go
│   │   ├── publish.go
│   │   ├── pull.go
│   │   ├── pullOptions_test.go
│   │   ├── push.go
│   │   ├── remove.go
│   │   ├── restart.go
│   │   ├── run.go
│   │   ├── scale.go
│   │   ├── start.go
│   │   ├── stats.go
│   │   ├── stop.go
│   │   ├── top.go
│   │   ├── top_test.go
│   │   ├── up.go
│   │   ├── up_test.go
│   │   ├── version.go
│   │   ├── version_test.go
│   │   ├── viz.go
│   │   ├── viz_test.go
│   │   ├── volumes.go
│   │   ├── wait.go
│   │   └── watch.go
│   ├── display/
│   │   ├── colors.go
│   │   ├── dryrun.go
│   │   ├── json.go
│   │   ├── json_test.go
│   │   ├── mode.go
│   │   ├── plain.go
│   │   ├── quiet.go
│   │   ├── spinner.go
│   │   ├── tty.go
│   │   └── tty_test.go
│   ├── formatter/
│   │   ├── ansi.go
│   │   ├── colors.go
│   │   ├── consts.go
│   │   ├── container.go
│   │   ├── formatter.go
│   │   ├── formatter_test.go
│   │   ├── json.go
│   │   ├── logs.go
│   │   ├── pretty.go
│   │   ├── shortcut.go
│   │   ├── shortcut_unix.go
│   │   └── shortcut_windows.go
│   ├── main.go
│   └── prompt/
│       ├── prompt.go
│       └── prompt_mock.go
├── codecov.yml
├── docker-bake.hcl
├── docs/
│   ├── examples/
│   │   └── provider.go
│   ├── extension.md
│   ├── reference/
│   │   ├── compose.md
│   │   ├── compose_alpha.md
│   │   ├── compose_alpha_dry-run.md
│   │   ├── compose_alpha_generate.md
│   │   ├── compose_alpha_publish.md
│   │   ├── compose_alpha_scale.md
│   │   ├── compose_alpha_viz.md
│   │   ├── compose_alpha_watch.md
│   │   ├── compose_attach.md
│   │   ├── compose_bridge.md
│   │   ├── compose_bridge_convert.md
│   │   ├── compose_bridge_transformations.md
│   │   ├── compose_bridge_transformations_create.md
│   │   ├── compose_bridge_transformations_list.md
│   │   ├── compose_build.md
│   │   ├── compose_commit.md
│   │   ├── compose_config.md
│   │   ├── compose_cp.md
│   │   ├── compose_create.md
│   │   ├── compose_down.md
│   │   ├── compose_events.md
│   │   ├── compose_exec.md
│   │   ├── compose_export.md
│   │   ├── compose_images.md
│   │   ├── compose_kill.md
│   │   ├── compose_logs.md
│   │   ├── compose_ls.md
│   │   ├── compose_pause.md
│   │   ├── compose_port.md
│   │   ├── compose_ps.md
│   │   ├── compose_publish.md
│   │   ├── compose_pull.md
│   │   ├── compose_push.md
│   │   ├── compose_restart.md
│   │   ├── compose_rm.md
│   │   ├── compose_run.md
│   │   ├── compose_scale.md
│   │   ├── compose_start.md
│   │   ├── compose_stats.md
│   │   ├── compose_stop.md
│   │   ├── compose_top.md
│   │   ├── compose_unpause.md
│   │   ├── compose_up.md
│   │   ├── compose_version.md
│   │   ├── compose_volumes.md
│   │   ├── compose_wait.md
│   │   ├── compose_watch.md
│   │   ├── docker_compose.yaml
│   │   ├── docker_compose_alpha.yaml
│   │   ├── docker_compose_alpha_dry-run.yaml
│   │   ├── docker_compose_alpha_generate.yaml
│   │   ├── docker_compose_alpha_publish.yaml
│   │   ├── docker_compose_alpha_scale.yaml
│   │   ├── docker_compose_alpha_viz.yaml
│   │   ├── docker_compose_alpha_watch.yaml
│   │   ├── docker_compose_attach.yaml
│   │   ├── docker_compose_bridge.yaml
│   │   ├── docker_compose_bridge_convert.yaml
│   │   ├── docker_compose_bridge_transformations.yaml
│   │   ├── docker_compose_bridge_transformations_create.yaml
│   │   ├── docker_compose_bridge_transformations_list.yaml
│   │   ├── docker_compose_build.yaml
│   │   ├── docker_compose_commit.yaml
│   │   ├── docker_compose_config.yaml
│   │   ├── docker_compose_convert.yaml
│   │   ├── docker_compose_cp.yaml
│   │   ├── docker_compose_create.yaml
│   │   ├── docker_compose_down.yaml
│   │   ├── docker_compose_events.yaml
│   │   ├── docker_compose_exec.yaml
│   │   ├── docker_compose_export.yaml
│   │   ├── docker_compose_images.yaml
│   │   ├── docker_compose_kill.yaml
│   │   ├── docker_compose_logs.yaml
│   │   ├── docker_compose_ls.yaml
│   │   ├── docker_compose_pause.yaml
│   │   ├── docker_compose_port.yaml
│   │   ├── docker_compose_ps.yaml
│   │   ├── docker_compose_publish.yaml
│   │   ├── docker_compose_pull.yaml
│   │   ├── docker_compose_push.yaml
│   │   ├── docker_compose_restart.yaml
│   │   ├── docker_compose_rm.yaml
│   │   ├── docker_compose_run.yaml
│   │   ├── docker_compose_scale.yaml
│   │   ├── docker_compose_start.yaml
│   │   ├── docker_compose_stats.yaml
│   │   ├── docker_compose_stop.yaml
│   │   ├── docker_compose_top.yaml
│   │   ├── docker_compose_unpause.yaml
│   │   ├── docker_compose_up.yaml
│   │   ├── docker_compose_version.yaml
│   │   ├── docker_compose_volumes.yaml
│   │   ├── docker_compose_wait.yaml
│   │   └── docker_compose_watch.yaml
│   ├── sdk.md
│   └── yaml/
│       └── main/
│           └── generate.go
├── go.mod
├── go.sum
├── internal/
│   ├── desktop/
│   │   ├── client.go
│   │   └── client_test.go
│   ├── experimental/
│   │   └── experimental.go
│   ├── locker/
│   │   ├── pidfile.go
│   │   ├── pidfile_unix.go
│   │   ├── pidfile_windows.go
│   │   ├── runtime.go
│   │   ├── runtime_darwin.go
│   │   ├── runtime_unix.go
│   │   └── runtime_windows.go
│   ├── memnet/
│   │   ├── conn.go
│   │   ├── conn_unix.go
│   │   └── conn_windows.go
│   ├── oci/
│   │   ├── push.go
│   │   └── resolver.go
│   ├── paths/
│   │   └── paths.go
│   ├── registry/
│   │   └── registry.go
│   ├── sync/
│   │   ├── shared.go
│   │   └── tar.go
│   ├── tracing/
│   │   ├── attributes.go
│   │   ├── attributes_test.go
│   │   ├── docker_context.go
│   │   ├── errors.go
│   │   ├── keyboard_metrics.go
│   │   ├── mux.go
│   │   ├── tracing.go
│   │   ├── tracing_test.go
│   │   └── wrap.go
│   └── variables.go
└── pkg/
    ├── api/
    │   ├── api.go
    │   ├── api_test.go
    │   ├── context.go
    │   ├── env.go
    │   ├── errors.go
    │   ├── errors_test.go
    │   ├── event.go
    │   ├── labels.go
    │   └── labels_test.go
    ├── bridge/
    │   ├── convert.go
    │   └── transformers.go
    ├── compose/
    │   ├── apiSocket.go
    │   ├── api_versions.go
    │   ├── attach.go
    │   ├── attach_service.go
    │   ├── build.go
    │   ├── build_bake.go
    │   ├── build_classic.go
    │   ├── build_test.go
    │   ├── commit.go
    │   ├── compose.go
    │   ├── container.go
    │   ├── containers.go
    │   ├── convergence.go
    │   ├── convergence_test.go
    │   ├── convert.go
    │   ├── cp.go
    │   ├── create.go
    │   ├── create_test.go
    │   ├── dependencies.go
    │   ├── dependencies_test.go
    │   ├── desktop.go
    │   ├── docker_cli_providers.go
    │   ├── down.go
    │   ├── down_test.go
    │   ├── envresolver.go
    │   ├── envresolver_test.go
    │   ├── events.go
    │   ├── exec.go
    │   ├── export.go
    │   ├── filters.go
    │   ├── generate.go
    │   ├── hash.go
    │   ├── hash_test.go
    │   ├── hook.go
    │   ├── hook_test.go
    │   ├── image_pruner.go
    │   ├── images.go
    │   ├── images_test.go
    │   ├── kill.go
    │   ├── kill_test.go
    │   ├── loader.go
    │   ├── loader_test.go
    │   ├── logs.go
    │   ├── logs_test.go
    │   ├── ls.go
    │   ├── ls_test.go
    │   ├── model.go
    │   ├── monitor.go
    │   ├── pause.go
    │   ├── plugins.go
    │   ├── plugins_windows.go
    │   ├── port.go
    │   ├── printer.go
    │   ├── progress.go
    │   ├── ps.go
    │   ├── ps_test.go
    │   ├── publish.go
    │   ├── publish_test.go
    │   ├── pull.go
    │   ├── push.go
    │   ├── remove.go
    │   ├── restart.go
    │   ├── run.go
    │   ├── scale.go
    │   ├── secrets.go
    │   ├── shellout.go
    │   ├── start.go
    │   ├── stop.go
    │   ├── stop_test.go
    │   ├── suffix_unix.go
    │   ├── testdata/
    │   │   ├── compose.yaml
    │   │   └── publish/
    │   │       ├── common.yaml
    │   │       ├── compose.yaml
    │   │       └── test.env
    │   ├── top.go
    │   ├── transform/
    │   │   ├── replace.go
    │   │   └── replace_test.go
    │   ├── up.go
    │   ├── viz.go
    │   ├── viz_test.go
    │   ├── volumes.go
    │   ├── volumes_test.go
    │   ├── wait.go
    │   ├── watch.go
    │   └── watch_test.go
    ├── dryrun/
    │   └── dryrunclient.go
    ├── e2e/
    │   ├── assert.go
    │   ├── bridge_test.go
    │   ├── build_test.go
    │   ├── cancel_test.go
    │   ├── cascade_test.go
    │   ├── commit_test.go
    │   ├── compose_environment_test.go
    │   ├── compose_exec_test.go
    │   ├── compose_run_build_once_test.go
    │   ├── compose_run_test.go
    │   ├── compose_test.go
    │   ├── compose_up_test.go
    │   ├── config_test.go
    │   ├── configs_test.go
    │   ├── container_name_test.go
    │   ├── cp_test.go
    │   ├── e2e_config_plugin.go
    │   ├── e2e_config_standalone.go
    │   ├── env_file_test.go
    │   ├── exec_test.go
    │   ├── export_test.go
    │   ├── expose_test.go
    │   ├── fixtures/
    │   │   ├── attach-restart/
    │   │   │   └── compose.yaml
    │   │   ├── bridge/
    │   │   │   ├── Dockerfile
    │   │   │   ├── compose.yaml
    │   │   │   ├── expected-helm/
    │   │   │   │   ├── Chart.yaml
    │   │   │   │   ├── templates/
    │   │   │   │   │   ├── 0-bridge-namespace.yaml
    │   │   │   │   │   ├── bridge-configs.yaml
    │   │   │   │   │   ├── my-secrets-secret.yaml
    │   │   │   │   │   ├── private-network-network-policy.yaml
    │   │   │   │   │   ├── public-network-network-policy.yaml
    │   │   │   │   │   ├── serviceA-deployment.yaml
    │   │   │   │   │   ├── serviceA-expose.yaml
    │   │   │   │   │   ├── serviceA-service.yaml
    │   │   │   │   │   ├── serviceB-deployment.yaml
    │   │   │   │   │   ├── serviceB-expose.yaml
    │   │   │   │   │   └── serviceB-service.yaml
    │   │   │   │   └── values.yaml
    │   │   │   ├── expected-kubernetes/
    │   │   │   │   ├── base/
    │   │   │   │   │   ├── 0-bridge-namespace.yaml
    │   │   │   │   │   ├── bridge-configs.yaml
    │   │   │   │   │   ├── kustomization.yaml
    │   │   │   │   │   ├── my-secrets-secret.yaml
    │   │   │   │   │   ├── private-network-network-policy.yaml
    │   │   │   │   │   ├── public-network-network-policy.yaml
    │   │   │   │   │   ├── serviceA-deployment.yaml
    │   │   │   │   │   ├── serviceA-expose.yaml
    │   │   │   │   │   ├── serviceA-service.yaml
    │   │   │   │   │   ├── serviceB-deployment.yaml
    │   │   │   │   │   ├── serviceB-expose.yaml
    │   │   │   │   │   └── serviceB-service.yaml
    │   │   │   │   └── overlays/
    │   │   │   │       └── desktop/
    │   │   │   │           ├── kustomization.yaml
    │   │   │   │           ├── serviceA-service.yaml
    │   │   │   │           └── serviceB-service.yaml
    │   │   │   ├── my-config.txt
    │   │   │   └── not-so-secret.txt
    │   │   ├── build-dependencies/
    │   │   │   ├── base.dockerfile
    │   │   │   ├── classic.yaml
    │   │   │   ├── compose-depends_on.yaml
    │   │   │   ├── compose.yaml
    │   │   │   ├── hello.txt
    │   │   │   └── service.dockerfile
    │   │   ├── build-infinite/
    │   │   │   ├── compose.yaml
    │   │   │   └── service1/
    │   │   │       └── Dockerfile
    │   │   ├── build-test/
    │   │   │   ├── compose.yaml
    │   │   │   ├── dependencies/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── entitlements/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── escaped/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── long-output-line/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── minimal/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── multi-args/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── nginx-build/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── static/
    │   │   │   │       └── index.html
    │   │   │   ├── nginx-build2/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── static2/
    │   │   │   │       └── index.html
    │   │   │   ├── platforms/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose-multiple-platform-builds.yaml
    │   │   │   │   ├── compose-service-platform-and-no-build-platforms.yaml
    │   │   │   │   ├── compose-service-platform-not-in-build-platforms.yaml
    │   │   │   │   ├── compose-unsupported-platform.yml
    │   │   │   │   ├── compose.yaml
    │   │   │   │   ├── contextServiceA/
    │   │   │   │   │   └── Dockerfile
    │   │   │   │   ├── contextServiceB/
    │   │   │   │   │   └── Dockerfile
    │   │   │   │   └── contextServiceC/
    │   │   │   │       └── Dockerfile
    │   │   │   ├── privileged/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── profiles/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose.yaml
    │   │   │   │   └── test-secret.txt
    │   │   │   ├── secrets/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose.yml
    │   │   │   │   └── secret.txt
    │   │   │   ├── ssh/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose-without-ssh.yaml
    │   │   │   │   ├── compose.yaml
    │   │   │   │   ├── fake_rsa
    │   │   │   │   └── fake_rsa.pub
    │   │   │   ├── sub-dependencies/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── subset/
    │   │   │   │   └── compose.yaml
    │   │   │   └── tags/
    │   │   │       ├── Dockerfile
    │   │   │       └── compose.yaml
    │   │   ├── cascade/
    │   │   │   └── compose.yaml
    │   │   ├── commit/
    │   │   │   └── compose.yaml
    │   │   ├── compose-pull/
    │   │   │   ├── duplicate-images/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── image-present-locally/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── no-image-name-given/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── simple/
    │   │   │   │   └── compose.yaml
    │   │   │   └── unknown-image/
    │   │   │       ├── Dockerfile
    │   │   │       └── compose.yaml
    │   │   ├── config/
    │   │   │   └── compose.yaml
    │   │   ├── configs/
    │   │   │   ├── compose.yaml
    │   │   │   └── config.txt
    │   │   ├── container_name/
    │   │   │   └── compose.yaml
    │   │   ├── cp-test/
    │   │   │   ├── compose.yaml
    │   │   │   ├── cp-folder/
    │   │   │   │   └── cp-me.txt
    │   │   │   └── cp-me.txt
    │   │   ├── dependencies/
    │   │   │   ├── Dockerfile
    │   │   │   ├── compose.yaml
    │   │   │   ├── dependency-exit.yaml
    │   │   │   ├── deps-completed-successfully.yaml
    │   │   │   ├── deps-not-required.yaml
    │   │   │   ├── recreate-no-deps.yaml
    │   │   │   └── service-image-depends-on.yaml
    │   │   ├── dotenv/
    │   │   │   ├── development/
    │   │   │   │   └── compose.yaml
    │   │   │   └── raw.yaml
    │   │   ├── env-secret/
    │   │   │   ├── child/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── secret.env
    │   │   ├── env_file/
    │   │   │   ├── compose.yaml
    │   │   │   └── test.env
    │   │   ├── environment/
    │   │   │   ├── empty-variable/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── env-file-comments/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── env-interpolation/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── env-interpolation-default-value/
    │   │   │   │   └── compose.yaml
    │   │   │   └── env-priority/
    │   │   │       ├── Dockerfile
    │   │   │       ├── compose-with-env-file.yaml
    │   │   │       ├── compose-with-env.yaml
    │   │   │       └── compose.yaml
    │   │   ├── exec/
    │   │   │   └── compose.yaml
    │   │   ├── export/
    │   │   │   └── compose.yaml
    │   │   ├── external/
    │   │   │   └── compose.yaml
    │   │   ├── hooks/
    │   │   │   ├── compose.yaml
    │   │   │   ├── poststart/
    │   │   │   │   ├── compose-error.yaml
    │   │   │   │   └── compose-success.yaml
    │   │   │   └── prestop/
    │   │   │       ├── compose-error.yaml
    │   │   │       └── compose-success.yaml
    │   │   ├── image-volume-recreate/
    │   │   │   ├── Dockerfile
    │   │   │   └── compose.yaml
    │   │   ├── init-container/
    │   │   │   └── compose.yaml
    │   │   ├── ipam/
    │   │   │   └── compose.yaml
    │   │   ├── ipc-test/
    │   │   │   └── compose.yaml
    │   │   ├── links/
    │   │   │   └── compose.yaml
    │   │   ├── logging-driver/
    │   │   │   └── compose.yaml
    │   │   ├── logs-test/
    │   │   │   ├── cat.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── restart.yaml
    │   │   ├── model/
    │   │   │   └── compose.yaml
    │   │   ├── nested/
    │   │   │   └── compose.yaml
    │   │   ├── network-alias/
    │   │   │   └── compose.yaml
    │   │   ├── network-interface-name/
    │   │   │   └── compose.yaml
    │   │   ├── network-links/
    │   │   │   └── compose.yaml
    │   │   ├── network-recreate/
    │   │   │   └── compose.yaml
    │   │   ├── network-test/
    │   │   │   ├── compose.subnet.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── mac_address.yaml
    │   │   ├── no-deps/
    │   │   │   ├── network-mode.yaml
    │   │   │   └── volume-from.yaml
    │   │   ├── orphans/
    │   │   │   └── compose.yaml
    │   │   ├── pause/
    │   │   │   └── compose.yaml
    │   │   ├── port-range/
    │   │   │   └── compose.yaml
    │   │   ├── profiles/
    │   │   │   ├── compose.yaml
    │   │   │   ├── docker-compose.yaml
    │   │   │   └── test-profile.env
    │   │   ├── project-volume-bind-test/
    │   │   │   └── docker-compose.yml
    │   │   ├── providers/
    │   │   │   └── depends-on-multiple-providers.yaml
    │   │   ├── ps-test/
    │   │   │   └── compose.yaml
    │   │   ├── publish/
    │   │   │   ├── Dockerfile
    │   │   │   ├── common.yaml
    │   │   │   ├── compose-bind-mount.yml
    │   │   │   ├── compose-build-only.yml
    │   │   │   ├── compose-env-file.yml
    │   │   │   ├── compose-environment.yml
    │   │   │   ├── compose-local-include.yml
    │   │   │   ├── compose-multi-env-config.yml
    │   │   │   ├── compose-sensitive.yml
    │   │   │   ├── compose-with-extends.yml
    │   │   │   ├── config.txt
    │   │   │   ├── oci/
    │   │   │   │   ├── compose-override.yaml
    │   │   │   │   ├── compose.yaml
    │   │   │   │   ├── extends.yaml
    │   │   │   │   └── test.env
    │   │   │   ├── publish-sensitive.env
    │   │   │   ├── publish.env
    │   │   │   └── secret.txt
    │   │   ├── recreate-volumes/
    │   │   │   ├── bind.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── compose2.yaml
    │   │   ├── resources/
    │   │   │   └── compose.yaml
    │   │   ├── restart-test/
    │   │   │   ├── compose-depends-on.yaml
    │   │   │   └── compose.yaml
    │   │   ├── run-test/
    │   │   │   ├── build-once-nested.yaml
    │   │   │   ├── build-once-no-deps.yaml
    │   │   │   ├── build-once.yaml
    │   │   │   ├── compose.yaml
    │   │   │   ├── deps.yaml
    │   │   │   ├── orphan.yaml
    │   │   │   ├── piped-test.yaml
    │   │   │   ├── ports.yaml
    │   │   │   ├── pull.yaml
    │   │   │   ├── quiet-pull.yaml
    │   │   │   └── run.env
    │   │   ├── scale/
    │   │   │   ├── Dockerfile
    │   │   │   ├── build.yaml
    │   │   │   └── compose.yaml
    │   │   ├── sentences/
    │   │   │   └── compose.yaml
    │   │   ├── simple-build-test/
    │   │   │   ├── compose-interpolate.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── nginx-build/
    │   │   │       ├── Dockerfile
    │   │   │       └── static/
    │   │   │           └── index.html
    │   │   ├── simple-composefile/
    │   │   │   ├── compose.yaml
    │   │   │   └── id.yaml
    │   │   ├── start-fail/
    │   │   │   ├── compose.yaml
    │   │   │   └── start-depends_on-long-lived.yaml
    │   │   ├── start-stop/
    │   │   │   ├── compose.yaml
    │   │   │   ├── other.yaml
    │   │   │   └── start-stop-deps.yaml
    │   │   ├── start_interval/
    │   │   │   └── compose.yaml
    │   │   ├── stdout-stderr/
    │   │   │   ├── compose.yaml
    │   │   │   └── log_to_stderr.sh
    │   │   ├── stop/
    │   │   │   └── compose.yaml
    │   │   ├── switch-volumes/
    │   │   │   ├── compose.yaml
    │   │   │   └── compose2.yaml
    │   │   ├── ups-deps-stop/
    │   │   │   ├── compose.yaml
    │   │   │   └── orphan.yaml
    │   │   ├── volume-test/
    │   │   │   ├── compose.yaml
    │   │   │   ├── nginx-build/
    │   │   │   │   └── Dockerfile
    │   │   │   └── static/
    │   │   │       └── index.html
    │   │   ├── volumes/
    │   │   │   └── compose.yaml
    │   │   ├── wait/
    │   │   │   └── compose.yaml
    │   │   ├── watch/
    │   │   │   ├── compose.yaml
    │   │   │   ├── config/
    │   │   │   │   └── file.config
    │   │   │   ├── data/
    │   │   │   │   └── hello.txt
    │   │   │   ├── data-logs/
    │   │   │   │   └── server.log
    │   │   │   ├── exec.yaml
    │   │   │   ├── include.yaml
    │   │   │   ├── rebuild.yaml
    │   │   │   ├── with-external-network.yaml
    │   │   │   └── x-initialSync.yaml
    │   │   └── wrong-composefile/
    │   │       ├── build-error.yml
    │   │       ├── compose.yaml
    │   │       ├── service1/
    │   │       │   └── Dockerfile
    │   │       └── unknown-image.yml
    │   ├── framework.go
    │   ├── healthcheck_test.go
    │   ├── hooks_test.go
    │   ├── ipc_test.go
    │   ├── logs_test.go
    │   ├── main_test.go
    │   ├── model_test.go
    │   ├── networks_test.go
    │   ├── noDeps_test.go
    │   ├── orphans_test.go
    │   ├── pause_test.go
    │   ├── profiles_test.go
    │   ├── providers_test.go
    │   ├── ps_test.go
    │   ├── publish_test.go
    │   ├── pull_test.go
    │   ├── recreate_no_deps_test.go
    │   ├── restart_test.go
    │   ├── scale_test.go
    │   ├── secrets_test.go
    │   ├── start_stop_test.go
    │   ├── up_test.go
    │   ├── volumes_test.go
    │   ├── wait_test.go
    │   └── watch_test.go
    ├── mocks/
    │   ├── mock_docker_api.go
    │   ├── mock_docker_cli.go
    │   └── mock_docker_compose_api.go
    ├── remote/
    │   ├── cache.go
    │   ├── cache_darwin.go
    │   ├── cache_unix.go
    │   ├── cache_windows.go
    │   ├── git.go
    │   ├── git_test.go
    │   ├── oci.go
    │   └── oci_test.go
    ├── utils/
    │   ├── durationutils.go
    │   ├── safebuffer.go
    │   ├── set.go
    │   ├── set_test.go
    │   ├── stringutils.go
    │   ├── writer.go
    │   └── writer_test.go
    └── watch/
        ├── debounce.go
        ├── debounce_test.go
        ├── dockerignore.go
        ├── dockerignore_test.go
        ├── ephemeral.go
        ├── ephemeral_test.go
        ├── notify.go
        ├── notify_test.go
        ├── paths.go
        ├── paths_test.go
        ├── temp.go
        ├── temp_dir_fixture.go
        ├── watcher_darwin.go
        ├── watcher_darwin_test.go
        ├── watcher_naive.go
        ├── watcher_naive_test.go
        ├── watcher_nonwin.go
        └── watcher_windows.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
bin/


================================================
FILE: .gitattributes
================================================
core.autocrlf false
*.golden text eol=lf


================================================
FILE: .github/CODEOWNERS
================================================
# global rules
* @docker/compose-maintainers

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: 🐞 Bug
description: File a bug/issue
title: "[BUG] <title>"
labels: ['status/0-triage', 'kind/bug']
body:
  - type: textarea
    attributes:
      label: Description
      description: |
        Briefly describe the problem you are having.

        Include both the current behavior (what you are seeing) as well as what you expected to happen.
    validations:
      required: true
  - type: markdown
    attributes:
      value: |
        [Docker Swarm](https://www.mirantis.com/software/swarm/) uses a distinct compose file parser and 
        as such doesn't support some of the recent features of Docker Compose. Please contact Mirantis
        if you need assistance with compose file support in Docker Swarm.
  - type: textarea
    attributes:
      label: Steps To Reproduce
      description: Steps to reproduce the behavior.
      placeholder: |
        1. In this environment...
        2. With this config...
        3. Run '...'
        4. See error...
    validations:
      required: false
  - type: textarea
    attributes:
      label: Compose Version
      description: |
        Paste output of `docker compose version` and `docker-compose version`.
      render: Text
    validations:
      required: false
  - type: textarea
    attributes:
      label: Docker Environment
      description: Paste output of `docker info`.
      render: Text
    validations:
      required: false
  - type: textarea
    attributes:
      label: Anything else?
      description: |
        Links? References? Anything that will give us more context about the issue you are encountering!

        Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
    validations:
      required: false


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
  - name: Docker Community Slack
    url: https://dockr.ly/slack
    about: 'Use the #docker-compose channel'
  - name: Docker Support Forums
    url: https://forums.docker.com/c/open-source-projects/compose/15
    about: 'Use the "Open Source Projects > Compose" category'
  - name: 'Ask on Stack Overflow'
    url: https://stackoverflow.com/questions/tagged/docker-compose
    about: 'Use the [docker-compose] tag when creating new questions'


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yaml
================================================
name: Feature request
description: Missing functionality? Come tell us about it!
labels:
  - kind/feature
  - status/0-triage
body:
  - type: textarea
    id: description
    attributes:
      label: Description
      description: What is the feature you want to see?
    validations:
      required: true


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
**What I did**

**Related issue**
<!-- If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" -->

**(not mandatory) A picture of a cute animal, if possible in relation to what you did**


================================================
FILE: .github/SECURITY.md
================================================
# Security Policy

The maintainers of Docker Compose take security seriously. If you discover
a security issue, please bring it to their attention right away!

## Reporting a Vulnerability

Please **DO NOT** file a public issue, instead send your report privately
to [security@docker.com](mailto:security@docker.com).

Reporter(s) can expect a response within 72 hours, acknowledging the issue was
received.

## Review Process

After receiving the report, an initial triage and technical analysis is
performed to confirm the report and determine its scope. We may request
additional information in this stage of the process.

Once a reviewer has confirmed the relevance of the report, a draft security
advisory will be created on GitHub. The draft advisory will be used to discuss
the issue with maintainers, the reporter(s), and where applicable, other
affected parties under embargo.

If the vulnerability is accepted, a timeline for developing a patch, public
disclosure, and patch release will be determined. If there is an embargo period
on public disclosure before the patch release, the reporter(s) are expected to
participate in the discussion of the timeline and abide by agreed upon dates
for public disclosure.

## Accreditation

Security reports are greatly appreciated and we will publicly thank you,
although we will keep your name confidential if you request it. We also like to
send gifts - if you're into swag, make sure to let us know. We do not currently
offer a paid security bounty program at this time.

## Supported Versions

This project docs not provide long-term supported versions, and only the current
release and `main` branch are actively maintained. Docker Compose v1, and the
corresponding [v1 branch](https://github.com/docker/compose/tree/v1) reached
EOL and are no longer supported. 



================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  - package-ecosystem: gomod
    directory: /
    schedule:
      interval: daily
    ignore:
      # docker + moby deps require coordination
      - dependency-name: "github.com/docker/buildx"
        # buildx is still 0.x
        update-types: ["version-update:semver-minor"]
      - dependency-name: "github.com/moby/buildkit"
        # buildkit is still 0.x
        update-types: [ "version-update:semver-minor" ]
      - dependency-name: "github.com/docker/cli"
        update-types: ["version-update:semver-major"]
      - dependency-name: "github.com/docker/docker"
        update-types: ["version-update:semver-major"]
      - dependency-name: "github.com/containerd/containerd"
        # containerd major/minor must be kept in sync with moby
        update-types: [ "version-update:semver-major", "version-update:semver-minor" ]
        # OTEL dependencies should be upgraded in sync with engine, cli, buildkit and buildx projects
      - dependency-name: "go.opentelemetry.io/*"


================================================
FILE: .github/stale.yml
================================================
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
  - "kind/feature"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: true

# Label to use when marking as stale
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
  This issue has been automatically marked as stale because it has not had
  recent activity. It will be closed if no further activity occurs. Thank you
  for your contributions.

# Comment to post when removing the stale label.
unmarkComment: >
  This issue has been automatically marked as not stale anymore due to the recent activity.

# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
  This issue has been automatically closed because it had not recent activity during the stale period.

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
only: issues

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
#   daysUntilStale: 30
#   markComment: >
#     This pull request has been automatically marked as stale because it has not had
#     recent activity. It will be closed if no further activity occurs. Thank you
#     for your contributions.

# issues:
#   exemptLabels:
#     - confirmed

================================================
FILE: .github/workflows/ci.yml
================================================
name: ci

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - 'main'
    tags:
      - 'v*'
  pull_request:
  workflow_dispatch:
    inputs:
      debug_enabled:
        description: 'To run with tmate enter "debug_enabled"'
        required: false
        default: "false"

permissions:
  contents: read # to fetch code (actions/checkout)

jobs:
  validate:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target:
          - lint
          - validate-go-mod
          - validate-headers
          - validate-docs
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
      -
        name: Run
        run: |
          make ${{ matrix.target }}

  binary:
    uses: docker/github-builder/.github/workflows/bake.yml@v1.4.0
    permissions:
      contents: read # same as global permission
      id-token: write # for signing attestation(s) with GitHub OIDC Token
    with:
      runner: amd64
      artifact-name: compose
      artifact-upload: true
      cache: true
      cache-scope: binary
      target: release
      output: local
      sbom: true
      sign: ${{ github.event_name != 'pull_request' }}

  binary-finalize:
    runs-on: ubuntu-latest
    needs:
      - binary
    steps:
      -
        name: Download artifacts
        uses: actions/download-artifact@v7
        with:
          path: /tmp/compose-output
          name: ${{ needs.binary.outputs.artifact-name }}
      -
        name: Rename provenance and sbom
        run: |
          for pdir in /tmp/compose-output/*/; do
            (
              cd "$pdir"
              binname=$(find . -name 'docker-compose-*')
              filename=$(basename "${binname%.exe}")
              mv "provenance.json" "${filename}.provenance.json"
              mv "sbom-binary.spdx.json" "${filename}.sbom.json"
              find . -name 'sbom*.json' -exec rm {} \;
              if [ -f "provenance.sigstore.json" ]; then
                mv "provenance.sigstore.json" "${filename}.sigstore.json"
              fi
            )
          done
          mkdir -p "./bin/release"
          mv /tmp/compose-output/**/* "./bin/release/"
      -
        name: Create checksum file
        working-directory: ./bin/release
        run: |
          find . -type f -print0 | sort -z | xargs -r0 shasum -a 256 -b | sed 's# \*\./# *#' > $RUNNER_TEMP/checksums.txt
          shasum -a 256 -U -c $RUNNER_TEMP/checksums.txt
          mv $RUNNER_TEMP/checksums.txt .
          cat checksums.txt | while read sum file; do
            if [[ "${file#\*}" == docker-compose-* && "${file#\*}" != *.provenance.json && "${file#\*}" != *.sbom.json && "${file#\*}" != *.sigstore.json ]]; then
              echo "$sum $file" > ${file#\*}.sha256
            fi
          done
      -
        name: Upload artifacts
        uses: actions/upload-artifact@v6
        with:
          name: release
          path: ./bin/release/*
          if-no-files-found: error

  bin-image-test:
    if: github.event_name == 'pull_request'
    uses: docker/github-builder/.github/workflows/bake.yml@v1.4.0
    with:
      runner: amd64
      target: image-cross
      cache: true
      cache-scope: bin-image-test
      output: image
      push: false
      sbom: true
      set-meta-labels: true
      meta-images: |
        compose-bin
      meta-tags: |
        type=ref,event=pr
      meta-bake-target: meta-helper

  test:
    runs-on: ubuntu-latest
    steps:
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
      -
        name: Test
        uses: docker/bake-action@v6
        with:
          targets: test
          set: |
            *.cache-from=type=gha,scope=test
            *.cache-to=type=gha,scope=test
      -
        name: Gather coverage data
        uses: actions/upload-artifact@v4
        with:
          name: coverage-data-unit
          path: bin/coverage/unit/
          if-no-files-found: error
      - 
        name: Unit Test Summary
        uses: test-summary/action@v2
        with:
          paths: bin/coverage/unit/report.xml       
        if: always()

  e2e:
    runs-on: ubuntu-latest
    name: e2e (${{ matrix.mode }}, ${{ matrix.channel }})
    strategy:
      fail-fast: false
      matrix:
        include:
          # current stable
          - mode: plugin
            engine: 29
            channel: stable
          - mode: standalone
            engine: 29
            channel: stable

          # old stable (latest major - 1)
          - mode: plugin
            engine: 28
            channel: oldstable
          - mode: standalone
            engine: 28
            channel: oldstable
    steps:
      - name: Prepare
        run: |
          mode=${{ matrix.mode }}
          engine=${{ matrix.engine }}
          echo "MODE_ENGINE_PAIR=${mode}-${engine}" >> $GITHUB_ENV

      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Docker ${{ matrix.engine }}
        run: |
          sudo systemctl stop docker.service
          sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin
          sudo apt-get install curl
          curl -fsSL https://test.docker.com -o get-docker.sh
          sudo sh ./get-docker.sh --version ${{ matrix.engine }}

      - name: Check Docker Version
        run: docker --version

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Set up Docker Model
        run: |
          sudo apt-get install docker-model-plugin
          docker model version

      - name: Set up Go
        uses: actions/setup-go@v6
        with:
          go-version-file: '.go-version'
          check-latest: true
          cache: true

      - name: Build example provider
        run: make example-provider

      - name: Build
        uses: docker/bake-action@v6
        with:
          source: .
          targets: binary-with-coverage
          set: |
            *.cache-from=type=gha,scope=binary-linux-amd64
            *.cache-from=type=gha,scope=binary-e2e-${{ matrix.mode }}
            *.cache-to=type=gha,scope=binary-e2e-${{ matrix.mode }},mode=max
        env:
          BUILD_TAGS: e2e

      - name: Setup tmate session
        if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
        uses: mxschmitt/action-tmate@8b4e4ac71822ed7e0ad5fb3d1c33483e9e8fb270 # v3.11
        with:
          limit-access-to-actor: true
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Test plugin mode
        if: ${{ matrix.mode == 'plugin' }}
        run: |
          rm -rf ./bin/coverage/e2e
          mkdir -p ./bin/coverage/e2e
          make e2e-compose GOCOVERDIR=bin/coverage/e2e TEST_FLAGS="-v"

      - name: Gather coverage data
        if: ${{ matrix.mode == 'plugin' }}
        uses: actions/upload-artifact@v4
        with:
          name: coverage-data-e2e-${{ env.MODE_ENGINE_PAIR }}
          path: bin/coverage/e2e/
          if-no-files-found: error

      - name: Test standalone mode
        if: ${{ matrix.mode == 'standalone' }}
        run: |
          rm -f /usr/local/bin/docker-compose
          cp bin/build/docker-compose /usr/local/bin
          make e2e-compose-standalone

      - name: e2e Test Summary
        uses: test-summary/action@v2
        with:
          paths: /tmp/report/report.xml       
        if: always()

  coverage:
    runs-on: ubuntu-latest
    needs:
      - test
      - e2e
    steps:
      # codecov won't process the report without the source code available
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Go
        uses: actions/setup-go@v6
        with:
          go-version-file: '.go-version'
          check-latest: true
      - name: Download unit test coverage
        uses: actions/download-artifact@v4
        with:
          name: coverage-data-unit
          path: coverage/unit
          merge-multiple: true
      - name: Download E2E test coverage
        uses: actions/download-artifact@v4
        with:
          pattern: coverage-data-e2e-*
          path: coverage/e2e
          merge-multiple: true
      - name: Merge coverage reports
        run: |
          go tool covdata textfmt -i=./coverage/unit,./coverage/e2e -o ./coverage.txt
      - name: Store coverage report in GitHub Actions
        uses: actions/upload-artifact@v4
        with:
          name: go-covdata-txt
          path: ./coverage.txt
          if-no-files-found: error
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        with:
          files: ./coverage.txt

  release:
    permissions:
      contents: write # to create a release (ncipollo/release-action)
    runs-on: ubuntu-latest
    needs:
      - binary-finalize
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Download artifacts
        uses: actions/download-artifact@v7
        with:
          path: ./bin/release
          name: release
      -
        name: List artifacts
        run: |
          tree -nh ./bin/release
      -
        name: Check artifacts
        run: |
          find bin/release -type f -exec file -e ascii -- {} +
      -
        name: GitHub Release
        if: startsWith(github.ref, 'refs/tags/v')
        uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
        with:
          artifacts: ./bin/release/*
          generateReleaseNotes: true
          draft: true
          token: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/docs-upstream.yml
================================================
# this workflow runs the remote validate bake target from docker/docs
# to check if yaml reference docs used in this repo are valid
name: docs-upstream

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - 'main'
      - 'v[0-9]*'
    paths:
      - '.github/workflows/docs-upstream.yml'
      - 'docs/**'
  pull_request:
    paths:
      - '.github/workflows/docs-upstream.yml'
      - 'docs/**'

jobs:
  docs-yaml:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Upload reference YAML docs
        uses: actions/upload-artifact@v4
        with:
          name: docs-yaml
          path: docs/reference
          retention-days: 1

  validate:
    uses: docker/docs/.github/workflows/validate-upstream.yml@main
    needs:
      - docs-yaml
    with:
      module-name: docker/compose


================================================
FILE: .github/workflows/merge.yml
================================================
name: merge

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - 'main'
    tags:
      - 'v*'

permissions:
  contents: read # to fetch code (actions/checkout)

env:
  REPO_SLUG: "docker/compose-bin"

jobs:
  e2e:
    name: Build and test
    runs-on: ${{ matrix.os }}
    timeout-minutes: 15
    strategy:
      fail-fast: false
      matrix:
        os: [desktop-windows, desktop-macos, desktop-m1]
        # mode: [plugin, standalone]
        mode: [plugin]
    env:
      GO111MODULE: "on"
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-go@v6
        with:
          go-version-file: '.go-version'
          cache: true
          check-latest: true

      - name: List Docker resources on machine
        run: |
          docker ps --all
          docker volume ls
          docker network ls
          docker image ls
      - name: Remove Docker resources on machine
        continue-on-error: true
        run: |
          docker kill $(docker ps -q)
          docker rm -f $(docker ps -aq)
          docker volume rm -f $(docker volume ls -q)
          docker ps --all

      - name: Unit tests
        run: make test

      - name: Build binaries
        run: |
          make
      - name: Check arch of go compose binary
        run: |
          file ./bin/build/docker-compose
        if: ${{ !contains(matrix.os, 'desktop-windows') }}
      -
        name: Test plugin mode
        if: ${{ matrix.mode == 'plugin' }}
        run: |
          make e2e-compose
      -
        name: Test standalone mode
        if: ${{ matrix.mode == 'standalone' }}
        run: |
          make e2e-compose-standalone

  bin-image-prepare:
    runs-on: ubuntu-24.04
    outputs:
      repo-slug: ${{ env.REPO_SLUG }}
    steps:
      # FIXME: can't use env object in reusable workflow inputs: https://github.com/orgs/community/discussions/26671
      - run: echo "Exposing env vars for reusable workflow"

  bin-image:
    uses: docker/github-builder/.github/workflows/bake.yml@v1.4.0
    needs:
      - bin-image-prepare
    permissions:
      contents: read # same as global permission
      id-token: write # for signing attestation(s) with GitHub OIDC Token
    with:
      runner: amd64
      target: image-cross
      cache: true
      cache-scope: bin-image
      output: image
      push: ${{ github.event_name != 'pull_request' }}
      sbom: true
      set-meta-labels: true
      meta-images: |
        ${{ needs.bin-image-prepare.outputs.repo-slug }}
      meta-tags: |
        type=ref,event=tag
        type=edge
      meta-bake-target: meta-helper
    secrets:
      registry-auths: |
        - registry: docker.io
          username: ${{ secrets.DOCKERPUBLICBOT_USERNAME }}
          password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}

  desktop-edge-test:
    runs-on: ubuntu-latest
    needs: bin-image
    steps:
      -
        name: Generate Token
        id: generate_token
        uses: actions/create-github-app-token@v1
        with:
          app-id: ${{ vars.DOCKERDESKTOP_APP_ID }}
          private-key: ${{ secrets.DOCKERDESKTOP_APP_PRIVATEKEY }}
          owner: docker
          repositories: |
            ${{ secrets.DOCKERDESKTOP_REPO }}
      -
        name: Trigger Docker Desktop e2e with edge version
        uses: actions/github-script@v7
        with:
          github-token: ${{ steps.generate_token.outputs.token }}
          script: |
            await github.rest.actions.createWorkflowDispatch({
              owner: 'docker',
              repo: '${{ secrets.DOCKERDESKTOP_REPO }}',
              workflow_id: 'compose-edge-integration.yml',
              ref: 'main',
              inputs: {
                "image-tag": "${{ env.REPO_SLUG }}:edge"
              }
            })


================================================
FILE: .github/workflows/scorecards.yml
================================================
name: Scorecards supply-chain security
on:
  # Only the default branch is supported.
  branch_protection_rule:
  schedule:
    - cron: '44 9 * * 4'
  push:
    branches: [ "main" ]

jobs:
  analysis:
    name: Scorecards analysis
    runs-on: ubuntu-latest
    permissions:
      # Needed to upload the results to code-scanning dashboard.
      security-events: write
      # Used to receive a badge.
      id-token: write
      # read permissions to all the other objects
      actions: read
      attestations: read
      checks: read
      contents: read
      deployments: read
      issues: read
      discussions: read
      packages: read
      pages: read
      pull-requests: read
      statuses: read
    
    steps:
      - name: "Checkout code"
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.4.2
        with:
          persist-credentials: false

      - name: "Run analysis"
        uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # tag=v2.4.0
        with:
          results_file: results.sarif
          results_format: sarif

          # Publish the results for public repositories to enable scorecard badges. For more details, see
          # https://github.com/ossf/scorecard-action#publishing-results. 
          # For private repositories, `publish_results` will automatically be set to `false`, regardless 
          # of the value entered here.
          publish_results: true

      # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
      # format to the repository Actions tab.
      - name: "Upload artifact"
        uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # tag=v4.5.0
        with:
          name: SARIF file
          path: results.sarif
          retention-days: 5
      
      # Upload the results to GitHub's code scanning dashboard.
      - name: "Upload to code-scanning"
        uses: github/codeql-action/upload-sarif@3096afedf9873361b2b2f65e1445b13272c83eb8 # tag=v2.20.00
        with:
          sarif_file: results.sarif


================================================
FILE: .github/workflows/stale.yml
================================================
name: 'Close stale issues'

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
  contents: read

on:
  schedule:
    - cron: '0 0 * * 0,3' # at midnight UTC every Sunday and Wednesday
jobs:
  stale:
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write
    steps:
      - uses: actions/stale@v9
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          stale-issue-message: >
            This issue has been automatically marked as stale because it has not had
            recent activity. It will be closed if no further activity occurs. Thank you
            for your contributions.
          days-before-issue-stale: 150 # marks stale after 5 months
          days-before-issue-close: 30 # closes 1 month after being marked with no action
          stale-issue-label: "stale"
          exempt-issue-labels: "kind/feature,kind/enhancement"
          

================================================
FILE: .gitignore
================================================
bin/
/.vscode/
coverage.out
covdatafiles/
.DS_Store
pkg/e2e/*.tar


================================================
FILE: .go-version
================================================
1.25.8

================================================
FILE: .golangci.yml
================================================
version: "2"
run:
  concurrency: 2
linters:
  default: none
  enable:
    - copyloopvar
    - depguard
    - errcheck
    - errorlint
    - forbidigo
    - gocritic
    - gocyclo
    - gomodguard
    - govet
    - ineffassign
    - lll
    - misspell
    - nakedret
    - nolintlint
    - revive
    - staticcheck
    - testifylint
    - unconvert
    - unparam
    - unused
  settings:
    depguard:
      rules:
        all:
          deny:
            - pkg: io/ioutil
              desc: io/ioutil package has been deprecated
            - pkg: github.com/docker/docker/errdefs
              desc: use github.com/containerd/errdefs instead.
            - pkg: golang.org/x/exp/maps
              desc: use stdlib maps package
            - pkg: golang.org/x/exp/slices
              desc: use stdlib slices package
            - pkg: gopkg.in/yaml.v2
              desc: compose-go uses yaml.v3
    forbidigo:
      analyze-types: true
      forbid:
        - pattern: 'context\.Background'
          pkg: '^context$'
          msg: "in tests, use t.Context() instead of context.Background()"
        - pattern: 'context\.TODO'
          pkg: '^context$'
          msg: "in tests, use t.Context() instead of context.TODO()"
    gocritic:
      disabled-checks:
        - paramTypeCombine
        - unnamedResult
        - whyNoLint
      enabled-tags:
        - diagnostic
        - opinionated
        - style
    gocyclo:
      min-complexity: 16
    gomodguard:
      blocked:
        modules:
          - github.com/pkg/errors:
              recommendations:
                - errors
                - fmt
        versions:
          - github.com/distribution/distribution:
              reason: use distribution/reference
          - gotest.tools:
              version: < 3.0.0
              reason: deprecated, pre-modules version
    lll:
      line-length: 200
    revive:
      rules:
        - name: package-comments
          disabled: true
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
    rules:
      - path-except: '_test\.go'
        linters:
          - forbidigo
issues:
  max-issues-per-linter: 0
  max-same-issues: 0
formatters:
  enable:
    - gci
    - gofumpt
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
  settings:
    gci:
      sections:
        - standard
        - default
        - localmodule
      custom-order: true # make the section order the same as the order of "sections".


================================================
FILE: BUILDING.md
================================================

### Prerequisites

* Windows:
  * [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/)
  * make
  * go (see [go.mod](go.mod) for minimum version)
* macOS:
  * [Docker Desktop](https://docs.docker.com/desktop/setup/install/mac-install/)
  * make
  * go (see [go.mod](go.mod) for minimum version)
* Linux:
  * [Docker 20.10 or later](https://docs.docker.com/engine/install/)
  * make
  * go (see [go.mod](go.mod) for minimum version)

### Building the CLI

Once you have the prerequisites installed, you can build the CLI using:

```console
make
```

This will output a `docker-compose` CLI plugin for your host machine in
`./bin/build`.

You can statically cross compile the CLI for Windows, macOS, and Linux using the
`cross` target.

### Unit tests

To run all of the unit tests, run:

```console
make test
```

If you need to update a golden file simply do `go test ./... -test.update-golden`.

### End-to-end tests
To run e2e tests, the Compose CLI binary needs to be built. All the commands to run e2e tests propose a version
with the prefix `build-and-e2e` to first build the CLI before executing tests.

Note that this requires a local Docker Engine to be running.

#### Whole end-to-end tests suite

To execute both CLI and standalone e2e tests, run :

```console
make e2e
```

Or if you need to build the CLI, run:
```console
make build-and-e2e
```

#### Plugin end-to-end tests suite

To execute CLI plugin e2e tests, run :

```console
make e2e-compose
```

Or if you need to build the CLI, run:
```console
make build-and-e2e-compose
```

#### Standalone end-to-end tests suite

To execute the standalone CLI e2e tests, run :

```console
make e2e-compose-standalone
```

Or if you need to build the CLI, run:

```console
make build-and-e2e-compose-standalone
```

## Releases

To create a new release:
* Check that the CI is green on the main branch for the commit you want to release
* Run the release GitHub Actions workflow with a tag of form vx.y.z following existing tags.

This will automatically create a new tag, release and make binaries for
Windows, macOS, and Linux available for download on the
[releases page](https://github.com/docker/compose/releases).


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Docker

Want to hack on Docker? Awesome!  We have a contributor's guide that explains
[setting up a Docker development environment and the contribution
process](https://docs.docker.com/contribute/).

This page contains information about reporting issues as well as some tips and
guidelines useful to experienced open source contributors. Finally, make sure
you read our [community guidelines](#docker-community-guidelines) before you
start participating.

## Topics

- [Contributing to Docker](#contributing-to-docker)
  - [Topics](#topics)
  - [Reporting security issues](#reporting-security-issues)
  - [Reporting other issues](#reporting-other-issues)
  - [Quick contribution tips and guidelines](#quick-contribution-tips-and-guidelines)
    - [Pull requests are always welcome](#pull-requests-are-always-welcome)
    - [Talking to other Docker users and contributors](#talking-to-other-docker-users-and-contributors)
    - [Conventions](#conventions)
    - [Merge approval](#merge-approval)
    - [Sign your work](#sign-your-work)
    - [How can I become a maintainer?](#how-can-i-become-a-maintainer)
  - [Docker community guidelines](#docker-community-guidelines)
  - [Coding Style](#coding-style)

## Reporting security issues

The Docker maintainers take security seriously. If you discover a security
issue, please bring it to their attention right away!

Please **DO NOT** file a public issue, instead, send your report privately to
[security@docker.com](mailto:security@docker.com).

Security reports are greatly appreciated and we will publicly thank you for them.
We also like to send gifts&mdash;if you're into Docker swag, make sure to let
us know. We currently do not offer a paid security bounty program but are not
ruling it out in the future.


## Reporting other issues

A great way to contribute to the project is to send a detailed report when you
encounter an issue. We always appreciate a well-written, thorough bug report,
and will thank you for it!

Check that [our issue database](https://github.com/docker/compose/labels/Docker%20Compose%20V2)
doesn't already include that problem or suggestion before submitting an issue.
If you find a match, you can use the "subscribe" button to get notified of
updates. Do *not* leave random "+1" or "I have this too" comments, as they
only clutter the discussion, and don't help to resolve it. However, if you
have ways to reproduce the issue or have additional information that may help
resolve the issue, please leave a comment.

When reporting issues, always include:

* The output of `docker version`.
* The output of `docker context show`.
* The output of `docker info`.

Also, include the steps required to reproduce the problem if possible and
applicable. This information will help us review and fix your issue faster.
When sending lengthy log files, consider posting them as a gist
(https://gist.github.com).
Don't forget to remove sensitive data from your log files before posting (you
can replace those parts with "REDACTED").

_Note:_ 
Maintainers might request additional information to diagnose an issue,
if initial reporter doesn't answer within a reasonable delay (a few weeks),
issue will be closed.

## Quick contribution tips and guidelines

This section gives the experienced contributor some tips and guidelines.

### Pull requests are always welcome

Not sure if that typo is worth a pull request? Found a bug and know how to fix
it? Do it! We will appreciate it. Any significant change, like adding a backend,
should be documented as
[a GitHub issue](https://github.com/docker/compose/issues)
before anybody starts working on it.

We are always thrilled to receive pull requests. We do our best to process them
quickly. If your pull request is not accepted on the first try,
don't get discouraged!

### Talking to other Docker users and contributors

<table class="tg">
  <col width="45%">
  <col width="65%">
  <tr>
    <td>Community Slack</td>
    <td>
      The Docker Community has a dedicated Slack chat to discuss features and issues.  You can sign-up <a href="https://www.docker.com/community/" target="_blank">with this link</a>.
    </td>
  </tr>
  <tr>
    <td>Forums</td>
    <td>
      A public forum for users to discuss questions and explore current design patterns and
      best practices about Docker and related projects in the Docker Ecosystem. To participate,
      just log in with your Docker Hub account on <a href="https://forums.docker.com" target="_blank">https://forums.docker.com</a>.
    </td>
  </tr>
  <tr>
    <td>Twitter</td>
    <td>
      You can follow <a href="https://twitter.com/docker/" target="_blank">Docker's Twitter feed</a>
      to get updates on our products. You can also tweet us questions or just
      share blogs or stories.
    </td>
  </tr>
  <tr>
    <td>Stack Overflow</td>
    <td>
      Stack Overflow has over 17000 Docker questions listed. We regularly
      monitor <a href="https://stackoverflow.com/questions/tagged/docker" target="_blank">Docker questions</a>
      and so do many other knowledgeable Docker users.
    </td>
  </tr>
</table>


### Conventions

Fork the repository and make changes on your fork in a feature branch:

- If it's a bug fix branch, name it XXXX-something where XXXX is the number of
    the issue.
- If it's a feature branch, create an enhancement issue to announce
    your intentions, and name it XXXX-something where XXXX is the number of the
    issue.

Submit unit tests for your changes. Go has a great test framework built in; use
it! Take a look at existing tests for inspiration. Also, end-to-end tests are
available. Run the full test suite, both unit tests and e2e tests on your
branch before submitting a pull request. See [BUILDING.md](BUILDING.md) for
instructions to build and run tests.

Write clean code. Universally formatted code promotes ease of writing, reading,
and maintenance. Always run `gofmt -s -w file.go` on each changed file before
committing your changes. Most editors have plug-ins that do this automatically.

Pull request descriptions should be as clear as possible and include a reference
to all the issues that they address.

Commit messages must start with a capitalized and short summary (max. 50 chars)
written in the imperative, followed by an optional, more detailed explanatory
text which is separated from the summary by an empty line.

Code review comments may be added to your pull request. Discuss, then make the
suggested modifications and push additional commits to your feature branch. Post
a comment after pushing. New commits show up in the pull request automatically,
but the reviewers are notified only when you comment.

Pull requests must be cleanly rebased on top of the base branch without multiple branches
mixed into the PR.

**Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
feature branch to update your pull request rather than `merge master`.

Before you make a pull request, squash your commits into logical units of work
using `git rebase -i` and `git push -f`. A logical unit of work is a consistent
set of patches that should be reviewed together: for example, upgrading the
version of a vendored dependency and taking advantage of its now available new
feature constitute two separate units of work. Implementing a new function and
calling it in another file constitute a single logical unit of work. The very
high majority of submissions should have a single commit, so if in doubt: squash
down to one.

After every commit, make sure the test suite passes. Include documentation
changes in the same pull request so that a revert would remove all traces of
the feature or fix.

Include an issue reference like `Closes #XXXX` or `Fixes #XXXX` in the pull
request description that closes an issue. Including references automatically
closes the issue on a merge.

Please do not add yourself to the `AUTHORS` file, as it is regenerated regularly
from the Git history.

Please see the [Coding Style](#coding-style) for further guidelines.

### Merge approval

Docker maintainers use LGTM (Looks Good To Me) in comments on the code review to
indicate acceptance.

A change requires at least 2 LGTMs from the maintainers of each
component affected.

For more details, see the [MAINTAINERS](MAINTAINERS) page.

### Sign your work

The sign-off is a simple line at the end of the explanation for the patch. Your
signature certifies that you wrote the patch or otherwise have the right to pass
it on as an open-source patch. The rules are pretty simple: if you can certify
the below (from [developercertificate.org](https://developercertificate.org/)):

```
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
```

Then you just add a line to every git commit message:

    Signed-off-by: Joe Smith <joe.smith@email.com>

Use your real name (sorry, no pseudonyms or anonymous contributions.)

If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.

### How can I become a maintainer?

The procedures for adding new maintainers are explained in the global
[MAINTAINERS](https://github.com/docker/opensource/blob/main/MAINTAINERS)
file in the
[https://github.com/docker/opensource/](https://github.com/docker/opensource/)
repository.

Don't forget: being a maintainer is a time investment. Make sure you
will have time to make yourself available. You don't have to be a
maintainer to make a difference on the project!

## Docker community guidelines

We want to keep the Docker community awesome, growing and collaborative. We need
your help to keep it that way. To help with this we've come up with some general
guidelines for the community as a whole:

* Be nice: Be courteous, respectful and polite to fellow community members:
  no regional, racial, gender or other abuse will be tolerated. We like
  nice people way better than mean ones!

* Encourage diversity and participation: Make everyone in our community feel
  welcome, regardless of their background and the extent of their
  contributions, and do everything possible to encourage participation in
  our community.

* Keep it legal: Basically, don't get us in trouble. Share only content that
  you own, do not share private or sensitive information, and don't break
  the law.

* Stay on topic: Make sure that you are posting to the correct channel and
  avoid off-topic discussions. Remember when you update an issue or respond
  to an email you are potentially sending it to a large number of people. Please
  consider this before you update. Also, remember that nobody likes spam.

* Don't send emails to the maintainers: There's no need to send emails to the
  maintainers to ask them to investigate an issue or to take a look at a
  pull request. Instead of sending an email, GitHub mentions should be
  used to ping maintainers to review a pull request, a proposal or an
  issue.

## Coding Style

Unless explicitly stated, we follow all coding guidelines from the Go
community. While some of these standards may seem arbitrary, they somehow seem
to result in a solid, consistent codebase.

It is possible that the code base does not currently comply with these
guidelines. We are not looking for a massive PR that fixes this, since that
goes against the spirit of the guidelines. All new contributors should make their
best effort to clean up and make the code base better than they left it.
Obviously, apply your best judgement. Remember, the goal here is to make the
code base easier for humans to navigate and understand. Always keep that in
mind when nudging others to comply.

The rules:

1. All code should be formatted with `gofmt -s`.
2. All code should pass the default levels of
   [`golint`](https://github.com/golang/lint).
3. All code should follow the guidelines covered in [Effective
   Go](https://go.dev/doc/effective_go) and [Go Code Review
   Comments](https://go.dev/wiki/CodeReviewComments).
4. Include code comments. Tell us the why, the history and the context.
5. Document _all_ declarations and methods, even private ones. Declare
   expectations, caveats and anything else that may be important. If a type
   gets exported, having the comments already there will ensure it's ready.
6. Variable name length should be proportional to its context and no longer.
   `noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo`.
   In practice, short methods will have short variable names and globals will
   have longer names.
7. No underscores in package names. If you need a compound name, step back,
   and re-examine why you need a compound name. If you still think you need a
   compound name, lose the underscore.
8. No utils or helpers packages. If a function is not general enough to
   warrant its own package, it has not been written generally enough to be a
   part of a util package. Just leave it unexported and well-documented.
9. All tests should run with `go test` and outside tooling should not be
   required. No, we don't need another unit testing framework. Assertion
   packages are acceptable if they provide _real_ incremental value.
10. Even though we call these "rules" above, they are actually just
    guidelines. Since you've read all the rules, you now know that.

If you are having trouble getting into the mood of idiomatic Go, we recommend
reading through [Effective Go](https://go.dev/doc/effective_go). The
[Go Blog](https://go.dev/blog/) is also a great resource. Drinking the
kool-aid is a lot easier than going thirsty.


================================================
FILE: Dockerfile
================================================
# syntax=docker/dockerfile:1


#   Copyright 2020 Docker Compose CLI authors

#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at

#       http://www.apache.org/licenses/LICENSE-2.0

#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

ARG GO_VERSION=1.25.8
ARG XX_VERSION=1.9.0
ARG GOLANGCI_LINT_VERSION=v2.8.0
ARG ADDLICENSE_VERSION=v1.0.0

ARG BUILD_TAGS="e2e"
ARG DOCS_FORMATS="md,yaml"
ARG LICENSE_FILES=".*\(Dockerfile\|Makefile\|\.go\|\.hcl\|\.sh\)"

# xx is a helper for cross-compilation
FROM --platform=${BUILDPLATFORM} tonistiigi/xx:${XX_VERSION} AS xx

# osxcross contains the MacOSX cross toolchain for xx
FROM crazymax/osxcross:15.5-alpine AS osxcross

FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
FROM ghcr.io/google/addlicense:${ADDLICENSE_VERSION} AS addlicense

FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION}-alpine3.22 AS base
COPY --from=xx / /
RUN apk add --no-cache \
      clang \
      docker \
      file \
      findutils \
      git \
      make \
      protoc \
      protobuf-dev
WORKDIR /src
ENV CGO_ENABLED=0

FROM base AS build-base
COPY go.* .
RUN --mount=type=cache,target=/go/pkg/mod \
    --mount=type=cache,target=/root/.cache/go-build \
    go mod download

FROM build-base AS vendored
RUN --mount=type=bind,target=.,rw \
    --mount=type=cache,target=/go/pkg/mod \
    go mod tidy && mkdir /out && cp go.mod go.sum /out

FROM scratch AS vendor-update
COPY --from=vendored /out /

FROM vendored AS vendor-validate
RUN --mount=type=bind,target=.,rw <<EOT
  set -e
  git add -A
  cp -rf /out/* .
  diff=$(git status --porcelain -- go.mod go.sum)
  if [ -n "$diff" ]; then
    echo >&2 'ERROR: Vendor result differs. Please vendor your package with "make go-mod-tidy"'
    echo "$diff"
    exit 1
  fi
EOT

FROM build-base AS build
ARG BUILD_TAGS
ARG BUILD_FLAGS
ARG TARGETPLATFORM
RUN --mount=type=bind,target=. \
    --mount=type=cache,target=/root/.cache \
    --mount=type=cache,target=/go/pkg/mod \
    --mount=type=bind,from=osxcross,src=/osxsdk,target=/xx-sdk \
    xx-go --wrap && \
    if [ "$(xx-info os)" == "darwin" ]; then export CGO_ENABLED=1; export BUILD_TAGS=fsnotify,$BUILD_TAGS; fi && \
    make build GO_BUILDTAGS="$BUILD_TAGS" DESTDIR=/out && \
    xx-verify --static /out/docker-compose

FROM build-base AS lint
ARG BUILD_TAGS
ENV GOLANGCI_LINT_CACHE=/cache/golangci-lint
RUN --mount=type=bind,target=. \
    --mount=type=cache,target=/root/.cache \
    --mount=type=cache,target=/go/pkg/mod \
    --mount=type=cache,target=/cache/golangci-lint \
    --mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
    golangci-lint cache status && \
    golangci-lint run --build-tags "$BUILD_TAGS" ./...

FROM build-base AS test
ARG CGO_ENABLED=0
ARG BUILD_TAGS
RUN --mount=type=bind,target=. \
    --mount=type=cache,target=/root/.cache \
    --mount=type=cache,target=/go/pkg/mod \
    rm -rf /tmp/coverage && \
    mkdir -p /tmp/coverage && \
    rm -rf /tmp/report && \
    mkdir -p /tmp/report && \
    go run gotest.tools/gotestsum@latest --format testname --junitfile "/tmp/report/report.xml" -- -tags "$BUILD_TAGS" -v -cover -covermode=atomic $(go list  $(TAGS) ./... | grep -vE 'e2e') -args -test.gocoverdir="/tmp/coverage" && \
    go tool covdata percent -i=/tmp/coverage

FROM scratch AS test-coverage
COPY --from=test --link /tmp/coverage /
COPY --from=test --link /tmp/report /

FROM base AS license-set
ARG LICENSE_FILES
RUN --mount=type=bind,target=.,rw \
    --mount=from=addlicense,source=/app/addlicense,target=/usr/bin/addlicense \
    find . -regex "${LICENSE_FILES}" | xargs addlicense -c 'Docker Compose CLI' -l apache && \
    mkdir /out && \
    find . -regex "${LICENSE_FILES}" | cpio -pdm /out

FROM scratch AS license-update
COPY --from=set /out /

FROM base AS license-validate
ARG LICENSE_FILES
RUN --mount=type=bind,target=. \
    --mount=from=addlicense,source=/app/addlicense,target=/usr/bin/addlicense \
    find . -regex "${LICENSE_FILES}" | xargs addlicense -check -c 'Docker Compose CLI' -l apache -ignore validate -ignore testdata -ignore resolvepath -v

FROM base AS docsgen
WORKDIR /src
RUN --mount=target=. \
    --mount=target=/root/.cache,type=cache \
    --mount=type=cache,target=/go/pkg/mod \
    go build -o /out/docsgen ./docs/yaml/main/generate.go

FROM --platform=${BUILDPLATFORM} alpine AS docs-build
RUN apk add --no-cache rsync git
WORKDIR /src
COPY --from=docsgen /out/docsgen /usr/bin
ARG DOCS_FORMATS
RUN --mount=target=/context \
    --mount=target=.,type=tmpfs <<EOT
  set -e
  rsync -a /context/. .
  docsgen --formats "$DOCS_FORMATS" --source "docs/reference"
  mkdir /out
  cp -r docs/reference /out
EOT

FROM scratch AS docs-update
COPY --from=docs-build /out /out

FROM docs-build AS docs-validate
RUN --mount=target=/context \
    --mount=target=.,type=tmpfs <<EOT
  set -e
  rsync -a /context/. .
  git add -A
  rm -rf docs/reference/*
  cp -rf /out/* ./docs/
  if [ -n "$(git status --porcelain -- docs/reference)" ]; then
    echo >&2 'ERROR: Docs result differs. Please update with "make docs"'
    git status --porcelain -- docs/reference
    exit 1
  fi
EOT

FROM scratch AS binary-unix
COPY --link --from=build /out/docker-compose /
FROM binary-unix AS binary-darwin
FROM binary-unix AS binary-linux
FROM scratch AS binary-windows
COPY --link --from=build /out/docker-compose /docker-compose.exe
FROM binary-$TARGETOS AS binary
# enable scanning for this stage
ARG BUILDKIT_SBOM_SCAN_STAGE=true

FROM --platform=$BUILDPLATFORM alpine AS releaser
WORKDIR /work
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
RUN --mount=from=binary \
    mkdir -p /out && \
    # TODO: should just use standard arch
    TARGETARCH=$([ "$TARGETARCH" = "amd64" ] && echo "x86_64" || echo "$TARGETARCH"); \
    TARGETARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH"); \
    cp docker-compose* "/out/docker-compose-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}$(ls docker-compose* | sed -e 's/^docker-compose//')"

FROM scratch AS release
COPY --from=releaser /out/ /


================================================
FILE: LICENSE
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

================================================
FILE: Makefile
================================================
#   Copyright 2020 Docker Compose CLI authors

#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at

#       http://www.apache.org/licenses/LICENSE-2.0

#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

PKG := github.com/docker/compose/v5
VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags)

GO_LDFLAGS ?= -w -X ${PKG}/internal.Version=${VERSION}
GO_BUILDTAGS ?= e2e
DRIVE_PREFIX?=
ifeq ($(OS),Windows_NT)
    DETECTED_OS = Windows
    DRIVE_PREFIX=C:
else
    DETECTED_OS = $(shell uname -s)
endif

ifeq ($(DETECTED_OS),Windows)
	BINARY_EXT=.exe
endif

BUILD_FLAGS?=
TEST_FLAGS?=
E2E_TEST?=
ifneq ($(E2E_TEST),)
	TEST_FLAGS:=$(TEST_FLAGS) -run '$(E2E_TEST)'
endif

EXCLUDE_E2E_TESTS?=
ifneq ($(EXCLUDE_E2E_TESTS),)
	TEST_FLAGS:=$(TEST_FLAGS) -skip '$(EXCLUDE_E2E_TESTS)'
endif

BUILDX_CMD ?= docker buildx

# DESTDIR overrides the output path for binaries and other artifacts
# this is used by docker/docker-ce-packaging for the apt/rpm builds,
# so it's important that the resulting binary ends up EXACTLY at the
# path $DESTDIR/docker-compose when specified.
#
# See https://github.com/docker/docker-ce-packaging/blob/e43fbd37e48fde49d907b9195f23b13537521b94/rpm/SPECS/docker-compose-plugin.spec#L47
#
# By default, all artifacts go to subdirectories under ./bin/ in the
# repo root, e.g. ./bin/build, ./bin/coverage, ./bin/release.
DESTDIR ?=

all: build

.PHONY: build ## Build the compose cli-plugin
build:
	GO111MODULE=on go build $(BUILD_FLAGS) -trimpath -tags "$(GO_BUILDTAGS)" -ldflags "$(GO_LDFLAGS)" -o "$(or $(DESTDIR),./bin/build)/docker-compose$(BINARY_EXT)" ./cmd

.PHONY: binary
binary:
	BUILD_TAGS="$(GO_BUILDTAGS)" $(BUILDX_CMD) bake binary

.PHONY: binary-with-coverage
binary-with-coverage:
	BUILD_TAGS="$(GO_BUILDTAGS)" $(BUILDX_CMD) bake binary-with-coverage

.PHONY: install
install: binary
	mkdir -p ~/.docker/cli-plugins
	install $(or $(DESTDIR),./bin/build)/docker-compose ~/.docker/cli-plugins/docker-compose

.PHONY: e2e-compose
e2e-compose: example-provider ## Run end to end local tests in plugin mode. Set E2E_TEST=TestName to run a single test
	go run gotest.tools/gotestsum@latest --format testname --junitfile "/tmp/report/report.xml" -- -v $(TEST_FLAGS) -count=1 ./pkg/e2e

.PHONY: e2e-compose-standalone
e2e-compose-standalone: ## Run End to end local tests in standalone mode. Set E2E_TEST=TestName to run a single test
	go run gotest.tools/gotestsum@latest --format testname --junitfile "/tmp/report/report.xml" -- $(TEST_FLAGS) -v -count=1 -parallel=1 --tags=standalone ./pkg/e2e

.PHONY: build-and-e2e-compose
build-and-e2e-compose: build e2e-compose ## Compile the compose cli-plugin and run end to end local tests in plugin mode. Set E2E_TEST=TestName to run a single test

.PHONY: build-and-e2e-compose-standalone
build-and-e2e-compose-standalone: build e2e-compose-standalone ## Compile the compose cli-plugin and run End to end local tests in standalone mode. Set E2E_TEST=TestName to run a single test

.PHONY: example-provider
example-provider: ## build example provider for e2e tests
	go build -o bin/build/example-provider docs/examples/provider.go

.PHONY: mocks
mocks:
	mockgen --version >/dev/null 2>&1 || go install go.uber.org/mock/mockgen@v0.4.0
	mockgen -destination pkg/mocks/mock_docker_cli.go -package mocks github.com/docker/cli/cli/command Cli
	mockgen -destination pkg/mocks/mock_docker_api.go -package mocks github.com/moby/moby/client APIClient
	mockgen -destination pkg/mocks/mock_docker_compose_api.go -package mocks -source=./pkg/api/api.go Service

.PHONY: e2e
e2e: e2e-compose e2e-compose-standalone ## Run end to end local tests in both modes. Set E2E_TEST=TestName to run a single test

.PHONY: build-and-e2e
build-and-e2e: build e2e-compose e2e-compose-standalone ## Compile the compose cli-plugin and run end to end local tests in both modes. Set E2E_TEST=TestName to run a single test

.PHONY: cross
cross: ## Compile the CLI for linux, darwin and windows
	$(BUILDX_CMD) bake binary-cross

.PHONY: test
test: ## Run unit tests
	$(BUILDX_CMD) bake test

.PHONY: cache-clear
cache-clear: ## Clear the builder cache
	$(BUILDX_CMD) prune --force --filter type=exec.cachemount --filter=unused-for=24h

.PHONY: lint
lint: ## run linter(s)
	$(BUILDX_CMD) bake lint

.PHONY: fmt
fmt:
	gofumpt --version >/dev/null 2>&1 || go install mvdan.cc/gofumpt@latest
	gofumpt -w .

.PHONY: docs
docs: ## generate documentation
	$(eval $@_TMP_OUT := $(shell mktemp -d -t compose-output.XXXXXXXXXX))
	$(BUILDX_CMD) bake --set "*.output=type=local,dest=$($@_TMP_OUT)" docs-update
	rm -rf ./docs/internal
	cp -R "$(DRIVE_PREFIX)$($@_TMP_OUT)"/out/* ./docs/
	rm -rf "$(DRIVE_PREFIX)$($@_TMP_OUT)"/*

.PHONY: validate-docs
validate-docs: ## validate the doc does not change
	$(BUILDX_CMD) bake docs-validate

.PHONY: check-dependencies
check-dependencies: ## check dependency updates
	go list -u -m -f '{{if not .Indirect}}{{if .Update}}{{.}}{{end}}{{end}}' all

.PHONY: validate-headers
validate-headers: ## Check license header for all files
	$(BUILDX_CMD) bake license-validate

.PHONY: go-mod-tidy
go-mod-tidy: ## Run go mod tidy in a container and output resulting go.mod and go.sum
	$(BUILDX_CMD) bake vendor-update

.PHONY: validate-go-mod
validate-go-mod: ## Validate go.mod and go.sum are up-to-date
	$(BUILDX_CMD) bake vendor-validate

validate: validate-go-mod validate-headers validate-docs  ## Validate sources

pre-commit: validate check-dependencies lint build test e2e-compose

help: ## Show help
	@echo Please specify a build target. The choices are:
	@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'


================================================
FILE: NOTICE
================================================
Docker Compose V2
Copyright 2020 Docker Compose authors

This product includes software developed at Docker, Inc. (https://www.docker.com).


================================================
FILE: README.md
================================================
# Table of Contents
- [Docker Compose](#docker-compose)
- [Where to get Docker Compose](#where-to-get-docker-compose)
    + [Windows and macOS](#windows-and-macos)
    + [Linux](#linux)
- [Quick Start](#quick-start)
- [Contributing](#contributing)
- [Legacy](#legacy)

# Docker Compose

[![GitHub release](https://img.shields.io/github/v/release/docker/compose.svg?style=flat-square)](https://github.com/docker/compose/releases/latest)
[![PkgGoDev](https://img.shields.io/badge/go.dev-docs-007d9c?style=flat-square&logo=go&logoColor=white)](https://pkg.go.dev/github.com/docker/compose/v5)
[![Build Status](https://img.shields.io/github/actions/workflow/status/docker/compose/ci.yml?label=ci&logo=github&style=flat-square)](https://github.com/docker/compose/actions?query=workflow%3Aci)
[![Go Report Card](https://goreportcard.com/badge/github.com/docker/compose/v5?style=flat-square)](https://goreportcard.com/report/github.com/docker/compose/v5)
[![Codecov](https://codecov.io/gh/docker/compose/branch/main/graph/badge.svg?token=HP3K4Y4ctu)](https://codecov.io/gh/docker/compose)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/docker/compose/badge)](https://api.securityscorecards.dev/projects/github.com/docker/compose)
![Docker Compose](logo.png?raw=true "Docker Compose Logo")

Docker Compose is a tool for running multi-container applications on Docker
defined using the [Compose file format](https://compose-spec.io).
A Compose file is used to define how one or more containers that make up
your application are configured.
Once you have a Compose file, you can create and start your application with a
single command: `docker compose up`.

> **Note**: About Docker Swarm
> Docker Swarm used to rely on the legacy compose file format but did not adopt the compose specification
> so is missing some of the recent enhancements in the compose syntax. After 
> [acquisition by Mirantis](https://www.mirantis.com/software/swarm/) swarm isn't maintained by Docker Inc, and
> as such some Docker Compose features aren't accessible to swarm users.

# Where to get Docker Compose

### Windows and macOS

Docker Compose is included in
[Docker Desktop](https://www.docker.com/products/docker-desktop/)
for Windows and macOS.

### Linux

You can download Docker Compose binaries from the
[release page](https://github.com/docker/compose/releases) on this repository.

Rename the relevant binary for your OS to `docker-compose` and copy it to `$HOME/.docker/cli-plugins`

Or copy it into one of these folders to install it system-wide:

* `/usr/local/lib/docker/cli-plugins` OR `/usr/local/libexec/docker/cli-plugins`
* `/usr/lib/docker/cli-plugins` OR `/usr/libexec/docker/cli-plugins`

(might require making the downloaded file executable with `chmod +x`)


Quick Start
-----------

Using Docker Compose is a three-step process:
1. Define your app's environment with a `Dockerfile` so it can be
   reproduced anywhere.
2. Define the services that make up your app in `compose.yaml` so
   they can be run together in an isolated environment.
3. Lastly, run `docker compose up` and Compose will start and run your entire
   app.

A Compose file looks like this:

```yaml
services:
  web:
    build: .
    ports:
      - "5000:5000"
    volumes:
      - .:/code
  redis:
    image: redis
```

Contributing
------------

Want to help develop Docker Compose? Check out our
[contributing documentation](CONTRIBUTING.md).

If you find an issue, please report it on the
[issue tracker](https://github.com/docker/compose/issues/new/choose).

Legacy
-------------

The Python version of Compose is available under the `v1` [branch](https://github.com/docker/compose/tree/v1).


================================================
FILE: cmd/cmdtrace/cmd_span.go
================================================
/*
   Copyright 2023 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package cmdtrace

import (
	"context"
	"errors"
	"fmt"
	"sort"
	"strings"
	"time"

	dockercli "github.com/docker/cli/cli"
	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"
	flag "github.com/spf13/pflag"
	"go.opentelemetry.io/otel"
	"go.opentelemetry.io/otel/attribute"
	"go.opentelemetry.io/otel/codes"
	"go.opentelemetry.io/otel/trace"

	commands "github.com/docker/compose/v5/cmd/compose"
	"github.com/docker/compose/v5/internal/tracing"
)

// Setup should be called as part of the command's PersistentPreRunE
// as soon as possible after initializing the dockerCli.
//
// It initializes the tracer for the CLI using both auto-detection
// from the Docker context metadata as well as standard OTEL_ env
// vars, creates a root span for the command, and wraps the actual
// command invocation to ensure the span is properly finalized and
// exported before exit.
func Setup(cmd *cobra.Command, dockerCli command.Cli, args []string) error {
	tracingShutdown, err := tracing.InitTracing(dockerCli)
	if err != nil {
		return fmt.Errorf("initializing tracing: %w", err)
	}

	ctx := cmd.Context()
	ctx, cmdSpan := otel.Tracer("").Start(
		ctx,
		"cli/"+strings.Join(commandName(cmd), "-"),
	)
	cmdSpan.SetAttributes(
		attribute.StringSlice("cli.flags", getFlags(cmd.Flags())),
		attribute.Bool("cli.isatty", dockerCli.In().IsTerminal()),
	)

	cmd.SetContext(ctx)
	wrapRunE(cmd, cmdSpan, tracingShutdown)
	return nil
}

// wrapRunE injects a wrapper function around the command's actual RunE (or Run)
// method. This is necessary to capture the command result for reporting as well
// as flushing any spans before exit.
//
// Unfortunately, PersistentPostRun(E) can't be used for this purpose because it
// only runs if RunE does _not_ return an error, but this should run unconditionally.
func wrapRunE(c *cobra.Command, cmdSpan trace.Span, tracingShutdown tracing.ShutdownFunc) {
	origRunE := c.RunE
	if origRunE == nil {
		origRun := c.Run
		//nolint:unparam // wrapper function for RunE, always returns nil by design
		origRunE = func(cmd *cobra.Command, args []string) error {
			origRun(cmd, args)
			return nil
		}
		c.Run = nil
	}

	c.RunE = func(cmd *cobra.Command, args []string) error {
		cmdErr := origRunE(cmd, args)
		if cmdSpan != nil {
			if cmdErr != nil && !errors.Is(cmdErr, context.Canceled) {
				// default exit code is 1 if a more descriptive error
				// wasn't returned
				exitCode := 1
				var statusErr dockercli.StatusError
				if errors.As(cmdErr, &statusErr) {
					exitCode = statusErr.StatusCode
				}
				cmdSpan.SetStatus(codes.Error, "CLI command returned error")
				cmdSpan.RecordError(cmdErr, trace.WithAttributes(
					attribute.Int("exit_code", exitCode),
				))

			} else {
				cmdSpan.SetStatus(codes.Ok, "")
			}
			cmdSpan.End()
		}
		if tracingShutdown != nil {
			// use background for root context because the cmd's context might have
			// been canceled already
			ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
			defer cancel()
			// TODO(milas): add an env var to enable logging from the
			// OTel components for debugging purposes
			_ = tracingShutdown(ctx)
		}
		return cmdErr
	}
}

// commandName returns the path components for a given command,
// in reverse alphabetical order for consistent usage metrics.
//
// The root Compose command and anything before (i.e. "docker")
// are not included.
//
// For example:
//   - docker compose alpha watch -> [watch, alpha]
//   - docker-compose up -> [up]
func commandName(cmd *cobra.Command) []string {
	var name []string
	for c := cmd; c != nil; c = c.Parent() {
		if c.Name() == commands.PluginName {
			break
		}
		name = append(name, c.Name())
	}
	sort.Sort(sort.Reverse(sort.StringSlice(name)))
	return name
}

func getFlags(fs *flag.FlagSet) []string {
	var result []string
	fs.Visit(func(flag *flag.Flag) {
		result = append(result, flag.Name)
	})
	return result
}


================================================
FILE: cmd/cmdtrace/cmd_span_test.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package cmdtrace

import (
	"reflect"
	"testing"

	"github.com/spf13/cobra"
	flag "github.com/spf13/pflag"

	commands "github.com/docker/compose/v5/cmd/compose"
)

func TestGetFlags(t *testing.T) {
	// Initialize flagSet with flags
	fs := flag.NewFlagSet("up", flag.ContinueOnError)
	var (
		detach  string
		timeout string
	)
	fs.StringVar(&detach, "detach", "d", "")
	fs.StringVar(&timeout, "timeout", "t", "")
	_ = fs.Set("detach", "detach")
	_ = fs.Set("timeout", "timeout")

	tests := []struct {
		name     string
		input    *flag.FlagSet
		expected []string
	}{
		{
			name:     "NoFlags",
			input:    flag.NewFlagSet("NoFlags", flag.ContinueOnError),
			expected: nil,
		},
		{
			name:     "Flags",
			input:    fs,
			expected: []string{"detach", "timeout"},
		},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			result := getFlags(test.input)
			if !reflect.DeepEqual(result, test.expected) {
				t.Errorf("Expected %v, but got %v", test.expected, result)
			}
		})
	}
}

func TestCommandName(t *testing.T) {
	tests := []struct {
		name     string
		setupCmd func() *cobra.Command
		want     []string
	}{
		{
			name: "docker compose alpha watch -> [watch, alpha]",
			setupCmd: func() *cobra.Command {
				dockerCmd := &cobra.Command{Use: "docker"}
				composeCmd := &cobra.Command{Use: commands.PluginName}
				alphaCmd := &cobra.Command{Use: "alpha"}
				watchCmd := &cobra.Command{Use: "watch"}

				dockerCmd.AddCommand(composeCmd)
				composeCmd.AddCommand(alphaCmd)
				alphaCmd.AddCommand(watchCmd)

				return watchCmd
			},
			want: []string{"watch", "alpha"},
		},
		{
			name: "docker-compose up -> [up]",
			setupCmd: func() *cobra.Command {
				dockerComposeCmd := &cobra.Command{Use: commands.PluginName}
				upCmd := &cobra.Command{Use: "up"}

				dockerComposeCmd.AddCommand(upCmd)

				return upCmd
			},
			want: []string{"up"},
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			cmd := tt.setupCmd()
			got := commandName(cmd)
			if !reflect.DeepEqual(got, tt.want) {
				t.Errorf("commandName() = %v, want %v", got, tt.want)
			}
		})
	}
}


================================================
FILE: cmd/compatibility/convert.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compatibility

import (
	"fmt"
	"os"
	"slices"
	"strings"

	"github.com/docker/compose/v5/cmd/compose"
)

func getCompletionCommands() []string {
	return []string{
		"__complete",
		"__completeNoDesc",
	}
}

func getBoolFlags() []string {
	return []string{
		"--debug", "-D",
		"--verbose",
		"--tls",
		"--tlsverify",
	}
}

func getStringFlags() []string {
	return []string{
		"--tlscacert",
		"--tlscert",
		"--tlskey",
		"--host", "-H",
		"--context",
		"--log-level",
	}
}

// Convert transforms standalone docker-compose args into CLI plugin compliant ones
func Convert(args []string) []string {
	var rootFlags []string
	command := []string{compose.PluginName}
	l := len(args)
ARGS:
	for i := 0; i < l; i++ {
		arg := args[i]
		if slices.Contains(getCompletionCommands(), arg) {
			command = append([]string{arg}, command...)
			continue
		}
		if arg != "" && arg[0] != '-' {
			command = append(command, args[i:]...)
			break
		}

		switch arg {
		case "--verbose":
			arg = "--debug"
		case "-h":
			// docker cli has deprecated -h to avoid ambiguity with -H, while docker-compose still support it
			arg = "--help"
		case "--version", "-v":
			// redirect --version pseudo-command to actual command
			arg = "version"
		}

		if slices.Contains(getBoolFlags(), arg) {
			rootFlags = append(rootFlags, arg)
			continue
		}
		for _, flag := range getStringFlags() {
			if arg == flag {
				i++
				if i >= l {
					fmt.Fprintf(os.Stderr, "flag needs an argument: '%s'\n", arg)
					os.Exit(1)
				}
				rootFlags = append(rootFlags, arg, args[i])
				continue ARGS
			}
			if strings.HasPrefix(arg, flag) {
				_, val, found := strings.Cut(arg, "=")
				if found {
					rootFlags = append(rootFlags, flag, val)
					continue ARGS
				}
			}
		}
		command = append(command, arg)
	}
	return append(rootFlags, command...)
}


================================================
FILE: cmd/compatibility/convert_test.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compatibility

import (
	"errors"
	"os"
	"os/exec"
	"testing"

	"gotest.tools/v3/assert"
)

func Test_convert(t *testing.T) {
	tests := []struct {
		name    string
		args    []string
		want    []string
		wantErr bool
	}{
		{
			name: "compose only",
			args: []string{"up"},
			want: []string{"compose", "up"},
		},
		{
			name: "with context",
			args: []string{"--context", "foo", "-f", "compose.yaml", "up"},
			want: []string{"--context", "foo", "compose", "-f", "compose.yaml", "up"},
		},
		{
			name: "with context arg",
			args: []string{"--context=foo", "-f", "compose.yaml", "up"},
			want: []string{"--context", "foo", "compose", "-f", "compose.yaml", "up"},
		},
		{
			name: "with host",
			args: []string{"--host", "tcp://1.2.3.4", "up"},
			want: []string{"--host", "tcp://1.2.3.4", "compose", "up"},
		},
		{
			name: "compose --verbose",
			args: []string{"--verbose"},
			want: []string{"--debug", "compose"},
		},
		{
			name: "compose --version",
			args: []string{"--version"},
			want: []string{"compose", "version"},
		},
		{
			name: "compose -v",
			args: []string{"-v"},
			want: []string{"compose", "version"},
		},
		{
			name: "help",
			args: []string{"-h"},
			want: []string{"compose", "--help"},
		},
		{
			name: "issues/1962",
			args: []string{"psql", "-h", "postgres"},
			want: []string{"compose", "psql", "-h", "postgres"}, // -h should not be converted to --help
		},
		{
			name: "issues/8648",
			args: []string{"exec", "mongo", "mongo", "--host", "mongo"},
			want: []string{"compose", "exec", "mongo", "mongo", "--host", "mongo"}, // --host is passed to exec
		},
		{
			name: "issues/12",
			args: []string{"--log-level", "INFO", "up"},
			want: []string{"--log-level", "INFO", "compose", "up"},
		},
		{
			name: "empty string argument",
			args: []string{"--project-directory", "", "ps"},
			want: []string{"compose", "--project-directory", "", "ps"},
		},
		{
			name: "compose as project name",
			args: []string{"--project-name", "compose", "down", "--remove-orphans"},
			want: []string{"compose", "--project-name", "compose", "down", "--remove-orphans"},
		},
		{
			name: "completion command",
			args: []string{"__complete", "up"},
			want: []string{"__complete", "compose", "up"},
		},
		{
			name:    "string flag without argument",
			args:    []string{"--log-level"},
			wantErr: true,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if tt.wantErr {
				if os.Getenv("BE_CRASHER") == "1" {
					Convert(tt.args)
					return
				}
				cmd := exec.Command(os.Args[0], "-test.run=^"+t.Name()+"$")
				cmd.Env = append(os.Environ(), "BE_CRASHER=1")
				err := cmd.Run()
				var e *exec.ExitError
				if errors.As(err, &e) && !e.Success() {
					return
				}
				t.Fatalf("process ran with err %v, want exit status 1", err)
			} else {
				got := Convert(tt.args)
				assert.DeepEqual(t, tt.want, got)
			}
		})
	}
}


================================================
FILE: cmd/compose/alpha.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
       http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"
)

// alphaCommand groups all experimental subcommands
func alphaCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	cmd := &cobra.Command{
		Short:  "Experimental commands",
		Use:    "alpha [COMMAND]",
		Hidden: true,
		Annotations: map[string]string{
			"experimentalCLI": "true",
		},
	}
	cmd.AddCommand(
		vizCommand(p, dockerCli, backendOptions),
		publishCommand(p, dockerCli, backendOptions),
		generateCommand(p, dockerCli, backendOptions),
	)
	return cmd
}


================================================
FILE: cmd/compose/attach.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"

	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type attachOpts struct {
	*composeOptions

	service string
	index   int

	detachKeys string
	noStdin    bool
	proxy      bool
}

func attachCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := attachOpts{
		composeOptions: &composeOptions{
			ProjectOptions: p,
		},
	}
	runCmd := &cobra.Command{
		Use:   "attach [OPTIONS] SERVICE",
		Short: "Attach local standard input, output, and error streams to a service's running container",
		Args:  cobra.MinimumNArgs(1),
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			opts.service = args[0]
			return nil
		}),
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runAttach(ctx, dockerCli, backendOptions, opts)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}

	runCmd.Flags().IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas.")
	runCmd.Flags().StringVarP(&opts.detachKeys, "detach-keys", "", "", "Override the key sequence for detaching from a container.")

	runCmd.Flags().BoolVar(&opts.noStdin, "no-stdin", false, "Do not attach STDIN")
	runCmd.Flags().BoolVar(&opts.proxy, "sig-proxy", true, "Proxy all received signals to the process")
	return runCmd
}

func runAttach(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts attachOpts) error {
	projectName, err := opts.toProjectName(ctx, dockerCli)
	if err != nil {
		return err
	}

	attachOpts := api.AttachOptions{
		Service:    opts.service,
		Index:      opts.index,
		DetachKeys: opts.detachKeys,
		NoStdin:    opts.noStdin,
		Proxy:      opts.proxy,
	}
	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	return backend.Attach(ctx, projectName, attachOpts)
}


================================================
FILE: cmd/compose/bridge.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"fmt"
	"io"

	"github.com/distribution/reference"
	"github.com/docker/cli/cli/command"
	"github.com/docker/go-units"
	"github.com/moby/moby/api/types/image"
	"github.com/moby/moby/client/pkg/stringid"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/cmd/formatter"
	"github.com/docker/compose/v5/pkg/bridge"
	"github.com/docker/compose/v5/pkg/compose"
)

func bridgeCommand(p *ProjectOptions, dockerCli command.Cli) *cobra.Command {
	cmd := &cobra.Command{
		Use:              "bridge CMD [OPTIONS]",
		Short:            "Convert compose files into another model",
		TraverseChildren: true,
	}
	cmd.AddCommand(
		convertCommand(p, dockerCli),
		transformersCommand(dockerCli),
	)
	return cmd
}

func convertCommand(p *ProjectOptions, dockerCli command.Cli) *cobra.Command {
	convertOpts := bridge.ConvertOptions{}
	cmd := &cobra.Command{
		Use:   "convert",
		Short: "Convert compose files to Kubernetes manifests, Helm charts, or another model",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runConvert(ctx, dockerCli, p, convertOpts)
		}),
	}
	flags := cmd.Flags()
	flags.StringVarP(&convertOpts.Output, "output", "o", "out", "The output directory for the Kubernetes resources")
	flags.StringArrayVarP(&convertOpts.Transformations, "transformation", "t", nil, "Transformation to apply to compose model (default: docker/compose-bridge-kubernetes)")
	flags.StringVar(&convertOpts.Templates, "templates", "", "Directory containing transformation templates")
	return cmd
}

func runConvert(ctx context.Context, dockerCli command.Cli, p *ProjectOptions, opts bridge.ConvertOptions) error {
	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, _, err := p.ToProject(ctx, dockerCli, backend, nil)
	if err != nil {
		return err
	}
	return bridge.Convert(ctx, dockerCli, project, opts)
}

func transformersCommand(dockerCli command.Cli) *cobra.Command {
	cmd := &cobra.Command{
		Use:   "transformations CMD [OPTIONS]",
		Short: "Manage transformation images",
	}
	cmd.AddCommand(
		listTransformersCommand(dockerCli),
		createTransformerCommand(dockerCli),
	)
	return cmd
}

func listTransformersCommand(dockerCli command.Cli) *cobra.Command {
	options := lsOptions{}
	cmd := &cobra.Command{
		Use:     "list",
		Aliases: []string{"ls"},
		Short:   "List available transformations",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			transformers, err := bridge.ListTransformers(ctx, dockerCli)
			if err != nil {
				return err
			}
			return displayTransformer(dockerCli, transformers, options)
		}),
	}
	cmd.Flags().StringVar(&options.Format, "format", "table", "Format the output. Values: [table | json]")
	cmd.Flags().BoolVarP(&options.Quiet, "quiet", "q", false, "Only display transformer names")
	return cmd
}

func displayTransformer(dockerCli command.Cli, transformers []image.Summary, options lsOptions) error {
	if options.Quiet {
		for _, t := range transformers {
			if len(t.RepoTags) > 0 {
				_, _ = fmt.Fprintln(dockerCli.Out(), t.RepoTags[0])
			} else {
				_, _ = fmt.Fprintln(dockerCli.Out(), t.ID)
			}
		}
		return nil
	}
	return formatter.Print(transformers, options.Format, dockerCli.Out(),
		func(w io.Writer) {
			for _, img := range transformers {
				id := stringid.TruncateID(img.ID)
				size := units.HumanSizeWithPrecision(float64(img.Size), 3)
				repo, tag := "<none>", "<none>"
				if len(img.RepoTags) > 0 {
					ref, err := reference.ParseDockerRef(img.RepoTags[0])
					if err == nil {
						// ParseDockerRef will reject a local image ID
						repo = reference.FamiliarName(ref)
						if tagged, ok := ref.(reference.Tagged); ok {
							tag = tagged.Tag()
						}
					}
				}

				_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", id, repo, tag, size)
			}
		},
		"IMAGE ID", "REPO", "TAGS", "SIZE")
}

func createTransformerCommand(dockerCli command.Cli) *cobra.Command {
	var opts bridge.CreateTransformerOptions
	cmd := &cobra.Command{
		Use:   "create [OPTION] PATH",
		Short: "Create a new transformation",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			opts.Dest = args[0]
			return bridge.CreateTransformer(ctx, dockerCli, opts)
		}),
	}
	cmd.Flags().StringVarP(&opts.From, "from", "f", "", "Existing transformation to copy (default: docker/compose-bridge-kubernetes)")
	return cmd
}


================================================
FILE: cmd/compose/build.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"fmt"
	"os"
	"strings"

	"github.com/compose-spec/compose-go/v2/cli"
	"github.com/compose-spec/compose-go/v2/types"
	"github.com/docker/cli/cli/command"
	cliopts "github.com/docker/cli/opts"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/cmd/display"
	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type buildOptions struct {
	*ProjectOptions
	quiet      bool
	pull       bool
	push       bool
	args       []string
	noCache    bool
	memory     cliopts.MemBytes
	ssh        string
	builder    string
	deps       bool
	print      bool
	check      bool
	sbom       string
	provenance string
}

func (opts buildOptions) toAPIBuildOptions(services []string) (api.BuildOptions, error) {
	var SSHKeys []types.SSHKey
	if opts.ssh != "" {
		id, path, found := strings.Cut(opts.ssh, "=")
		if !found && id != "default" {
			return api.BuildOptions{}, fmt.Errorf("invalid ssh key %q", opts.ssh)
		}
		SSHKeys = append(SSHKeys, types.SSHKey{
			ID:   id,
			Path: path,
		})
	}
	builderName := opts.builder
	if builderName == "" {
		builderName = os.Getenv("BUILDX_BUILDER")
	}

	uiMode := display.Mode
	if uiMode == display.ModeJSON {
		uiMode = "rawjson"
	}

	return api.BuildOptions{
		Pull:       opts.pull,
		Push:       opts.push,
		Progress:   uiMode,
		Args:       types.NewMappingWithEquals(opts.args),
		NoCache:    opts.noCache,
		Quiet:      opts.quiet,
		Services:   services,
		Deps:       opts.deps,
		Memory:     int64(opts.memory),
		Print:      opts.print,
		Check:      opts.check,
		SSHs:       SSHKeys,
		Builder:    builderName,
		SBOM:       opts.sbom,
		Provenance: opts.provenance,
	}, nil
}

func buildCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := buildOptions{
		ProjectOptions: p,
	}
	cmd := &cobra.Command{
		Use:   "build [OPTIONS] [SERVICE...]",
		Short: "Build or rebuild services",
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			if opts.quiet {
				display.Mode = display.ModeQuiet
				devnull, err := os.Open(os.DevNull)
				if err != nil {
					return err
				}
				os.Stdout = devnull
			}
			return nil
		}),
		RunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
			if cmd.Flags().Changed("ssh") && opts.ssh == "" {
				opts.ssh = "default"
			}
			if cmd.Flags().Changed("progress") && opts.ssh == "" {
				fmt.Fprint(os.Stderr, "--progress is a global compose flag, better use `docker compose --progress xx build ...\n")
			}
			return runBuild(ctx, dockerCli, backendOptions, opts, args)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}
	flags := cmd.Flags()
	flags.BoolVar(&opts.push, "push", false, "Push service images")
	flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Suppress the build output")
	flags.BoolVar(&opts.pull, "pull", false, "Always attempt to pull a newer version of the image")
	flags.StringArrayVar(&opts.args, "build-arg", []string{}, "Set build-time variables for services")
	flags.StringVar(&opts.ssh, "ssh", "", "Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)")
	flags.StringVar(&opts.builder, "builder", "", "Set builder to use")
	flags.BoolVar(&opts.deps, "with-dependencies", false, "Also build dependencies (transitively)")
	flags.StringVar(&opts.provenance, "provenance", "", `Add a provenance attestation`)
	flags.StringVar(&opts.sbom, "sbom", "", `Add a SBOM attestation`)

	flags.Bool("parallel", true, "Build images in parallel. DEPRECATED")
	flags.MarkHidden("parallel") //nolint:errcheck
	flags.Bool("compress", true, "Compress the build context using gzip. DEPRECATED")
	flags.MarkHidden("compress") //nolint:errcheck
	flags.Bool("force-rm", true, "Always remove intermediate containers. DEPRECATED")
	flags.MarkHidden("force-rm") //nolint:errcheck
	flags.BoolVar(&opts.noCache, "no-cache", false, "Do not use cache when building the image")
	flags.Bool("no-rm", false, "Do not remove intermediate containers after a successful build. DEPRECATED")
	flags.MarkHidden("no-rm") //nolint:errcheck
	flags.VarP(&opts.memory, "memory", "m", "Set memory limit for the build container. Not supported by BuildKit.")
	flags.StringVar(&p.Progress, "progress", "", fmt.Sprintf(`Set type of ui output (%s)`, strings.Join(printerModes, ", ")))
	flags.MarkHidden("progress") //nolint:errcheck
	flags.BoolVar(&opts.print, "print", false, "Print equivalent bake file")
	flags.BoolVar(&opts.check, "check", false, "Check build configuration")

	return cmd
}

func runBuild(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts buildOptions, services []string) error {
	if opts.print {
		backendOptions.Add(compose.WithEventProcessor(display.Quiet()))
	}
	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}

	opts.All = true // do not drop resources as build may involve some dependencies by additional_contexts
	project, _, err := opts.ToProject(ctx, dockerCli, backend, nil, cli.WithoutEnvironmentResolution)
	if err != nil {
		return err
	}

	if err := applyPlatforms(project, false); err != nil {
		return err
	}

	apiBuildOptions, err := opts.toAPIBuildOptions(services)
	if err != nil {
		return err
	}
	apiBuildOptions.Attestations = true

	return backend.Build(ctx, project, apiBuildOptions)
}


================================================
FILE: cmd/compose/commit.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"

	"github.com/docker/cli/cli/command"
	"github.com/docker/cli/opts"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type commitOptions struct {
	*ProjectOptions

	service   string
	reference string

	pause   bool
	comment string
	author  string
	changes opts.ListOpts

	index int
}

func commitCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	options := commitOptions{
		ProjectOptions: p,
	}
	cmd := &cobra.Command{
		Use:   "commit [OPTIONS] SERVICE [REPOSITORY[:TAG]]",
		Short: "Create a new image from a service container's changes",
		Args:  cobra.RangeArgs(1, 2),
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			options.service = args[0]
			if len(args) > 1 {
				options.reference = args[1]
			}

			return nil
		}),
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runCommit(ctx, dockerCli, backendOptions, options)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}

	flags := cmd.Flags()
	flags.IntVar(&options.index, "index", 0, "index of the container if service has multiple replicas.")

	flags.BoolVarP(&options.pause, "pause", "p", true, "Pause container during commit")
	flags.StringVarP(&options.comment, "message", "m", "", "Commit message")
	flags.StringVarP(&options.author, "author", "a", "", `Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")`)
	options.changes = opts.NewListOpts(nil)
	flags.VarP(&options.changes, "change", "c", "Apply Dockerfile instruction to the created image")

	return cmd
}

func runCommit(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, options commitOptions) error {
	projectName, err := options.toProjectName(ctx, dockerCli)
	if err != nil {
		return err
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	return backend.Commit(ctx, projectName, api.CommitOptions{
		Service:   options.service,
		Reference: options.reference,
		Pause:     options.pause,
		Comment:   options.comment,
		Author:    options.author,
		Changes:   options.changes,
		Index:     options.index,
	})
}


================================================
FILE: cmd/compose/completion.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"sort"
	"strings"

	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

// validArgsFn defines a completion func to be returned to fetch completion options
type validArgsFn func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func noCompletion() validArgsFn {
	return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		return []string{}, cobra.ShellCompDirectiveNoSpace
	}
}

func completeServiceNames(dockerCli command.Cli, p *ProjectOptions) validArgsFn {
	return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		p.Offline = true
		backend, err := compose.NewComposeService(dockerCli)
		if err != nil {
			return nil, cobra.ShellCompDirectiveNoFileComp
		}

		project, _, err := p.ToProject(cmd.Context(), dockerCli, backend, nil)
		if err != nil {
			return nil, cobra.ShellCompDirectiveNoFileComp
		}
		var values []string
		serviceNames := append(project.ServiceNames(), project.DisabledServiceNames()...)
		for _, s := range serviceNames {
			if toComplete == "" || strings.HasPrefix(s, toComplete) {
				values = append(values, s)
			}
		}
		return values, cobra.ShellCompDirectiveNoFileComp
	}
}

func completeProjectNames(dockerCli command.Cli, backendOptions *BackendOptions) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
	return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
		if err != nil {
			return nil, cobra.ShellCompDirectiveError
		}

		list, err := backend.List(cmd.Context(), api.ListOptions{
			All: true,
		})
		if err != nil {
			return nil, cobra.ShellCompDirectiveError
		}
		var values []string
		for _, stack := range list {
			if strings.HasPrefix(stack.Name, toComplete) {
				values = append(values, stack.Name)
			}
		}
		return values, cobra.ShellCompDirectiveNoFileComp
	}
}

func completeProfileNames(dockerCli command.Cli, p *ProjectOptions) validArgsFn {
	return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		p.Offline = true
		backend, err := compose.NewComposeService(dockerCli)
		if err != nil {
			return nil, cobra.ShellCompDirectiveNoFileComp
		}

		project, _, err := p.ToProject(cmd.Context(), dockerCli, backend, nil)
		if err != nil {
			return nil, cobra.ShellCompDirectiveNoFileComp
		}

		allProfileNames := project.AllServices().GetProfiles()
		sort.Strings(allProfileNames)

		var values []string
		for _, profileName := range allProfileNames {
			if strings.HasPrefix(profileName, toComplete) {
				values = append(values, profileName)
			}
		}
		return values, cobra.ShellCompDirectiveNoFileComp
	}
}

func completeScaleArgs(cli command.Cli, p *ProjectOptions) cobra.CompletionFunc {
	return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		completions, directive := completeServiceNames(cli, p)(cmd, args, toComplete)
		for i, completion := range completions {
			completions[i] = completion + "="
		}
		return completions, directive
	}
}


================================================
FILE: cmd/compose/compose.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"os"
	"os/signal"
	"path/filepath"
	"strconv"
	"strings"
	"syscall"

	"github.com/compose-spec/compose-go/v2/cli"
	"github.com/compose-spec/compose-go/v2/dotenv"
	"github.com/compose-spec/compose-go/v2/loader"
	composepaths "github.com/compose-spec/compose-go/v2/paths"
	"github.com/compose-spec/compose-go/v2/types"
	composegoutils "github.com/compose-spec/compose-go/v2/utils"
	dockercli "github.com/docker/cli/cli"
	"github.com/docker/cli/cli-plugins/metadata"
	"github.com/docker/cli/cli/command"
	"github.com/docker/cli/pkg/kvfile"
	"github.com/morikuni/aec"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	"github.com/spf13/pflag"

	"github.com/docker/compose/v5/cmd/display"
	"github.com/docker/compose/v5/cmd/formatter"
	"github.com/docker/compose/v5/internal/tracing"
	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
	"github.com/docker/compose/v5/pkg/remote"
	"github.com/docker/compose/v5/pkg/utils"
)

const (
	// ComposeParallelLimit set the limit running concurrent operation on docker engine
	ComposeParallelLimit = "COMPOSE_PARALLEL_LIMIT"
	// ComposeProjectName define the project name to be used, instead of guessing from parent directory
	ComposeProjectName = "COMPOSE_PROJECT_NAME"
	// ComposeCompatibility try to mimic compose v1 as much as possible
	ComposeCompatibility = api.ComposeCompatibility
	// ComposeRemoveOrphans remove "orphaned" containers, i.e. containers tagged for current project but not declared as service
	ComposeRemoveOrphans = "COMPOSE_REMOVE_ORPHANS"
	// ComposeIgnoreOrphans ignore "orphaned" containers
	ComposeIgnoreOrphans = "COMPOSE_IGNORE_ORPHANS"
	// ComposeEnvFiles defines the env files to use if --env-file isn't used
	ComposeEnvFiles = "COMPOSE_ENV_FILES"
	// ComposeMenu defines if the navigation menu should be rendered. Can be also set via --menu
	ComposeMenu = "COMPOSE_MENU"
	// ComposeProgress defines type of progress output, if --progress isn't used
	ComposeProgress = "COMPOSE_PROGRESS"
)

// rawEnv load a dot env file using docker/cli key=value parser, without attempt to interpolate or evaluate values
func rawEnv(r io.Reader, filename string, vars map[string]string, lookup func(key string) (string, bool)) error {
	lines, err := kvfile.ParseFromReader(r, lookup)
	if err != nil {
		return fmt.Errorf("failed to parse env_file %s: %w", filename, err)
	}
	for _, line := range lines {
		key, value, _ := strings.Cut(line, "=")
		vars[key] = value
	}
	return nil
}

var stdioToStdout bool

func init() {
	// compose evaluates env file values for interpolation
	// `raw` format allows to load env_file with the same parser used by docker run --env-file
	dotenv.RegisterFormat("raw", rawEnv)

	if v, ok := os.LookupEnv("COMPOSE_STATUS_STDOUT"); ok {
		stdioToStdout, _ = strconv.ParseBool(v)
	}
}

// Command defines a compose CLI command as a func with args
type Command func(context.Context, []string) error

// CobraCommand defines a cobra command function
type CobraCommand func(context.Context, *cobra.Command, []string) error

// AdaptCmd adapt a CobraCommand func to cobra library
func AdaptCmd(fn CobraCommand) func(cmd *cobra.Command, args []string) error {
	return func(cmd *cobra.Command, args []string) error {
		ctx, cancel := context.WithCancel(cmd.Context())

		s := make(chan os.Signal, 1)
		signal.Notify(s, syscall.SIGTERM, syscall.SIGINT)
		go func() {
			<-s
			cancel()
			signal.Stop(s)
			close(s)
		}()

		err := fn(ctx, cmd, args)
		if api.IsErrCanceled(err) || errors.Is(ctx.Err(), context.Canceled) {
			err = dockercli.StatusError{
				StatusCode: 130,
			}
		}
		if display.Mode == display.ModeJSON {
			err = makeJSONError(err)
		}
		return err
	}
}

// Adapt a Command func to cobra library
func Adapt(fn Command) func(cmd *cobra.Command, args []string) error {
	return AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
		return fn(ctx, args)
	})
}

type ProjectOptions struct {
	ProjectName        string
	Profiles           []string
	ConfigPaths        []string
	WorkDir            string
	ProjectDir         string
	EnvFiles           []string
	Compatibility      bool
	Progress           string
	Offline            bool
	All                bool
	insecureRegistries []string
}

// ProjectFunc does stuff within a types.Project
type ProjectFunc func(ctx context.Context, project *types.Project) error

// ProjectServicesFunc does stuff within a types.Project and a selection of services
type ProjectServicesFunc func(ctx context.Context, project *types.Project, services []string) error

// WithProject creates a cobra run command from a ProjectFunc based on configured project options and selected services
func (o *ProjectOptions) WithProject(fn ProjectFunc, dockerCli command.Cli) func(cmd *cobra.Command, args []string) error {
	return o.WithServices(dockerCli, func(ctx context.Context, project *types.Project, services []string) error {
		return fn(ctx, project)
	})
}

// WithServices creates a cobra run command from a ProjectFunc based on configured project options and selected services
func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn ProjectServicesFunc) func(cmd *cobra.Command, args []string) error {
	return Adapt(func(ctx context.Context, services []string) error {
		backend, err := compose.NewComposeService(dockerCli)
		if err != nil {
			return err
		}

		project, metrics, err := o.ToProject(ctx, dockerCli, backend, services, cli.WithoutEnvironmentResolution)
		if err != nil {
			return err
		}

		ctx = context.WithValue(ctx, tracing.MetricsKey{}, metrics)

		project, err = project.WithServicesEnvironmentResolved(true)
		if err != nil {
			return err
		}

		return fn(ctx, project, services)
	})
}

type jsonErrorData struct {
	Error   bool   `json:"error,omitempty"`
	Message string `json:"message,omitempty"`
}

func errorAsJSON(message string) string {
	errorMessage := &jsonErrorData{
		Error:   true,
		Message: message,
	}
	marshal, err := json.Marshal(errorMessage)
	if err == nil {
		return string(marshal)
	} else {
		return message
	}
}

func makeJSONError(err error) error {
	if err == nil {
		return nil
	}
	var statusErr dockercli.StatusError
	if errors.As(err, &statusErr) {
		return dockercli.StatusError{
			StatusCode: statusErr.StatusCode,
			Status:     errorAsJSON(statusErr.Status),
		}
	}
	return fmt.Errorf("%s", errorAsJSON(err.Error()))
}

func (o *ProjectOptions) addProjectFlags(f *pflag.FlagSet) {
	f.StringArrayVar(&o.Profiles, "profile", []string{}, "Specify a profile to enable")
	f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name")
	f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
	f.StringArrayVar(&o.insecureRegistries, "insecure-registry", []string{}, "Use insecure registry to pull Compose OCI artifacts. Doesn't apply to images")
	_ = f.MarkHidden("insecure-registry")
	f.StringArrayVar(&o.EnvFiles, "env-file", defaultStringArrayVar(ComposeEnvFiles), "Specify an alternate environment file")
	f.StringVar(&o.ProjectDir, "project-directory", "", "Specify an alternate working directory\n(default: the path of the, first specified, Compose file)")
	f.StringVar(&o.WorkDir, "workdir", "", "DEPRECATED! USE --project-directory INSTEAD.\nSpecify an alternate working directory\n(default: the path of the, first specified, Compose file)")
	f.BoolVar(&o.Compatibility, "compatibility", false, "Run compose in backward compatibility mode")
	f.StringVar(&o.Progress, "progress", os.Getenv(ComposeProgress), fmt.Sprintf(`Set type of progress output (%s)`, strings.Join(printerModes, ", ")))
	f.BoolVar(&o.All, "all-resources", false, "Include all resources, even those not used by services")
	_ = f.MarkHidden("workdir")
}

// get default value for a command line flag that is set by a coma-separated value in environment variable
func defaultStringArrayVar(env string) []string {
	return strings.FieldsFunc(os.Getenv(env), func(c rune) bool {
		return c == ','
	})
}

func (o *ProjectOptions) projectOrName(ctx context.Context, dockerCli command.Cli, services ...string) (*types.Project, string, error) {
	name := o.ProjectName
	var project *types.Project
	if len(o.ConfigPaths) > 0 || o.ProjectName == "" {
		backend, err := compose.NewComposeService(dockerCli)
		if err != nil {
			return nil, "", err
		}

		p, _, err := o.ToProject(ctx, dockerCli, backend, services, cli.WithDiscardEnvFile, cli.WithoutEnvironmentResolution)
		if err != nil {
			envProjectName := os.Getenv(ComposeProjectName)
			if envProjectName != "" {
				return nil, envProjectName, nil
			}
			return nil, "", err
		}
		project = p
		name = p.Name
	}
	return project, name, nil
}

func (o *ProjectOptions) toProjectName(ctx context.Context, dockerCli command.Cli) (string, error) {
	if o.ProjectName != "" {
		return o.ProjectName, nil
	}

	envProjectName := os.Getenv(ComposeProjectName)
	if envProjectName != "" {
		return envProjectName, nil
	}

	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return "", err
	}

	project, _, err := o.ToProject(ctx, dockerCli, backend, nil)
	if err != nil {
		return "", err
	}
	return project.Name, nil
}

func (o *ProjectOptions) ToModel(ctx context.Context, dockerCli command.Cli, services []string, po ...cli.ProjectOptionsFn) (map[string]any, error) {
	remotes := o.remoteLoaders(dockerCli)
	for _, r := range remotes {
		po = append(po, cli.WithResourceLoader(r))
	}

	options, err := o.toProjectOptions(po...)
	if err != nil {
		return nil, err
	}

	if o.Compatibility || utils.StringToBool(options.Environment[ComposeCompatibility]) {
		api.Separator = "_"
	}

	return options.LoadModel(ctx)
}

// ToProject loads a Compose project using the LoadProject API.
// Accepts optional cli.ProjectOptionsFn to control loader behavior.
func (o *ProjectOptions) ToProject(ctx context.Context, dockerCli command.Cli, backend api.Compose, services []string, po ...cli.ProjectOptionsFn) (*types.Project, tracing.Metrics, error) {
	var metrics tracing.Metrics
	remotes := o.remoteLoaders(dockerCli)

	// Setup metrics listener to collect project data
	metricsListener := func(event string, metadata map[string]any) {
		switch event {
		case "extends":
			metrics.CountExtends++
		case "include":
			paths := metadata["path"].(types.StringList)
			for _, path := range paths {
				var isRemote bool
				for _, r := range remotes {
					if r.Accept(path) {
						isRemote = true
						break
					}
				}
				if isRemote {
					metrics.CountIncludesRemote++
				} else {
					metrics.CountIncludesLocal++
				}
			}
		}
	}

	loadOpts := api.ProjectLoadOptions{
		ProjectName:       o.ProjectName,
		ConfigPaths:       o.ConfigPaths,
		WorkingDir:        o.ProjectDir,
		EnvFiles:          o.EnvFiles,
		Profiles:          o.Profiles,
		Services:          services,
		Offline:           o.Offline,
		All:               o.All,
		Compatibility:     o.Compatibility,
		ProjectOptionsFns: po,
		LoadListeners:     []api.LoadListener{metricsListener},
		OCI: api.OCIOptions{
			InsecureRegistries: o.insecureRegistries,
		},
	}

	project, err := backend.LoadProject(ctx, loadOpts)
	if err != nil {
		return nil, metrics, err
	}

	return project, metrics, nil
}

func (o *ProjectOptions) remoteLoaders(dockerCli command.Cli) []loader.ResourceLoader {
	if o.Offline {
		return nil
	}
	git := remote.NewGitRemoteLoader(dockerCli, o.Offline)
	oci := remote.NewOCIRemoteLoader(dockerCli, o.Offline, api.OCIOptions{})
	return []loader.ResourceLoader{git, oci}
}

func (o *ProjectOptions) toProjectOptions(po ...cli.ProjectOptionsFn) (*cli.ProjectOptions, error) {
	opts := []cli.ProjectOptionsFn{
		cli.WithWorkingDirectory(o.ProjectDir),
		// First apply os.Environment, always win
		cli.WithOsEnv,
	}

	if _, present := os.LookupEnv("PWD"); !present {
		if pwd, err := os.Getwd(); err != nil {
			return nil, err
		} else {
			opts = append(opts, cli.WithEnv([]string{"PWD=" + pwd}))
		}
	}

	opts = append(opts,
		// Load PWD/.env if present and no explicit --env-file has been set
		cli.WithEnvFiles(o.EnvFiles...),
		// read dot env file to populate project environment
		cli.WithDotEnv,
		// get compose file path set by COMPOSE_FILE
		cli.WithConfigFileEnv,
		// if none was selected, get default compose.yaml file from current dir or parent folder
		cli.WithDefaultConfigPath,
		// .. and then, a project directory != PWD maybe has been set so let's load .env file
		cli.WithEnvFiles(o.EnvFiles...), //nolint:gocritic // intentionally applying cli.WithEnvFiles twice.
		cli.WithDotEnv,                  //nolint:gocritic // intentionally applying cli.WithDotEnv twice.
		// eventually COMPOSE_PROFILES should have been set
		cli.WithDefaultProfiles(o.Profiles...),
		cli.WithName(o.ProjectName),
	)

	return cli.NewProjectOptions(o.ConfigPaths, append(po, opts...)...)
}

// PluginName is the name of the plugin
const PluginName = "compose"

// RunningAsStandalone detects when running as a standalone program
func RunningAsStandalone() bool {
	return len(os.Args) < 2 || os.Args[1] != metadata.MetadataSubcommandName && os.Args[1] != PluginName
}

type BackendOptions struct {
	Options []compose.Option
}

func (o *BackendOptions) Add(option compose.Option) {
	o.Options = append(o.Options, option)
}

// RootCommand returns the compose command with its child commands
func RootCommand(dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command { //nolint:gocyclo
	opts := ProjectOptions{}
	var (
		ansi     string
		noAnsi   bool
		verbose  bool
		version  bool
		parallel int
		dryRun   bool
	)
	c := &cobra.Command{
		Short:            "Docker Compose",
		Long:             "Define and run multi-container applications with Docker",
		Use:              PluginName,
		TraverseChildren: true,
		// By default (no Run/RunE in parent c) for typos in subcommands, cobra displays the help of parent c but exit(0) !
		RunE: func(cmd *cobra.Command, args []string) error {
			if len(args) == 0 {
				return cmd.Help()
			}
			if version {
				return versionCommand(dockerCli).Execute()
			}
			_ = cmd.Help()
			return dockercli.StatusError{
				StatusCode: 1,
				Status:     fmt.Sprintf("unknown docker command: %q", "compose "+args[0]),
			}
		},
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
			parent := cmd.Root()
			if parent != nil {
				parentPrerun := parent.PersistentPreRunE
				if parentPrerun != nil {
					err := parentPrerun(cmd, args)
					if err != nil {
						return err
					}
				}
			}

			if verbose {
				logrus.SetLevel(logrus.TraceLevel)
			}

			err := setEnvWithDotEnv(opts, dockerCli)
			if err != nil {
				return err
			}
			if noAnsi {
				if ansi != "auto" {
					return errors.New(`cannot specify DEPRECATED "--no-ansi" and "--ansi". Please use only "--ansi"`)
				}
				ansi = "never"
				fmt.Fprint(os.Stderr, "option '--no-ansi' is DEPRECATED ! Please use '--ansi' instead.\n")
			}
			if v, ok := os.LookupEnv("COMPOSE_ANSI"); ok && !cmd.Flags().Changed("ansi") {
				ansi = v
			}
			formatter.SetANSIMode(dockerCli, ansi)

			if noColor, ok := os.LookupEnv("NO_COLOR"); ok && noColor != "" {
				display.NoColor()
				formatter.SetANSIMode(dockerCli, formatter.Never)
			}

			switch ansi {
			case "never":
				display.Mode = display.ModePlain
			case "always":
				display.Mode = display.ModeTTY
			}

			detached, _ := cmd.Flags().GetBool("detach")
			var ep api.EventProcessor
			switch opts.Progress {
			case "", display.ModeAuto:
				switch {
				case ansi == "never":
					display.Mode = display.ModePlain
					ep = display.Plain(dockerCli.Err())
				case dockerCli.Out().IsTerminal():
					ep = display.Full(dockerCli.Err(), stdinfo(dockerCli), detached)
				default:
					ep = display.Plain(dockerCli.Err())
				}
			case display.ModeTTY:
				if ansi == "never" {
					return fmt.Errorf("can't use --progress tty while ANSI support is disabled")
				}
				display.Mode = display.ModeTTY
				ep = display.Full(dockerCli.Err(), stdinfo(dockerCli), detached)

			case display.ModePlain:
				if ansi == "always" {
					return fmt.Errorf("can't use --progress plain while ANSI support is forced")
				}
				display.Mode = display.ModePlain
				ep = display.Plain(dockerCli.Err())
			case display.ModeQuiet, "none":
				display.Mode = display.ModeQuiet
				ep = display.Quiet()
			case display.ModeJSON:
				display.Mode = display.ModeJSON
				logrus.SetFormatter(&logrus.JSONFormatter{})
				ep = display.JSON(dockerCli.Err())
			default:
				return fmt.Errorf("unsupported --progress value %q", opts.Progress)
			}
			backendOptions.Add(compose.WithEventProcessor(ep))

			// (4) options validation / normalization
			if opts.WorkDir != "" {
				if opts.ProjectDir != "" {
					return errors.New(`cannot specify DEPRECATED "--workdir" and "--project-directory". Please use only "--project-directory" instead`)
				}
				opts.ProjectDir = opts.WorkDir
				fmt.Fprint(os.Stderr, aec.Apply("option '--workdir' is DEPRECATED at root level! Please use '--project-directory' instead.\n", aec.RedF))
			}
			for i, file := range opts.EnvFiles {
				file = composepaths.ExpandUser(file)
				if !filepath.IsAbs(file) {
					file, err := filepath.Abs(file)
					if err != nil {
						return err
					}
					opts.EnvFiles[i] = file
				} else {
					opts.EnvFiles[i] = file
				}
			}

			composeCmd := cmd
			for composeCmd.Name() != PluginName {
				if !composeCmd.HasParent() {
					return fmt.Errorf("error parsing command line, expected %q", PluginName)
				}
				composeCmd = composeCmd.Parent()
			}

			if v, ok := os.LookupEnv(ComposeParallelLimit); ok && !composeCmd.Flags().Changed("parallel") {
				i, err := strconv.Atoi(v)
				if err != nil {
					return fmt.Errorf("%s must be an integer (found: %q)", ComposeParallelLimit, v)
				}
				parallel = i
			}
			if parallel > 0 {
				logrus.Debugf("Limiting max concurrency to %d jobs", parallel)
				backendOptions.Add(compose.WithMaxConcurrency(parallel))
			}

			// dry run detection
			if dryRun {
				backendOptions.Add(compose.WithDryRun)
			}
			return nil
		},
	}

	c.AddCommand(
		upCommand(&opts, dockerCli, backendOptions),
		downCommand(&opts, dockerCli, backendOptions),
		startCommand(&opts, dockerCli, backendOptions),
		restartCommand(&opts, dockerCli, backendOptions),
		stopCommand(&opts, dockerCli, backendOptions),
		psCommand(&opts, dockerCli, backendOptions),
		listCommand(dockerCli, backendOptions),
		logsCommand(&opts, dockerCli, backendOptions),
		configCommand(&opts, dockerCli),
		killCommand(&opts, dockerCli, backendOptions),
		runCommand(&opts, dockerCli, backendOptions),
		removeCommand(&opts, dockerCli, backendOptions),
		execCommand(&opts, dockerCli, backendOptions),
		attachCommand(&opts, dockerCli, backendOptions),
		exportCommand(&opts, dockerCli, backendOptions),
		commitCommand(&opts, dockerCli, backendOptions),
		pauseCommand(&opts, dockerCli, backendOptions),
		unpauseCommand(&opts, dockerCli, backendOptions),
		topCommand(&opts, dockerCli, backendOptions),
		eventsCommand(&opts, dockerCli, backendOptions),
		portCommand(&opts, dockerCli, backendOptions),
		imagesCommand(&opts, dockerCli, backendOptions),
		versionCommand(dockerCli),
		buildCommand(&opts, dockerCli, backendOptions),
		pushCommand(&opts, dockerCli, backendOptions),
		pullCommand(&opts, dockerCli, backendOptions),
		createCommand(&opts, dockerCli, backendOptions),
		copyCommand(&opts, dockerCli, backendOptions),
		waitCommand(&opts, dockerCli, backendOptions),
		scaleCommand(&opts, dockerCli, backendOptions),
		statsCommand(&opts, dockerCli),
		watchCommand(&opts, dockerCli, backendOptions),
		publishCommand(&opts, dockerCli, backendOptions),
		alphaCommand(&opts, dockerCli, backendOptions),
		bridgeCommand(&opts, dockerCli),
		volumesCommand(&opts, dockerCli, backendOptions),
	)

	c.Flags().SetInterspersed(false)
	opts.addProjectFlags(c.Flags())
	c.RegisterFlagCompletionFunc( //nolint:errcheck
		"project-name",
		completeProjectNames(dockerCli, backendOptions),
	)
	c.RegisterFlagCompletionFunc( //nolint:errcheck
		"project-directory",
		func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
			return []string{}, cobra.ShellCompDirectiveFilterDirs
		},
	)
	c.RegisterFlagCompletionFunc( //nolint:errcheck
		"file",
		func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
			return []string{"yaml", "yml"}, cobra.ShellCompDirectiveFilterFileExt
		},
	)
	c.RegisterFlagCompletionFunc( //nolint:errcheck
		"profile",
		completeProfileNames(dockerCli, &opts),
	)
	c.RegisterFlagCompletionFunc( //nolint:errcheck
		"progress",
		cobra.FixedCompletions(printerModes, cobra.ShellCompDirectiveNoFileComp),
	)

	c.Flags().StringVar(&ansi, "ansi", "auto", `Control when to print ANSI control characters ("never"|"always"|"auto")`)
	c.Flags().IntVar(&parallel, "parallel", -1, `Control max parallelism, -1 for unlimited`)
	c.Flags().BoolVarP(&version, "version", "v", false, "Show the Docker Compose version information")
	c.PersistentFlags().BoolVar(&dryRun, "dry-run", false, "Execute command in dry run mode")
	c.Flags().MarkHidden("version") //nolint:errcheck
	c.Flags().BoolVar(&noAnsi, "no-ansi", false, `Do not print ANSI control characters (DEPRECATED)`)
	c.Flags().MarkHidden("no-ansi") //nolint:errcheck
	c.Flags().BoolVar(&verbose, "verbose", false, "Show more output")
	c.Flags().MarkHidden("verbose") //nolint:errcheck
	return c
}

func stdinfo(dockerCli command.Cli) io.Writer {
	if stdioToStdout {
		return dockerCli.Out()
	}
	return dockerCli.Err()
}

func setEnvWithDotEnv(opts ProjectOptions, dockerCli command.Cli) error {
	// Check if we're using a remote config (OCI or Git)
	// If so, skip env loading as remote loaders haven't been initialized yet
	// and trying to process the path would fail
	remoteLoaders := opts.remoteLoaders(dockerCli)
	for _, path := range opts.ConfigPaths {
		for _, loader := range remoteLoaders {
			if loader.Accept(path) {
				// Remote config - skip env loading for now
				// It will be loaded later when the project is fully initialized
				return nil
			}
		}
	}

	options, err := cli.NewProjectOptions(opts.ConfigPaths,
		cli.WithWorkingDirectory(opts.ProjectDir),
		cli.WithOsEnv,
		cli.WithEnvFiles(opts.EnvFiles...),
		cli.WithDotEnv,
	)
	if err != nil {
		return err
	}
	envFromFile, err := dotenv.GetEnvFromFile(composegoutils.GetAsEqualsMap(os.Environ()), options.EnvFiles)
	if err != nil {
		return err
	}
	for k, v := range envFromFile {
		if _, ok := os.LookupEnv(k); !ok && strings.HasPrefix(k, "COMPOSE_") {
			if err := os.Setenv(k, v); err != nil {
				return err
			}
		}
	}
	return nil
}

var printerModes = []string{
	display.ModeAuto,
	display.ModeTTY,
	display.ModePlain,
	display.ModeJSON,
	display.ModeQuiet,
}


================================================
FILE: cmd/compose/compose_oci_test.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"testing"

	"go.uber.org/mock/gomock"
	"gotest.tools/v3/assert"

	"github.com/docker/compose/v5/pkg/mocks"
)

func TestSetEnvWithDotEnv_WithOCIArtifact(t *testing.T) {
	// Test that setEnvWithDotEnv doesn't fail when using OCI artifacts
	ctrl := gomock.NewController(t)
	defer ctrl.Finish()
	cli := mocks.NewMockCli(ctrl)

	opts := ProjectOptions{
		ConfigPaths: []string{"oci://docker.io/dockersamples/welcome-to-docker"},
		ProjectDir:  "",
		EnvFiles:    []string{},
	}

	err := setEnvWithDotEnv(opts, cli)
	assert.NilError(t, err, "setEnvWithDotEnv should not fail with OCI artifact path")
}

func TestSetEnvWithDotEnv_WithGitRemote(t *testing.T) {
	// Test that setEnvWithDotEnv doesn't fail when using Git remotes
	ctrl := gomock.NewController(t)
	defer ctrl.Finish()
	cli := mocks.NewMockCli(ctrl)

	opts := ProjectOptions{
		ConfigPaths: []string{"https://github.com/docker/compose.git"},
		ProjectDir:  "",
		EnvFiles:    []string{},
	}

	err := setEnvWithDotEnv(opts, cli)
	assert.NilError(t, err, "setEnvWithDotEnv should not fail with Git remote path")
}

func TestSetEnvWithDotEnv_WithLocalPath(t *testing.T) {
	// Test that setEnvWithDotEnv still works with local paths
	// This will fail if the file doesn't exist, but it should not panic
	// or produce invalid paths
	ctrl := gomock.NewController(t)
	defer ctrl.Finish()
	cli := mocks.NewMockCli(ctrl)

	opts := ProjectOptions{
		ConfigPaths: []string{"compose.yaml"},
		ProjectDir:  "",
		EnvFiles:    []string{},
	}

	// This may error if files don't exist, but should not panic
	_ = setEnvWithDotEnv(opts, cli)
}


================================================
FILE: cmd/compose/compose_test.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"testing"

	"github.com/compose-spec/compose-go/v2/types"
	"gotest.tools/v3/assert"
)

func TestFilterServices(t *testing.T) {
	p := &types.Project{
		Services: types.Services{
			"foo": {
				Name:  "foo",
				Links: []string{"bar"},
			},
			"bar": {
				Name: "bar",
				DependsOn: map[string]types.ServiceDependency{
					"zot": {},
				},
			},
			"zot": {
				Name: "zot",
			},
			"qix": {
				Name: "qix",
			},
		},
	}
	p, err := p.WithSelectedServices([]string{"bar"})
	assert.NilError(t, err)

	assert.Equal(t, len(p.Services), 2)
	_, err = p.GetService("bar")
	assert.NilError(t, err)
	_, err = p.GetService("zot")
	assert.NilError(t, err)
}


================================================
FILE: cmd/compose/config.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io"
	"os"
	"slices"
	"sort"
	"strings"

	"github.com/compose-spec/compose-go/v2/cli"
	"github.com/compose-spec/compose-go/v2/template"
	"github.com/compose-spec/compose-go/v2/types"
	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"
	"go.yaml.in/yaml/v4"

	"github.com/docker/compose/v5/cmd/formatter"
	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type configOptions struct {
	*ProjectOptions
	Format              string
	Output              string
	quiet               bool
	resolveImageDigests bool
	noInterpolate       bool
	noNormalize         bool
	noResolvePath       bool
	noResolveEnv        bool
	services            bool
	volumes             bool
	networks            bool
	models              bool
	profiles            bool
	images              bool
	hash                string
	noConsistency       bool
	variables           bool
	environment         bool
	lockImageDigests    bool
}

func (o *configOptions) ToProject(ctx context.Context, dockerCli command.Cli, backend api.Compose, services []string) (*types.Project, error) {
	project, _, err := o.ProjectOptions.ToProject(ctx, dockerCli, backend, services, o.toProjectOptionsFns()...)
	return project, err
}

func (o *configOptions) ToModel(ctx context.Context, dockerCli command.Cli, services []string, po ...cli.ProjectOptionsFn) (map[string]any, error) {
	po = append(po, o.toProjectOptionsFns()...)
	return o.ProjectOptions.ToModel(ctx, dockerCli, services, po...)
}

// toProjectOptionsFns converts config options to cli.ProjectOptionsFn
func (o *configOptions) toProjectOptionsFns() []cli.ProjectOptionsFn {
	fns := []cli.ProjectOptionsFn{
		cli.WithInterpolation(!o.noInterpolate),
		cli.WithResolvedPaths(!o.noResolvePath),
		cli.WithNormalization(!o.noNormalize),
		cli.WithConsistency(!o.noConsistency),
		cli.WithDefaultProfiles(o.Profiles...),
		cli.WithDiscardEnvFile,
	}
	if o.noResolveEnv {
		fns = append(fns, cli.WithoutEnvironmentResolution)
	}
	return fns
}

func configCommand(p *ProjectOptions, dockerCli command.Cli) *cobra.Command {
	opts := configOptions{
		ProjectOptions: p,
	}
	cmd := &cobra.Command{
		Use:   "config [OPTIONS] [SERVICE...]",
		Short: "Parse, resolve and render compose file in canonical format",
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			if opts.quiet {
				devnull, err := os.Open(os.DevNull)
				if err != nil {
					return err
				}
				os.Stdout = devnull
			}
			if p.Compatibility {
				opts.noNormalize = true
			}
			if opts.lockImageDigests {
				opts.resolveImageDigests = true
			}
			return nil
		}),
		RunE: Adapt(func(ctx context.Context, args []string) error {
			if opts.services {
				return runServices(ctx, dockerCli, opts)
			}
			if opts.volumes {
				return runVolumes(ctx, dockerCli, opts)
			}
			if opts.networks {
				return runNetworks(ctx, dockerCli, opts)
			}
			if opts.models {
				return runModels(ctx, dockerCli, opts)
			}
			if opts.hash != "" {
				return runHash(ctx, dockerCli, opts)
			}
			if opts.profiles {
				return runProfiles(ctx, dockerCli, opts, args)
			}
			if opts.images {
				return runConfigImages(ctx, dockerCli, opts, args)
			}
			if opts.variables {
				return runVariables(ctx, dockerCli, opts, args)
			}
			if opts.environment {
				return runEnvironment(ctx, dockerCli, opts, args)
			}

			if opts.Format == "" {
				opts.Format = "yaml"
			}
			return runConfig(ctx, dockerCli, opts, args)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}
	flags := cmd.Flags()
	flags.StringVar(&opts.Format, "format", "", "Format the output. Values: [yaml | json]")
	flags.BoolVar(&opts.resolveImageDigests, "resolve-image-digests", false, "Pin image tags to digests")
	flags.BoolVar(&opts.lockImageDigests, "lock-image-digests", false, "Produces an override file with image digests")
	flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Only validate the configuration, don't print anything")
	flags.BoolVar(&opts.noInterpolate, "no-interpolate", false, "Don't interpolate environment variables")
	flags.BoolVar(&opts.noNormalize, "no-normalize", false, "Don't normalize compose model")
	flags.BoolVar(&opts.noResolvePath, "no-path-resolution", false, "Don't resolve file paths")
	flags.BoolVar(&opts.noConsistency, "no-consistency", false, "Don't check model consistency - warning: may produce invalid Compose output")
	flags.BoolVar(&opts.noResolveEnv, "no-env-resolution", false, "Don't resolve service env files")

	flags.BoolVar(&opts.services, "services", false, "Print the service names, one per line.")
	flags.BoolVar(&opts.volumes, "volumes", false, "Print the volume names, one per line.")
	flags.BoolVar(&opts.networks, "networks", false, "Print the network names, one per line.")
	flags.BoolVar(&opts.models, "models", false, "Print the model names, one per line.")
	flags.BoolVar(&opts.profiles, "profiles", false, "Print the profile names, one per line.")
	flags.BoolVar(&opts.images, "images", false, "Print the image names, one per line.")
	flags.StringVar(&opts.hash, "hash", "", "Print the service config hash, one per line.")
	flags.BoolVar(&opts.variables, "variables", false, "Print model variables and default values.")
	flags.BoolVar(&opts.environment, "environment", false, "Print environment used for interpolation.")
	flags.StringVarP(&opts.Output, "output", "o", "", "Save to file (default to stdout)")

	return cmd
}

func runConfig(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) (err error) {
	var content []byte
	if opts.noInterpolate {
		content, err = runConfigNoInterpolate(ctx, dockerCli, opts, services)
		if err != nil {
			return err
		}
	} else {
		content, err = runConfigInterpolate(ctx, dockerCli, opts, services)
		if err != nil {
			return err
		}
	}

	if !opts.noInterpolate {
		content = escapeDollarSign(content)
	}

	if opts.quiet {
		return nil
	}

	if opts.Output != "" && len(content) > 0 {
		return os.WriteFile(opts.Output, content, 0o666)
	}
	_, err = fmt.Fprint(dockerCli.Out(), string(content))
	return err
}

func runConfigInterpolate(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) ([]byte, error) {
	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return nil, err
	}

	project, err := opts.ToProject(ctx, dockerCli, backend, services)
	if err != nil {
		return nil, err
	}

	if opts.resolveImageDigests {
		project, err = project.WithImagesResolved(compose.ImageDigestResolver(ctx, dockerCli.ConfigFile(), dockerCli.Client()))
		if err != nil {
			return nil, err
		}
	}

	if !opts.noResolveEnv {
		project, err = project.WithServicesEnvironmentResolved(true)
		if err != nil {
			return nil, err
		}
	}

	if !opts.noConsistency {
		err := project.CheckContainerNameUnicity()
		if err != nil {
			return nil, err
		}
	}

	if opts.lockImageDigests {
		project = imagesOnly(project)
	}

	var content []byte
	switch opts.Format {
	case "json":
		content, err = project.MarshalJSON()
	case "yaml":
		content, err = project.MarshalYAML()
	default:
		return nil, fmt.Errorf("unsupported format %q", opts.Format)
	}
	if err != nil {
		return nil, err
	}
	return content, nil
}

// imagesOnly return project with all attributes removed but service.images
func imagesOnly(project *types.Project) *types.Project {
	digests := types.Services{}
	for name, config := range project.Services {
		digests[name] = types.ServiceConfig{
			Image: config.Image,
		}
	}
	project = &types.Project{Services: digests}
	return project
}

func runConfigNoInterpolate(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) ([]byte, error) {
	// we can't use ToProject, so the model we render here is only partially resolved
	model, err := opts.ToModel(ctx, dockerCli, services)
	if err != nil {
		return nil, err
	}

	if opts.resolveImageDigests {
		err = resolveImageDigests(ctx, dockerCli, model)
		if err != nil {
			return nil, err
		}
	}

	if opts.lockImageDigests {
		for key, e := range model {
			if key != "services" {
				delete(model, key)
			} else {
				for _, s := range e.(map[string]any) {
					service := s.(map[string]any)
					for key := range service {
						if key != "image" {
							delete(service, key)
						}
					}
				}
			}
		}
	}

	return formatModel(model, opts.Format)
}

func resolveImageDigests(ctx context.Context, dockerCli command.Cli, model map[string]any) (err error) {
	// create a pseudo-project so we can rely on WithImagesResolved to resolve images
	p := &types.Project{
		Services: types.Services{},
	}
	services := model["services"].(map[string]any)
	for name, s := range services {
		service := s.(map[string]any)
		if image, ok := service["image"]; ok {
			p.Services[name] = types.ServiceConfig{
				Image: image.(string),
			}
		}
	}

	p, err = p.WithImagesResolved(compose.ImageDigestResolver(ctx, dockerCli.ConfigFile(), dockerCli.Client()))
	if err != nil {
		return err
	}

	// Collect image resolved with digest and update model accordingly
	for name, s := range services {
		service := s.(map[string]any)
		config := p.Services[name]
		if config.Image != "" {
			service["image"] = config.Image
		}
		services[name] = service
	}
	model["services"] = services
	return nil
}

func formatModel(model map[string]any, format string) (content []byte, err error) {
	switch format {
	case "json":
		return json.MarshalIndent(model, "", "  ")
	case "yaml":
		buf := bytes.NewBuffer([]byte{})
		encoder := yaml.NewEncoder(buf)
		encoder.SetIndent(2)
		err = encoder.Encode(model)
		return buf.Bytes(), err
	default:
		return nil, fmt.Errorf("unsupported format %q", format)
	}
}

func runServices(ctx context.Context, dockerCli command.Cli, opts configOptions) error {
	if opts.noInterpolate {
		// we can't use ToProject, so the model we render here is only partially resolved
		data, err := opts.ToModel(ctx, dockerCli, nil, cli.WithoutEnvironmentResolution)
		if err != nil {
			return err
		}

		if _, ok := data["services"]; ok {
			for serviceName := range data["services"].(map[string]any) {
				_, _ = fmt.Fprintln(dockerCli.Out(), serviceName)
			}
		}

		return nil
	}

	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, _, err := opts.ProjectOptions.ToProject(ctx, dockerCli, backend, nil, cli.WithoutEnvironmentResolution)
	if err != nil {
		return err
	}
	err = project.ForEachService(project.ServiceNames(), func(serviceName string, _ *types.ServiceConfig) error {
		_, _ = fmt.Fprintln(dockerCli.Out(), serviceName)
		return nil
	})

	return err
}

func runVolumes(ctx context.Context, dockerCli command.Cli, opts configOptions) error {
	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, _, err := opts.ProjectOptions.ToProject(ctx, dockerCli, backend, nil, cli.WithoutEnvironmentResolution)
	if err != nil {
		return err
	}
	for n := range project.Volumes {
		_, _ = fmt.Fprintln(dockerCli.Out(), n)
	}
	return nil
}

func runNetworks(ctx context.Context, dockerCli command.Cli, opts configOptions) error {
	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, _, err := opts.ProjectOptions.ToProject(ctx, dockerCli, backend, nil, cli.WithoutEnvironmentResolution)
	if err != nil {
		return err
	}
	for n := range project.Networks {
		_, _ = fmt.Fprintln(dockerCli.Out(), n)
	}
	return nil
}

func runModels(ctx context.Context, dockerCli command.Cli, opts configOptions) error {
	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, _, err := opts.ProjectOptions.ToProject(ctx, dockerCli, backend, nil, cli.WithoutEnvironmentResolution)
	if err != nil {
		return err
	}
	for _, model := range project.Models {
		if model.Model != "" {
			_, _ = fmt.Fprintln(dockerCli.Out(), model.Model)
		}
	}
	return nil
}

func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) error {
	var services []string
	if opts.hash != "*" {
		services = append(services, strings.Split(opts.hash, ",")...)
	}

	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, _, err := opts.ProjectOptions.ToProject(ctx, dockerCli, backend, nil, cli.WithoutEnvironmentResolution)
	if err != nil {
		return err
	}

	if err := applyPlatforms(project, true); err != nil {
		return err
	}

	if len(services) == 0 {
		services = project.ServiceNames()
	}

	sorted := services
	slices.Sort(sorted)

	for _, name := range sorted {
		s, err := project.GetService(name)
		if err != nil {
			return err
		}

		hash, err := compose.ServiceHash(s)
		if err != nil {
			return err
		}
		_, _ = fmt.Fprintf(dockerCli.Out(), "%s %s\n", name, hash)
	}
	return nil
}

func runProfiles(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) error {
	set := map[string]struct{}{}

	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, err := opts.ToProject(ctx, dockerCli, backend, services)
	if err != nil {
		return err
	}
	for _, s := range project.AllServices() {
		for _, p := range s.Profiles {
			set[p] = struct{}{}
		}
	}
	profiles := make([]string, 0, len(set))
	for p := range set {
		profiles = append(profiles, p)
	}
	sort.Strings(profiles)
	for _, p := range profiles {
		_, _ = fmt.Fprintln(dockerCli.Out(), p)
	}
	return nil
}

func runConfigImages(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) error {
	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, err := opts.ToProject(ctx, dockerCli, backend, services)
	if err != nil {
		return err
	}

	for _, s := range project.Services {
		_, _ = fmt.Fprintln(dockerCli.Out(), api.GetImageNameOrDefault(s, project.Name))
	}
	return nil
}

func runVariables(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) error {
	opts.noInterpolate = true
	model, err := opts.ToModel(ctx, dockerCli, services, cli.WithoutEnvironmentResolution)
	if err != nil {
		return err
	}

	variables := template.ExtractVariables(model, template.DefaultPattern)

	if opts.Format == "yaml" {
		result, err := yaml.Marshal(variables)
		if err != nil {
			return err
		}
		fmt.Print(string(result))
		return nil
	}

	return formatter.Print(variables, opts.Format, dockerCli.Out(), func(w io.Writer) {
		for name, variable := range variables {
			_, _ = fmt.Fprintf(w, "%s\t%t\t%s\t%s\n", name, variable.Required, variable.DefaultValue, variable.PresenceValue)
		}
	}, "NAME", "REQUIRED", "DEFAULT VALUE", "ALTERNATE VALUE")
}

func runEnvironment(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) error {
	backend, err := compose.NewComposeService(dockerCli)
	if err != nil {
		return err
	}

	project, err := opts.ToProject(ctx, dockerCli, backend, services)
	if err != nil {
		return err
	}

	for _, v := range project.Environment.Values() {
		fmt.Println(v)
	}
	return nil
}

func escapeDollarSign(marshal []byte) []byte {
	dollar := []byte{'$'}
	escDollar := []byte{'$', '$'}
	return bytes.ReplaceAll(marshal, dollar, escDollar)
}


================================================
FILE: cmd/compose/cp.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"errors"

	"github.com/docker/cli/cli"
	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type copyOptions struct {
	*ProjectOptions

	source      string
	destination string
	index       int
	all         bool
	followLink  bool
	copyUIDGID  bool
}

func copyCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := copyOptions{
		ProjectOptions: p,
	}
	copyCmd := &cobra.Command{
		Use: `cp [OPTIONS] SERVICE:SRC_PATH DEST_PATH|-
	docker compose cp [OPTIONS] SRC_PATH|- SERVICE:DEST_PATH`,
		Short: "Copy files/folders between a service container and the local filesystem",
		Args:  cli.ExactArgs(2),
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			if args[0] == "" {
				return errors.New("source can not be empty")
			}
			if args[1] == "" {
				return errors.New("destination can not be empty")
			}
			return nil
		}),
		RunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
			opts.source = args[0]
			opts.destination = args[1]
			return runCopy(ctx, dockerCli, backendOptions, opts)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}

	flags := copyCmd.Flags()
	flags.IntVar(&opts.index, "index", 0, "Index of the container if service has multiple replicas")
	flags.BoolVar(&opts.all, "all", false, "Include containers created by the run command")
	flags.BoolVarP(&opts.followLink, "follow-link", "L", false, "Always follow symbol link in SRC_PATH")
	flags.BoolVarP(&opts.copyUIDGID, "archive", "a", false, "Archive mode (copy all uid/gid information)")

	return copyCmd
}

func runCopy(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts copyOptions) error {
	name, err := opts.toProjectName(ctx, dockerCli)
	if err != nil {
		return err
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	return backend.Copy(ctx, name, api.CopyOptions{
		Source:      opts.source,
		Destination: opts.destination,
		All:         opts.all,
		Index:       opts.index,
		FollowLink:  opts.followLink,
		CopyUIDGID:  opts.copyUIDGID,
	})
}


================================================
FILE: cmd/compose/create.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"fmt"
	"slices"
	"strconv"
	"strings"
	"time"

	"github.com/compose-spec/compose-go/v2/types"
	"github.com/docker/cli/cli/command"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	"github.com/spf13/pflag"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type createOptions struct {
	Build         bool
	noBuild       bool
	Pull          string
	pullChanged   bool
	removeOrphans bool
	ignoreOrphans bool
	forceRecreate bool
	noRecreate    bool
	recreateDeps  bool
	noInherit     bool
	timeChanged   bool
	timeout       int
	quietPull     bool
	scale         []string
	AssumeYes     bool
}

func createCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := createOptions{}
	buildOpts := buildOptions{
		ProjectOptions: p,
	}
	cmd := &cobra.Command{
		Use:   "create [OPTIONS] [SERVICE...]",
		Short: "Creates containers for a service",
		PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
			opts.pullChanged = cmd.Flags().Changed("pull")
			if opts.Build && opts.noBuild {
				return fmt.Errorf("--build and --no-build are incompatible")
			}
			if opts.forceRecreate && opts.noRecreate {
				return fmt.Errorf("--force-recreate and --no-recreate are incompatible")
			}
			return nil
		}),
		RunE: p.WithServices(dockerCli, func(ctx context.Context, project *types.Project, services []string) error {
			return runCreate(ctx, dockerCli, backendOptions, opts, buildOpts, project, services)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}
	flags := cmd.Flags()
	flags.BoolVar(&opts.Build, "build", false, "Build images before starting containers")
	flags.BoolVar(&opts.noBuild, "no-build", false, "Don't build an image, even if it's policy")
	flags.StringVar(&opts.Pull, "pull", "policy", `Pull image before running ("always"|"missing"|"never"|"build")`)
	flags.BoolVar(&opts.quietPull, "quiet-pull", false, "Pull without printing progress information")
	flags.BoolVar(&opts.forceRecreate, "force-recreate", false, "Recreate containers even if their configuration and image haven't changed")
	flags.BoolVar(&opts.noRecreate, "no-recreate", false, "If containers already exist, don't recreate them. Incompatible with --force-recreate.")
	flags.BoolVar(&opts.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file")
	flags.StringArrayVar(&opts.scale, "scale", []string{}, "Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.")
	flags.BoolVarP(&opts.AssumeYes, "yes", "y", false, `Assume "yes" as answer to all prompts and run non-interactively`)
	flags.SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName {
		// assumeYes was introduced by mistake as `--y`
		if name == "y" {
			logrus.Warn("--y is deprecated, please use --yes instead")
			name = "yes"
		}
		return pflag.NormalizedName(name)
	})
	return cmd
}

func runCreate(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, createOpts createOptions, buildOpts buildOptions, project *types.Project, services []string) error {
	if err := createOpts.Apply(project); err != nil {
		return err
	}

	var build *api.BuildOptions
	if !createOpts.noBuild {
		bo, err := buildOpts.toAPIBuildOptions(services)
		if err != nil {
			return err
		}
		build = &bo
	}

	if createOpts.AssumeYes {
		backendOptions.Options = append(backendOptions.Options, compose.WithPrompt(compose.AlwaysOkPrompt()))
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	return backend.Create(ctx, project, api.CreateOptions{
		Build:                build,
		Services:             services,
		RemoveOrphans:        createOpts.removeOrphans,
		IgnoreOrphans:        createOpts.ignoreOrphans,
		Recreate:             createOpts.recreateStrategy(),
		RecreateDependencies: createOpts.dependenciesRecreateStrategy(),
		Inherit:              !createOpts.noInherit,
		Timeout:              createOpts.GetTimeout(),
		QuietPull:            createOpts.quietPull,
	})
}

func (opts createOptions) recreateStrategy() string {
	if opts.noRecreate {
		return api.RecreateNever
	}
	if opts.forceRecreate {
		return api.RecreateForce
	}
	if opts.noInherit {
		return api.RecreateForce
	}
	return api.RecreateDiverged
}

func (opts createOptions) dependenciesRecreateStrategy() string {
	if opts.noRecreate {
		return api.RecreateNever
	}
	if opts.recreateDeps {
		return api.RecreateForce
	}
	return api.RecreateDiverged
}

func (opts createOptions) GetTimeout() *time.Duration {
	if opts.timeChanged {
		t := time.Duration(opts.timeout) * time.Second
		return &t
	}
	return nil
}

func (opts createOptions) Apply(project *types.Project) error {
	if opts.pullChanged {
		if !opts.isPullPolicyValid() {
			return fmt.Errorf("invalid --pull option %q", opts.Pull)
		}
		for i, service := range project.Services {
			service.PullPolicy = opts.Pull
			project.Services[i] = service
		}
	}
	// N.B. opts.Build means "force build all", but images can still be built
	// when this is false
	// e.g. if a service has pull_policy: build or its local image is policy
	if opts.Build {
		for i, service := range project.Services {
			if service.Build == nil {
				continue
			}
			service.PullPolicy = types.PullPolicyBuild
			project.Services[i] = service
		}
	}

	if err := applyPlatforms(project, true); err != nil {
		return err
	}

	err := applyScaleOpts(project, opts.scale)
	if err != nil {
		return err
	}
	return nil
}

func applyScaleOpts(project *types.Project, opts []string) error {
	for _, scale := range opts {
		name, val, ok := strings.Cut(scale, "=")
		if !ok || val == "" {
			return fmt.Errorf("invalid --scale option %q. Should be SERVICE=NUM", scale)
		}
		replicas, err := strconv.Atoi(val)
		if err != nil {
			return err
		}
		err = setServiceScale(project, name, replicas)
		if err != nil {
			return err
		}
	}
	return nil
}

func (opts createOptions) isPullPolicyValid() bool {
	pullPolicies := []string{
		types.PullPolicyAlways, types.PullPolicyNever, types.PullPolicyBuild,
		types.PullPolicyMissing, types.PullPolicyIfNotPresent,
	}
	return slices.Contains(pullPolicies, opts.Pull)
}


================================================
FILE: cmd/compose/down.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"fmt"
	"os"
	"time"

	"github.com/docker/cli/cli/command"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	"github.com/spf13/pflag"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
	"github.com/docker/compose/v5/pkg/utils"
)

type downOptions struct {
	*ProjectOptions
	removeOrphans bool
	timeChanged   bool
	timeout       int
	volumes       bool
	images        string
}

func downCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := downOptions{
		ProjectOptions: p,
	}
	downCmd := &cobra.Command{
		Use:   "down [OPTIONS] [SERVICES]",
		Short: "Stop and remove containers, networks",
		PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
			opts.timeChanged = cmd.Flags().Changed("timeout")
			if opts.images != "" {
				if opts.images != "all" && opts.images != "local" {
					return fmt.Errorf("invalid value for --rmi: %q", opts.images)
				}
			}
			return nil
		}),
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runDown(ctx, dockerCli, backendOptions, opts, args)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}
	flags := downCmd.Flags()
	removeOrphans := utils.StringToBool(os.Getenv(ComposeRemoveOrphans))
	flags.BoolVar(&opts.removeOrphans, "remove-orphans", removeOrphans, "Remove containers for services not defined in the Compose file")
	flags.IntVarP(&opts.timeout, "timeout", "t", 0, "Specify a shutdown timeout in seconds")
	flags.BoolVarP(&opts.volumes, "volumes", "v", false, `Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers`)
	flags.StringVar(&opts.images, "rmi", "", `Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")`)
	flags.SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName {
		if name == "volume" {
			name = "volumes"
			logrus.Warn("--volume is deprecated, please use --volumes")
		}
		return pflag.NormalizedName(name)
	})
	return downCmd
}

func runDown(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts downOptions, services []string) error {
	project, name, err := opts.projectOrName(ctx, dockerCli, services...)
	if err != nil {
		return err
	}

	var timeout *time.Duration
	if opts.timeChanged {
		timeoutValue := time.Duration(opts.timeout) * time.Second
		timeout = &timeoutValue
	}
	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	return backend.Down(ctx, name, api.DownOptions{
		RemoveOrphans: opts.removeOrphans,
		Project:       project,
		Timeout:       timeout,
		Images:        opts.images,
		Volumes:       opts.volumes,
		Services:      services,
	})
}


================================================
FILE: cmd/compose/events.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"encoding/json"
	"fmt"

	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type eventsOpts struct {
	*composeOptions
	json  bool
	since string
	until string
}

func eventsCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := eventsOpts{
		composeOptions: &composeOptions{
			ProjectOptions: p,
		},
	}
	cmd := &cobra.Command{
		Use:   "events [OPTIONS] [SERVICE...]",
		Short: "Receive real time events from containers",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runEvents(ctx, dockerCli, backendOptions, opts, args)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}

	cmd.Flags().BoolVar(&opts.json, "json", false, "Output events as a stream of json objects")
	cmd.Flags().StringVar(&opts.since, "since", "", "Show all events created since timestamp")
	cmd.Flags().StringVar(&opts.until, "until", "", "Stream events until this timestamp")
	return cmd
}

func runEvents(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts eventsOpts, services []string) error {
	name, err := opts.toProjectName(ctx, dockerCli)
	if err != nil {
		return err
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	return backend.Events(ctx, name, api.EventsOptions{
		Services: services,
		Since:    opts.since,
		Until:    opts.until,
		Consumer: func(event api.Event) error {
			if opts.json {
				marshal, err := json.Marshal(map[string]any{
					"time":       event.Timestamp,
					"type":       "container",
					"service":    event.Service,
					"id":         event.Container,
					"action":     event.Status,
					"attributes": event.Attributes,
				})
				if err != nil {
					return err
				}
				_, _ = fmt.Fprintln(dockerCli.Out(), string(marshal))
			} else {
				_, _ = fmt.Fprintln(dockerCli.Out(), event)
			}
			return nil
		},
	})
}


================================================
FILE: cmd/compose/exec.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"errors"
	"fmt"
	"os"

	"github.com/compose-spec/compose-go/v2/types"
	"github.com/docker/cli/cli"
	"github.com/docker/cli/cli/command"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	"github.com/spf13/pflag"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type execOpts struct {
	*composeOptions

	service     string
	command     []string
	environment []string
	workingDir  string

	noTty       bool
	user        string
	detach      bool
	index       int
	privileged  bool
	interactive bool
}

func execCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := execOpts{
		composeOptions: &composeOptions{
			ProjectOptions: p,
		},
	}
	runCmd := &cobra.Command{
		Use:   "exec [OPTIONS] SERVICE COMMAND [ARGS...]",
		Short: "Execute a command in a running container",
		Args:  cobra.MinimumNArgs(2),
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			opts.service = args[0]
			opts.command = args[1:]
			return nil
		}),
		RunE: Adapt(func(ctx context.Context, args []string) error {
			err := runExec(ctx, dockerCli, backendOptions, opts)
			if err != nil {
				logrus.Debugf("%v", err)
				var cliError cli.StatusError
				if ok := errors.As(err, &cliError); ok {
					os.Exit(err.(cli.StatusError).StatusCode) //nolint: errorlint
				}
			}
			return err
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}

	runCmd.Flags().BoolVarP(&opts.detach, "detach", "d", false, "Detached mode: Run command in the background")
	runCmd.Flags().StringArrayVarP(&opts.environment, "env", "e", []string{}, "Set environment variables")
	runCmd.Flags().IntVar(&opts.index, "index", 0, "Index of the container if service has multiple replicas")
	runCmd.Flags().BoolVarP(&opts.privileged, "privileged", "", false, "Give extended privileges to the process")
	runCmd.Flags().StringVarP(&opts.user, "user", "u", "", "Run the command as this user")
	runCmd.Flags().BoolVarP(&opts.noTty, "no-tty", "T", !dockerCli.Out().IsTerminal(), "Disable pseudo-TTY allocation. By default 'docker compose exec' allocates a TTY.")
	runCmd.Flags().StringVarP(&opts.workingDir, "workdir", "w", "", "Path to workdir directory for this command")

	runCmd.Flags().BoolVarP(&opts.interactive, "interactive", "i", true, "Keep STDIN open even if not attached")
	runCmd.Flags().MarkHidden("interactive") //nolint:errcheck
	runCmd.Flags().BoolP("tty", "t", true, "Allocate a pseudo-TTY")
	runCmd.Flags().MarkHidden("tty") //nolint:errcheck

	runCmd.Flags().SetInterspersed(false)
	runCmd.Flags().SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName {
		if name == "no-TTY" { // legacy
			name = "no-tty"
		}
		return pflag.NormalizedName(name)
	})
	return runCmd
}

func runExec(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts execOpts) error {
	projectName, err := opts.toProjectName(ctx, dockerCli)
	if err != nil {
		return err
	}
	projectOptions, err := opts.composeOptions.toProjectOptions() //nolint:staticcheck
	if err != nil {
		return err
	}
	lookupFn := func(k string) (string, bool) {
		v, ok := projectOptions.Environment[k]
		return v, ok
	}
	execOpts := api.RunOptions{
		Service:     opts.service,
		Command:     opts.command,
		Environment: compose.ToMobyEnv(types.NewMappingWithEquals(opts.environment).Resolve(lookupFn)),
		Tty:         !opts.noTty,
		User:        opts.user,
		Privileged:  opts.privileged,
		Index:       opts.index,
		Detach:      opts.detach,
		WorkingDir:  opts.workingDir,
		Interactive: opts.interactive,
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	exitCode, err := backend.Exec(ctx, projectName, execOpts)
	if exitCode != 0 {
		errMsg := fmt.Sprintf("exit status %d", exitCode)
		if err != nil && err.Error() != "" {
			errMsg = err.Error()
		}
		return cli.StatusError{StatusCode: exitCode, Status: errMsg}
	}
	return err
}


================================================
FILE: cmd/compose/export.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"

	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type exportOptions struct {
	*ProjectOptions

	service string
	output  string
	index   int
}

func exportCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	options := exportOptions{
		ProjectOptions: p,
	}
	cmd := &cobra.Command{
		Use:   "export [OPTIONS] SERVICE",
		Short: "Export a service container's filesystem as a tar archive",
		Args:  cobra.MinimumNArgs(1),
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			options.service = args[0]
			return nil
		}),
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runExport(ctx, dockerCli, backendOptions, options)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}

	flags := cmd.Flags()
	flags.IntVar(&options.index, "index", 0, "index of the container if service has multiple replicas.")
	flags.StringVarP(&options.output, "output", "o", "", "Write to a file, instead of STDOUT")

	return cmd
}

func runExport(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, options exportOptions) error {
	projectName, err := options.toProjectName(ctx, dockerCli)
	if err != nil {
		return err
	}

	exportOptions := api.ExportOptions{
		Service: options.service,
		Index:   options.index,
		Output:  options.output,
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	return backend.Export(ctx, projectName, exportOptions)
}


================================================
FILE: cmd/compose/generate.go
================================================
/*
   Copyright 2023 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"fmt"
	"os"

	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type generateOptions struct {
	*ProjectOptions
	Format string
}

func generateCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := generateOptions{
		ProjectOptions: p,
	}

	cmd := &cobra.Command{
		Use:   "generate [OPTIONS] [CONTAINERS...]",
		Short: "EXPERIMENTAL - Generate a Compose file from existing containers",
		PreRunE: Adapt(func(ctx context.Context, args []string) error {
			return nil
		}),
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runGenerate(ctx, dockerCli, backendOptions, opts, args)
		}),
	}

	cmd.Flags().StringVar(&opts.ProjectName, "name", "", "Project name to set in the Compose file")
	cmd.Flags().StringVar(&opts.ProjectDir, "project-dir", "", "Directory to use for the project")
	cmd.Flags().StringVar(&opts.Format, "format", "yaml", "Format the output. Values: [yaml | json]")
	return cmd
}

func runGenerate(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts generateOptions, containers []string) error {
	_, _ = fmt.Fprintln(os.Stderr, "generate command is EXPERIMENTAL")
	if len(containers) == 0 {
		return fmt.Errorf("at least one container must be specified")
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	project, err := backend.Generate(ctx, api.GenerateOptions{
		Containers:  containers,
		ProjectName: opts.ProjectName,
	})
	if err != nil {
		return err
	}

	var content []byte
	switch opts.Format {
	case "json":
		content, err = project.MarshalJSON()
	case "yaml":
		content, err = project.MarshalYAML()
	default:
		return fmt.Errorf("unsupported format %q", opts.Format)
	}
	if err != nil {
		return err
	}
	fmt.Println(string(content))

	return nil
}


================================================
FILE: cmd/compose/images.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"fmt"
	"io"
	"maps"
	"slices"
	"strings"
	"time"

	"github.com/containerd/platforms"
	"github.com/docker/cli/cli/command"
	"github.com/docker/go-units"
	"github.com/moby/moby/client/pkg/stringid"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/cmd/formatter"
	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type imageOptions struct {
	*ProjectOptions
	Quiet  bool
	Format string
}

func imagesCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := imageOptions{
		ProjectOptions: p,
	}
	imgCmd := &cobra.Command{
		Use:   "images [OPTIONS] [SERVICE...]",
		Short: "List images used by the created containers",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runImages(ctx, dockerCli, backendOptions, opts, args)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}
	imgCmd.Flags().StringVar(&opts.Format, "format", "table", "Format the output. Values: [table | json]")
	imgCmd.Flags().BoolVarP(&opts.Quiet, "quiet", "q", false, "Only display IDs")
	return imgCmd
}

func runImages(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts imageOptions, services []string) error {
	projectName, err := opts.toProjectName(ctx, dockerCli)
	if err != nil {
		return err
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	images, err := backend.Images(ctx, projectName, api.ImagesOptions{
		Services: services,
	})
	if err != nil {
		return err
	}

	if opts.Quiet {
		ids := []string{}
		for _, img := range images {
			id := img.ID
			if i := strings.IndexRune(img.ID, ':'); i >= 0 {
				id = id[i+1:]
			}
			if !slices.Contains(ids, id) {
				ids = append(ids, id)
			}
		}
		for _, img := range ids {
			_, _ = fmt.Fprintln(dockerCli.Out(), img)
		}
		return nil
	}
	if opts.Format == "json" {

		type img struct {
			ID            string     `json:"ID"`
			ContainerName string     `json:"ContainerName"`
			Repository    string     `json:"Repository"`
			Tag           string     `json:"Tag"`
			Platform      string     `json:"Platform"`
			Size          int64      `json:"Size"`
			Created       *time.Time `json:"Created,omitempty"`
			LastTagTime   time.Time  `json:"LastTagTime,omitzero"`
		}
		// Convert map to slice
		var imageList []img
		for ctr, i := range images {
			lastTagTime := i.LastTagTime
			imageList = append(imageList, img{
				ContainerName: ctr,
				ID:            i.ID,
				Repository:    i.Repository,
				Tag:           i.Tag,
				Platform:      platforms.Format(i.Platform),
				Size:          i.Size,
				Created:       i.Created,
				LastTagTime:   lastTagTime,
			})
		}
		json, err := formatter.ToJSON(imageList, "", "")
		if err != nil {
			return err
		}
		_, err = fmt.Fprintln(dockerCli.Out(), json)
		return err
	}

	return formatter.Print(images, opts.Format, dockerCli.Out(),
		func(w io.Writer) {
			for _, container := range slices.Sorted(maps.Keys(images)) {
				img := images[container]
				id := stringid.TruncateID(img.ID)
				size := units.HumanSizeWithPrecision(float64(img.Size), 3)
				repo := img.Repository
				if repo == "" {
					repo = "<none>"
				}
				tag := img.Tag
				if tag == "" {
					tag = "<none>"
				}
				created := "N/A"
				if img.Created != nil {
					created = units.HumanDuration(time.Now().UTC().Sub(*img.Created)) + " ago"
				}
				_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
					container, repo, tag, platforms.Format(img.Platform), id, size, created)
			}
		},
		"CONTAINER", "REPOSITORY", "TAG", "PLATFORM", "IMAGE ID", "SIZE", "CREATED")
}


================================================
FILE: cmd/compose/kill.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"errors"
	"fmt"
	"os"

	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
	"github.com/docker/compose/v5/pkg/utils"
)

type killOptions struct {
	*ProjectOptions
	removeOrphans bool
	signal        string
}

func killCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := killOptions{
		ProjectOptions: p,
	}
	cmd := &cobra.Command{
		Use:   "kill [OPTIONS] [SERVICE...]",
		Short: "Force stop service containers",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runKill(ctx, dockerCli, backendOptions, opts, args)
		}),
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}

	flags := cmd.Flags()
	removeOrphans := utils.StringToBool(os.Getenv(ComposeRemoveOrphans))
	flags.BoolVar(&opts.removeOrphans, "remove-orphans", removeOrphans, "Remove containers for services not defined in the Compose file")
	flags.StringVarP(&opts.signal, "signal", "s", "SIGKILL", "SIGNAL to send to the container")

	return cmd
}

func runKill(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts killOptions, services []string) error {
	project, name, err := opts.projectOrName(ctx, dockerCli, services...)
	if err != nil {
		return err
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	err = backend.Kill(ctx, name, api.KillOptions{
		RemoveOrphans: opts.removeOrphans,
		Project:       project,
		Services:      services,
		Signal:        opts.signal,
	})
	if errors.Is(err, api.ErrNoResources) {
		_, _ = fmt.Fprintln(stdinfo(dockerCli), "No container to kill")
		return nil
	}
	return err
}


================================================
FILE: cmd/compose/list.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"errors"
	"fmt"
	"io"
	"regexp"
	"strings"

	"github.com/docker/cli/cli/command"
	"github.com/docker/cli/opts"
	"github.com/moby/moby/client"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/cmd/formatter"
	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type lsOptions struct {
	Format string
	Quiet  bool
	All    bool
	Filter opts.FilterOpt
}

func listCommand(dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	lsOpts := lsOptions{Filter: opts.NewFilterOpt()}
	lsCmd := &cobra.Command{
		Use:   "ls [OPTIONS]",
		Short: "List running compose projects",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runList(ctx, dockerCli, backendOptions, lsOpts)
		}),
		Args:              cobra.NoArgs,
		ValidArgsFunction: noCompletion(),
	}
	lsCmd.Flags().StringVar(&lsOpts.Format, "format", "table", "Format the output. Values: [table | json]")
	lsCmd.Flags().BoolVarP(&lsOpts.Quiet, "quiet", "q", false, "Only display project names")
	lsCmd.Flags().Var(&lsOpts.Filter, "filter", "Filter output based on conditions provided")
	lsCmd.Flags().BoolVarP(&lsOpts.All, "all", "a", false, "Show all stopped Compose projects")

	return lsCmd
}

var acceptedListFilters = map[string]bool{
	"name": true,
}

// match returns true if any of the values at key match the source string
func match(filters client.Filters, field, source string) bool {
	if f, ok := filters[field]; ok && f[source] {
		return true
	}

	fieldValues := filters[field]
	for name2match := range fieldValues {
		isMatch, err := regexp.MatchString(name2match, source)
		if err != nil {
			continue
		}
		if isMatch {
			return true
		}
	}
	return false
}

func runList(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, lsOpts lsOptions) error {
	filters := lsOpts.Filter.Value()

	for filter := range filters {
		if _, ok := acceptedListFilters[filter]; !ok {
			return errors.New("invalid filter '" + filter + "'")
		}
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	stackList, err := backend.List(ctx, api.ListOptions{All: lsOpts.All})
	if err != nil {
		return err
	}

	if len(filters) > 0 {
		var filtered []api.Stack
		for _, s := range stackList {
			if match(filters, "name", s.Name) {
				filtered = append(filtered, s)
			}
		}
		stackList = filtered
	}

	if lsOpts.Quiet {
		for _, s := range stackList {
			_, _ = fmt.Fprintln(dockerCli.Out(), s.Name)
		}
		return nil
	}

	view := viewFromStackList(stackList)
	return formatter.Print(view, lsOpts.Format, dockerCli.Out(), func(w io.Writer) {
		for _, stack := range view {
			_, _ = fmt.Fprintf(w, "%s\t%s\t%s\n", stack.Name, stack.Status, stack.ConfigFiles)
		}
	}, "NAME", "STATUS", "CONFIG FILES")
}

type stackView struct {
	Name        string
	Status      string
	ConfigFiles string
}

func viewFromStackList(stackList []api.Stack) []stackView {
	retList := make([]stackView, len(stackList))
	for i, s := range stackList {
		retList[i] = stackView{
			Name:        s.Name,
			Status:      strings.TrimSpace(fmt.Sprintf("%s %s", s.Status, s.Reason)),
			ConfigFiles: s.ConfigFiles,
		}
	}
	return retList
}


================================================
FILE: cmd/compose/logs.go
================================================
/*
   Copyright 2020 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"errors"

	"github.com/docker/cli/cli/command"
	"github.com/spf13/cobra"

	"github.com/docker/compose/v5/cmd/formatter"
	"github.com/docker/compose/v5/pkg/api"
	"github.com/docker/compose/v5/pkg/compose"
)

type logsOptions struct {
	*ProjectOptions
	composeOptions
	follow     bool
	index      int
	tail       string
	since      string
	until      string
	noColor    bool
	noPrefix   bool
	timestamps bool
}

func logsCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
	opts := logsOptions{
		ProjectOptions: p,
	}
	logsCmd := &cobra.Command{
		Use:   "logs [OPTIONS] [SERVICE...]",
		Short: "View output from containers",
		RunE: Adapt(func(ctx context.Context, args []string) error {
			return runLogs(ctx, dockerCli, backendOptions, opts, args)
		}),
		PreRunE: func(cmd *cobra.Command, args []string) error {
			if opts.index > 0 && len(args) != 1 {
				return errors.New("--index requires one service to be selected")
			}
			return nil
		},
		ValidArgsFunction: completeServiceNames(dockerCli, p),
	}
	flags := logsCmd.Flags()
	flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
	flags.IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas")
	flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
	flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
	flags.BoolVar(&opts.noColor, "no-color", false, "Produce monochrome output")
	flags.BoolVar(&opts.noPrefix, "no-log-prefix", false, "Don't print prefix in logs")
	flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")
	flags.StringVarP(&opts.tail, "tail", "n", "all", "Number of lines to show from the end of the logs for each container")
	return logsCmd
}

func runLogs(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts logsOptions, services []string) error {
	project, name, err := opts.projectOrName(ctx, dockerCli, services...)
	if err != nil {
		return err
	}

	// exclude services configured to ignore output (attach: false), until explicitly selected
	if project != nil && len(services) == 0 {
		for n, service := range project.Services {
			if service.Attach == nil || *service.Attach {
				services = append(services, n)
			}
		}
	}

	backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
	if err != nil {
		return err
	}
	consumer := formatter.NewLogConsumer(ctx, dockerCli.Out(), dockerCli.Err(), !opts.noColor, !opts.noPrefix, false)
	return backend.Logs(ctx, name, consumer, api.LogOptions{
		Project:    project,
		Services:   services,
		Follow:     opts.follow,
		Index:      opts.index,
		Tail:       opts.tail,
		Since:      opts.since,
		Until:      opts.until,
		Timestamps: opts.timestamps,
	})
}

var _ api.LogConsumer = &logConsumer{}

type logConsumer struct {
	events api.EventProcessor
}

func (l logConsumer) Log(containerName, message string) {
	l.events.On(api.Resource{
		ID:   containerName,
		Text: message,
	})
}

func (l logConsumer) Err(containerName, message string) {
	l.events.On(api.Resource{
		ID:     containerName,
		Status: api.Error,
		Text:   message,
	})
}

func (l logConsumer) Status(containerName, message string) {
	l.events.On(api.Resource{
		ID:     containerName,
		Status: api.Error,
		Text:   message,
	})
}


================================================
FILE: cmd/compose/options.go
================================================
/*
   Copyright 2023 Docker Compose CLI authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package compose

import (
	"context"
	"fmt"
	"io"
	"os"
	"slices"
	"sort"
	"strings"
	"text/tabwriter"

	"github.com/compose-spec/compose-go/v2/cli"
	"github.com/compose-spec/compose-go/v2/template"
	"github.com/compose-spec/compose-go/v2/types"
	"github.com/docker/cli/cli/command"

	"github.com/docker/compose/v5/cmd/display"
	"github.com/docker/compose/v5/cmd/prompt"
	"github.com/docker/compose/v5/internal/tracing"
)

func applyPlatforms(project *types.Project, buildForSinglePlatform bool) error {
	defaultPlatform := project.Environment["DOCKER_DEFAULT_PLATFORM"]
	for name, service := range project.Services {
		if service.Build == nil {
			continue
		}

		// default platform only applies if the service doesn't specify
		if defaultPlatform != "" && service.Platform == "" {
			if len(service.Build.Platforms) > 0 && !slices.Contains(service.Build.Platforms, defaultPlatform) {
				return fmt.Errorf("service %q build.platforms does not support value set by DOCKER_DEFAULT_PLATFORM: %s", name, defaultPlatform)
			}
			service.Platform = defaultPlatform
		}

		if service.Platform != "" {
			if len(service.Build.Platforms) > 0 {
				if !slices.Contains(service.Build.Platforms, service.Platform) {
					return fmt.Errorf("service %q build configuration does not support platform: %s", name, service.Platform)
				}
			}

			if buildForSinglePlatform || len(service.Build.Platforms) == 0 {
				// if we're building for a single platform, we want to build for the platform we'll use to run the image
				// similarly, if no build platforms were explicitly specified, it makes sense to build for the platform
				// the image is designed for rather than allowing the builder to infer the platform
				service.Build.Platforms = []string{service.Platform}
			}
		}

		// services can specify that they should be built for multiple platforms, which can be used
		// with `docker compose build` to produce a multi-arch image
		// other cases, such
Download .txt
gitextract_6bdxpuyg/

├── .dockerignore
├── .gitattributes
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.yaml
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── SECURITY.md
│   ├── dependabot.yml
│   ├── stale.yml
│   └── workflows/
│       ├── ci.yml
│       ├── docs-upstream.yml
│       ├── merge.yml
│       ├── scorecards.yml
│       └── stale.yml
├── .gitignore
├── .go-version
├── .golangci.yml
├── BUILDING.md
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── Makefile
├── NOTICE
├── README.md
├── cmd/
│   ├── cmdtrace/
│   │   ├── cmd_span.go
│   │   └── cmd_span_test.go
│   ├── compatibility/
│   │   ├── convert.go
│   │   └── convert_test.go
│   ├── compose/
│   │   ├── alpha.go
│   │   ├── attach.go
│   │   ├── bridge.go
│   │   ├── build.go
│   │   ├── commit.go
│   │   ├── completion.go
│   │   ├── compose.go
│   │   ├── compose_oci_test.go
│   │   ├── compose_test.go
│   │   ├── config.go
│   │   ├── cp.go
│   │   ├── create.go
│   │   ├── down.go
│   │   ├── events.go
│   │   ├── exec.go
│   │   ├── export.go
│   │   ├── generate.go
│   │   ├── images.go
│   │   ├── kill.go
│   │   ├── list.go
│   │   ├── logs.go
│   │   ├── options.go
│   │   ├── options_test.go
│   │   ├── pause.go
│   │   ├── port.go
│   │   ├── ps.go
│   │   ├── publish.go
│   │   ├── pull.go
│   │   ├── pullOptions_test.go
│   │   ├── push.go
│   │   ├── remove.go
│   │   ├── restart.go
│   │   ├── run.go
│   │   ├── scale.go
│   │   ├── start.go
│   │   ├── stats.go
│   │   ├── stop.go
│   │   ├── top.go
│   │   ├── top_test.go
│   │   ├── up.go
│   │   ├── up_test.go
│   │   ├── version.go
│   │   ├── version_test.go
│   │   ├── viz.go
│   │   ├── viz_test.go
│   │   ├── volumes.go
│   │   ├── wait.go
│   │   └── watch.go
│   ├── display/
│   │   ├── colors.go
│   │   ├── dryrun.go
│   │   ├── json.go
│   │   ├── json_test.go
│   │   ├── mode.go
│   │   ├── plain.go
│   │   ├── quiet.go
│   │   ├── spinner.go
│   │   ├── tty.go
│   │   └── tty_test.go
│   ├── formatter/
│   │   ├── ansi.go
│   │   ├── colors.go
│   │   ├── consts.go
│   │   ├── container.go
│   │   ├── formatter.go
│   │   ├── formatter_test.go
│   │   ├── json.go
│   │   ├── logs.go
│   │   ├── pretty.go
│   │   ├── shortcut.go
│   │   ├── shortcut_unix.go
│   │   └── shortcut_windows.go
│   ├── main.go
│   └── prompt/
│       ├── prompt.go
│       └── prompt_mock.go
├── codecov.yml
├── docker-bake.hcl
├── docs/
│   ├── examples/
│   │   └── provider.go
│   ├── extension.md
│   ├── reference/
│   │   ├── compose.md
│   │   ├── compose_alpha.md
│   │   ├── compose_alpha_dry-run.md
│   │   ├── compose_alpha_generate.md
│   │   ├── compose_alpha_publish.md
│   │   ├── compose_alpha_scale.md
│   │   ├── compose_alpha_viz.md
│   │   ├── compose_alpha_watch.md
│   │   ├── compose_attach.md
│   │   ├── compose_bridge.md
│   │   ├── compose_bridge_convert.md
│   │   ├── compose_bridge_transformations.md
│   │   ├── compose_bridge_transformations_create.md
│   │   ├── compose_bridge_transformations_list.md
│   │   ├── compose_build.md
│   │   ├── compose_commit.md
│   │   ├── compose_config.md
│   │   ├── compose_cp.md
│   │   ├── compose_create.md
│   │   ├── compose_down.md
│   │   ├── compose_events.md
│   │   ├── compose_exec.md
│   │   ├── compose_export.md
│   │   ├── compose_images.md
│   │   ├── compose_kill.md
│   │   ├── compose_logs.md
│   │   ├── compose_ls.md
│   │   ├── compose_pause.md
│   │   ├── compose_port.md
│   │   ├── compose_ps.md
│   │   ├── compose_publish.md
│   │   ├── compose_pull.md
│   │   ├── compose_push.md
│   │   ├── compose_restart.md
│   │   ├── compose_rm.md
│   │   ├── compose_run.md
│   │   ├── compose_scale.md
│   │   ├── compose_start.md
│   │   ├── compose_stats.md
│   │   ├── compose_stop.md
│   │   ├── compose_top.md
│   │   ├── compose_unpause.md
│   │   ├── compose_up.md
│   │   ├── compose_version.md
│   │   ├── compose_volumes.md
│   │   ├── compose_wait.md
│   │   ├── compose_watch.md
│   │   ├── docker_compose.yaml
│   │   ├── docker_compose_alpha.yaml
│   │   ├── docker_compose_alpha_dry-run.yaml
│   │   ├── docker_compose_alpha_generate.yaml
│   │   ├── docker_compose_alpha_publish.yaml
│   │   ├── docker_compose_alpha_scale.yaml
│   │   ├── docker_compose_alpha_viz.yaml
│   │   ├── docker_compose_alpha_watch.yaml
│   │   ├── docker_compose_attach.yaml
│   │   ├── docker_compose_bridge.yaml
│   │   ├── docker_compose_bridge_convert.yaml
│   │   ├── docker_compose_bridge_transformations.yaml
│   │   ├── docker_compose_bridge_transformations_create.yaml
│   │   ├── docker_compose_bridge_transformations_list.yaml
│   │   ├── docker_compose_build.yaml
│   │   ├── docker_compose_commit.yaml
│   │   ├── docker_compose_config.yaml
│   │   ├── docker_compose_convert.yaml
│   │   ├── docker_compose_cp.yaml
│   │   ├── docker_compose_create.yaml
│   │   ├── docker_compose_down.yaml
│   │   ├── docker_compose_events.yaml
│   │   ├── docker_compose_exec.yaml
│   │   ├── docker_compose_export.yaml
│   │   ├── docker_compose_images.yaml
│   │   ├── docker_compose_kill.yaml
│   │   ├── docker_compose_logs.yaml
│   │   ├── docker_compose_ls.yaml
│   │   ├── docker_compose_pause.yaml
│   │   ├── docker_compose_port.yaml
│   │   ├── docker_compose_ps.yaml
│   │   ├── docker_compose_publish.yaml
│   │   ├── docker_compose_pull.yaml
│   │   ├── docker_compose_push.yaml
│   │   ├── docker_compose_restart.yaml
│   │   ├── docker_compose_rm.yaml
│   │   ├── docker_compose_run.yaml
│   │   ├── docker_compose_scale.yaml
│   │   ├── docker_compose_start.yaml
│   │   ├── docker_compose_stats.yaml
│   │   ├── docker_compose_stop.yaml
│   │   ├── docker_compose_top.yaml
│   │   ├── docker_compose_unpause.yaml
│   │   ├── docker_compose_up.yaml
│   │   ├── docker_compose_version.yaml
│   │   ├── docker_compose_volumes.yaml
│   │   ├── docker_compose_wait.yaml
│   │   └── docker_compose_watch.yaml
│   ├── sdk.md
│   └── yaml/
│       └── main/
│           └── generate.go
├── go.mod
├── go.sum
├── internal/
│   ├── desktop/
│   │   ├── client.go
│   │   └── client_test.go
│   ├── experimental/
│   │   └── experimental.go
│   ├── locker/
│   │   ├── pidfile.go
│   │   ├── pidfile_unix.go
│   │   ├── pidfile_windows.go
│   │   ├── runtime.go
│   │   ├── runtime_darwin.go
│   │   ├── runtime_unix.go
│   │   └── runtime_windows.go
│   ├── memnet/
│   │   ├── conn.go
│   │   ├── conn_unix.go
│   │   └── conn_windows.go
│   ├── oci/
│   │   ├── push.go
│   │   └── resolver.go
│   ├── paths/
│   │   └── paths.go
│   ├── registry/
│   │   └── registry.go
│   ├── sync/
│   │   ├── shared.go
│   │   └── tar.go
│   ├── tracing/
│   │   ├── attributes.go
│   │   ├── attributes_test.go
│   │   ├── docker_context.go
│   │   ├── errors.go
│   │   ├── keyboard_metrics.go
│   │   ├── mux.go
│   │   ├── tracing.go
│   │   ├── tracing_test.go
│   │   └── wrap.go
│   └── variables.go
└── pkg/
    ├── api/
    │   ├── api.go
    │   ├── api_test.go
    │   ├── context.go
    │   ├── env.go
    │   ├── errors.go
    │   ├── errors_test.go
    │   ├── event.go
    │   ├── labels.go
    │   └── labels_test.go
    ├── bridge/
    │   ├── convert.go
    │   └── transformers.go
    ├── compose/
    │   ├── apiSocket.go
    │   ├── api_versions.go
    │   ├── attach.go
    │   ├── attach_service.go
    │   ├── build.go
    │   ├── build_bake.go
    │   ├── build_classic.go
    │   ├── build_test.go
    │   ├── commit.go
    │   ├── compose.go
    │   ├── container.go
    │   ├── containers.go
    │   ├── convergence.go
    │   ├── convergence_test.go
    │   ├── convert.go
    │   ├── cp.go
    │   ├── create.go
    │   ├── create_test.go
    │   ├── dependencies.go
    │   ├── dependencies_test.go
    │   ├── desktop.go
    │   ├── docker_cli_providers.go
    │   ├── down.go
    │   ├── down_test.go
    │   ├── envresolver.go
    │   ├── envresolver_test.go
    │   ├── events.go
    │   ├── exec.go
    │   ├── export.go
    │   ├── filters.go
    │   ├── generate.go
    │   ├── hash.go
    │   ├── hash_test.go
    │   ├── hook.go
    │   ├── hook_test.go
    │   ├── image_pruner.go
    │   ├── images.go
    │   ├── images_test.go
    │   ├── kill.go
    │   ├── kill_test.go
    │   ├── loader.go
    │   ├── loader_test.go
    │   ├── logs.go
    │   ├── logs_test.go
    │   ├── ls.go
    │   ├── ls_test.go
    │   ├── model.go
    │   ├── monitor.go
    │   ├── pause.go
    │   ├── plugins.go
    │   ├── plugins_windows.go
    │   ├── port.go
    │   ├── printer.go
    │   ├── progress.go
    │   ├── ps.go
    │   ├── ps_test.go
    │   ├── publish.go
    │   ├── publish_test.go
    │   ├── pull.go
    │   ├── push.go
    │   ├── remove.go
    │   ├── restart.go
    │   ├── run.go
    │   ├── scale.go
    │   ├── secrets.go
    │   ├── shellout.go
    │   ├── start.go
    │   ├── stop.go
    │   ├── stop_test.go
    │   ├── suffix_unix.go
    │   ├── testdata/
    │   │   ├── compose.yaml
    │   │   └── publish/
    │   │       ├── common.yaml
    │   │       ├── compose.yaml
    │   │       └── test.env
    │   ├── top.go
    │   ├── transform/
    │   │   ├── replace.go
    │   │   └── replace_test.go
    │   ├── up.go
    │   ├── viz.go
    │   ├── viz_test.go
    │   ├── volumes.go
    │   ├── volumes_test.go
    │   ├── wait.go
    │   ├── watch.go
    │   └── watch_test.go
    ├── dryrun/
    │   └── dryrunclient.go
    ├── e2e/
    │   ├── assert.go
    │   ├── bridge_test.go
    │   ├── build_test.go
    │   ├── cancel_test.go
    │   ├── cascade_test.go
    │   ├── commit_test.go
    │   ├── compose_environment_test.go
    │   ├── compose_exec_test.go
    │   ├── compose_run_build_once_test.go
    │   ├── compose_run_test.go
    │   ├── compose_test.go
    │   ├── compose_up_test.go
    │   ├── config_test.go
    │   ├── configs_test.go
    │   ├── container_name_test.go
    │   ├── cp_test.go
    │   ├── e2e_config_plugin.go
    │   ├── e2e_config_standalone.go
    │   ├── env_file_test.go
    │   ├── exec_test.go
    │   ├── export_test.go
    │   ├── expose_test.go
    │   ├── fixtures/
    │   │   ├── attach-restart/
    │   │   │   └── compose.yaml
    │   │   ├── bridge/
    │   │   │   ├── Dockerfile
    │   │   │   ├── compose.yaml
    │   │   │   ├── expected-helm/
    │   │   │   │   ├── Chart.yaml
    │   │   │   │   ├── templates/
    │   │   │   │   │   ├── 0-bridge-namespace.yaml
    │   │   │   │   │   ├── bridge-configs.yaml
    │   │   │   │   │   ├── my-secrets-secret.yaml
    │   │   │   │   │   ├── private-network-network-policy.yaml
    │   │   │   │   │   ├── public-network-network-policy.yaml
    │   │   │   │   │   ├── serviceA-deployment.yaml
    │   │   │   │   │   ├── serviceA-expose.yaml
    │   │   │   │   │   ├── serviceA-service.yaml
    │   │   │   │   │   ├── serviceB-deployment.yaml
    │   │   │   │   │   ├── serviceB-expose.yaml
    │   │   │   │   │   └── serviceB-service.yaml
    │   │   │   │   └── values.yaml
    │   │   │   ├── expected-kubernetes/
    │   │   │   │   ├── base/
    │   │   │   │   │   ├── 0-bridge-namespace.yaml
    │   │   │   │   │   ├── bridge-configs.yaml
    │   │   │   │   │   ├── kustomization.yaml
    │   │   │   │   │   ├── my-secrets-secret.yaml
    │   │   │   │   │   ├── private-network-network-policy.yaml
    │   │   │   │   │   ├── public-network-network-policy.yaml
    │   │   │   │   │   ├── serviceA-deployment.yaml
    │   │   │   │   │   ├── serviceA-expose.yaml
    │   │   │   │   │   ├── serviceA-service.yaml
    │   │   │   │   │   ├── serviceB-deployment.yaml
    │   │   │   │   │   ├── serviceB-expose.yaml
    │   │   │   │   │   └── serviceB-service.yaml
    │   │   │   │   └── overlays/
    │   │   │   │       └── desktop/
    │   │   │   │           ├── kustomization.yaml
    │   │   │   │           ├── serviceA-service.yaml
    │   │   │   │           └── serviceB-service.yaml
    │   │   │   ├── my-config.txt
    │   │   │   └── not-so-secret.txt
    │   │   ├── build-dependencies/
    │   │   │   ├── base.dockerfile
    │   │   │   ├── classic.yaml
    │   │   │   ├── compose-depends_on.yaml
    │   │   │   ├── compose.yaml
    │   │   │   ├── hello.txt
    │   │   │   └── service.dockerfile
    │   │   ├── build-infinite/
    │   │   │   ├── compose.yaml
    │   │   │   └── service1/
    │   │   │       └── Dockerfile
    │   │   ├── build-test/
    │   │   │   ├── compose.yaml
    │   │   │   ├── dependencies/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── entitlements/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── escaped/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── long-output-line/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── minimal/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── multi-args/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── nginx-build/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── static/
    │   │   │   │       └── index.html
    │   │   │   ├── nginx-build2/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── static2/
    │   │   │   │       └── index.html
    │   │   │   ├── platforms/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose-multiple-platform-builds.yaml
    │   │   │   │   ├── compose-service-platform-and-no-build-platforms.yaml
    │   │   │   │   ├── compose-service-platform-not-in-build-platforms.yaml
    │   │   │   │   ├── compose-unsupported-platform.yml
    │   │   │   │   ├── compose.yaml
    │   │   │   │   ├── contextServiceA/
    │   │   │   │   │   └── Dockerfile
    │   │   │   │   ├── contextServiceB/
    │   │   │   │   │   └── Dockerfile
    │   │   │   │   └── contextServiceC/
    │   │   │   │       └── Dockerfile
    │   │   │   ├── privileged/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── profiles/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose.yaml
    │   │   │   │   └── test-secret.txt
    │   │   │   ├── secrets/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose.yml
    │   │   │   │   └── secret.txt
    │   │   │   ├── ssh/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── compose-without-ssh.yaml
    │   │   │   │   ├── compose.yaml
    │   │   │   │   ├── fake_rsa
    │   │   │   │   └── fake_rsa.pub
    │   │   │   ├── sub-dependencies/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── subset/
    │   │   │   │   └── compose.yaml
    │   │   │   └── tags/
    │   │   │       ├── Dockerfile
    │   │   │       └── compose.yaml
    │   │   ├── cascade/
    │   │   │   └── compose.yaml
    │   │   ├── commit/
    │   │   │   └── compose.yaml
    │   │   ├── compose-pull/
    │   │   │   ├── duplicate-images/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── image-present-locally/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── no-image-name-given/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── simple/
    │   │   │   │   └── compose.yaml
    │   │   │   └── unknown-image/
    │   │   │       ├── Dockerfile
    │   │   │       └── compose.yaml
    │   │   ├── config/
    │   │   │   └── compose.yaml
    │   │   ├── configs/
    │   │   │   ├── compose.yaml
    │   │   │   └── config.txt
    │   │   ├── container_name/
    │   │   │   └── compose.yaml
    │   │   ├── cp-test/
    │   │   │   ├── compose.yaml
    │   │   │   ├── cp-folder/
    │   │   │   │   └── cp-me.txt
    │   │   │   └── cp-me.txt
    │   │   ├── dependencies/
    │   │   │   ├── Dockerfile
    │   │   │   ├── compose.yaml
    │   │   │   ├── dependency-exit.yaml
    │   │   │   ├── deps-completed-successfully.yaml
    │   │   │   ├── deps-not-required.yaml
    │   │   │   ├── recreate-no-deps.yaml
    │   │   │   └── service-image-depends-on.yaml
    │   │   ├── dotenv/
    │   │   │   ├── development/
    │   │   │   │   └── compose.yaml
    │   │   │   └── raw.yaml
    │   │   ├── env-secret/
    │   │   │   ├── child/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── secret.env
    │   │   ├── env_file/
    │   │   │   ├── compose.yaml
    │   │   │   └── test.env
    │   │   ├── environment/
    │   │   │   ├── empty-variable/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── env-file-comments/
    │   │   │   │   ├── Dockerfile
    │   │   │   │   └── compose.yaml
    │   │   │   ├── env-interpolation/
    │   │   │   │   └── compose.yaml
    │   │   │   ├── env-interpolation-default-value/
    │   │   │   │   └── compose.yaml
    │   │   │   └── env-priority/
    │   │   │       ├── Dockerfile
    │   │   │       ├── compose-with-env-file.yaml
    │   │   │       ├── compose-with-env.yaml
    │   │   │       └── compose.yaml
    │   │   ├── exec/
    │   │   │   └── compose.yaml
    │   │   ├── export/
    │   │   │   └── compose.yaml
    │   │   ├── external/
    │   │   │   └── compose.yaml
    │   │   ├── hooks/
    │   │   │   ├── compose.yaml
    │   │   │   ├── poststart/
    │   │   │   │   ├── compose-error.yaml
    │   │   │   │   └── compose-success.yaml
    │   │   │   └── prestop/
    │   │   │       ├── compose-error.yaml
    │   │   │       └── compose-success.yaml
    │   │   ├── image-volume-recreate/
    │   │   │   ├── Dockerfile
    │   │   │   └── compose.yaml
    │   │   ├── init-container/
    │   │   │   └── compose.yaml
    │   │   ├── ipam/
    │   │   │   └── compose.yaml
    │   │   ├── ipc-test/
    │   │   │   └── compose.yaml
    │   │   ├── links/
    │   │   │   └── compose.yaml
    │   │   ├── logging-driver/
    │   │   │   └── compose.yaml
    │   │   ├── logs-test/
    │   │   │   ├── cat.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── restart.yaml
    │   │   ├── model/
    │   │   │   └── compose.yaml
    │   │   ├── nested/
    │   │   │   └── compose.yaml
    │   │   ├── network-alias/
    │   │   │   └── compose.yaml
    │   │   ├── network-interface-name/
    │   │   │   └── compose.yaml
    │   │   ├── network-links/
    │   │   │   └── compose.yaml
    │   │   ├── network-recreate/
    │   │   │   └── compose.yaml
    │   │   ├── network-test/
    │   │   │   ├── compose.subnet.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── mac_address.yaml
    │   │   ├── no-deps/
    │   │   │   ├── network-mode.yaml
    │   │   │   └── volume-from.yaml
    │   │   ├── orphans/
    │   │   │   └── compose.yaml
    │   │   ├── pause/
    │   │   │   └── compose.yaml
    │   │   ├── port-range/
    │   │   │   └── compose.yaml
    │   │   ├── profiles/
    │   │   │   ├── compose.yaml
    │   │   │   ├── docker-compose.yaml
    │   │   │   └── test-profile.env
    │   │   ├── project-volume-bind-test/
    │   │   │   └── docker-compose.yml
    │   │   ├── providers/
    │   │   │   └── depends-on-multiple-providers.yaml
    │   │   ├── ps-test/
    │   │   │   └── compose.yaml
    │   │   ├── publish/
    │   │   │   ├── Dockerfile
    │   │   │   ├── common.yaml
    │   │   │   ├── compose-bind-mount.yml
    │   │   │   ├── compose-build-only.yml
    │   │   │   ├── compose-env-file.yml
    │   │   │   ├── compose-environment.yml
    │   │   │   ├── compose-local-include.yml
    │   │   │   ├── compose-multi-env-config.yml
    │   │   │   ├── compose-sensitive.yml
    │   │   │   ├── compose-with-extends.yml
    │   │   │   ├── config.txt
    │   │   │   ├── oci/
    │   │   │   │   ├── compose-override.yaml
    │   │   │   │   ├── compose.yaml
    │   │   │   │   ├── extends.yaml
    │   │   │   │   └── test.env
    │   │   │   ├── publish-sensitive.env
    │   │   │   ├── publish.env
    │   │   │   └── secret.txt
    │   │   ├── recreate-volumes/
    │   │   │   ├── bind.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── compose2.yaml
    │   │   ├── resources/
    │   │   │   └── compose.yaml
    │   │   ├── restart-test/
    │   │   │   ├── compose-depends-on.yaml
    │   │   │   └── compose.yaml
    │   │   ├── run-test/
    │   │   │   ├── build-once-nested.yaml
    │   │   │   ├── build-once-no-deps.yaml
    │   │   │   ├── build-once.yaml
    │   │   │   ├── compose.yaml
    │   │   │   ├── deps.yaml
    │   │   │   ├── orphan.yaml
    │   │   │   ├── piped-test.yaml
    │   │   │   ├── ports.yaml
    │   │   │   ├── pull.yaml
    │   │   │   ├── quiet-pull.yaml
    │   │   │   └── run.env
    │   │   ├── scale/
    │   │   │   ├── Dockerfile
    │   │   │   ├── build.yaml
    │   │   │   └── compose.yaml
    │   │   ├── sentences/
    │   │   │   └── compose.yaml
    │   │   ├── simple-build-test/
    │   │   │   ├── compose-interpolate.yaml
    │   │   │   ├── compose.yaml
    │   │   │   └── nginx-build/
    │   │   │       ├── Dockerfile
    │   │   │       └── static/
    │   │   │           └── index.html
    │   │   ├── simple-composefile/
    │   │   │   ├── compose.yaml
    │   │   │   └── id.yaml
    │   │   ├── start-fail/
    │   │   │   ├── compose.yaml
    │   │   │   └── start-depends_on-long-lived.yaml
    │   │   ├── start-stop/
    │   │   │   ├── compose.yaml
    │   │   │   ├── other.yaml
    │   │   │   └── start-stop-deps.yaml
    │   │   ├── start_interval/
    │   │   │   └── compose.yaml
    │   │   ├── stdout-stderr/
    │   │   │   ├── compose.yaml
    │   │   │   └── log_to_stderr.sh
    │   │   ├── stop/
    │   │   │   └── compose.yaml
    │   │   ├── switch-volumes/
    │   │   │   ├── compose.yaml
    │   │   │   └── compose2.yaml
    │   │   ├── ups-deps-stop/
    │   │   │   ├── compose.yaml
    │   │   │   └── orphan.yaml
    │   │   ├── volume-test/
    │   │   │   ├── compose.yaml
    │   │   │   ├── nginx-build/
    │   │   │   │   └── Dockerfile
    │   │   │   └── static/
    │   │   │       └── index.html
    │   │   ├── volumes/
    │   │   │   └── compose.yaml
    │   │   ├── wait/
    │   │   │   └── compose.yaml
    │   │   ├── watch/
    │   │   │   ├── compose.yaml
    │   │   │   ├── config/
    │   │   │   │   └── file.config
    │   │   │   ├── data/
    │   │   │   │   └── hello.txt
    │   │   │   ├── data-logs/
    │   │   │   │   └── server.log
    │   │   │   ├── exec.yaml
    │   │   │   ├── include.yaml
    │   │   │   ├── rebuild.yaml
    │   │   │   ├── with-external-network.yaml
    │   │   │   └── x-initialSync.yaml
    │   │   └── wrong-composefile/
    │   │       ├── build-error.yml
    │   │       ├── compose.yaml
    │   │       ├── service1/
    │   │       │   └── Dockerfile
    │   │       └── unknown-image.yml
    │   ├── framework.go
    │   ├── healthcheck_test.go
    │   ├── hooks_test.go
    │   ├── ipc_test.go
    │   ├── logs_test.go
    │   ├── main_test.go
    │   ├── model_test.go
    │   ├── networks_test.go
    │   ├── noDeps_test.go
    │   ├── orphans_test.go
    │   ├── pause_test.go
    │   ├── profiles_test.go
    │   ├── providers_test.go
    │   ├── ps_test.go
    │   ├── publish_test.go
    │   ├── pull_test.go
    │   ├── recreate_no_deps_test.go
    │   ├── restart_test.go
    │   ├── scale_test.go
    │   ├── secrets_test.go
    │   ├── start_stop_test.go
    │   ├── up_test.go
    │   ├── volumes_test.go
    │   ├── wait_test.go
    │   └── watch_test.go
    ├── mocks/
    │   ├── mock_docker_api.go
    │   ├── mock_docker_cli.go
    │   └── mock_docker_compose_api.go
    ├── remote/
    │   ├── cache.go
    │   ├── cache_darwin.go
    │   ├── cache_unix.go
    │   ├── cache_windows.go
    │   ├── git.go
    │   ├── git_test.go
    │   ├── oci.go
    │   └── oci_test.go
    ├── utils/
    │   ├── durationutils.go
    │   ├── safebuffer.go
    │   ├── set.go
    │   ├── set_test.go
    │   ├── stringutils.go
    │   ├── writer.go
    │   └── writer_test.go
    └── watch/
        ├── debounce.go
        ├── debounce_test.go
        ├── dockerignore.go
        ├── dockerignore_test.go
        ├── ephemeral.go
        ├── ephemeral_test.go
        ├── notify.go
        ├── notify_test.go
        ├── paths.go
        ├── paths_test.go
        ├── temp.go
        ├── temp_dir_fixture.go
        ├── watcher_darwin.go
        ├── watcher_darwin_test.go
        ├── watcher_naive.go
        ├── watcher_naive_test.go
        ├── watcher_nonwin.go
        └── watcher_windows.go
Download .txt
Showing preview only (212K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2199 symbols across 283 files)

FILE: cmd/cmdtrace/cmd_span.go
  function Setup (line 48) | func Setup(cmd *cobra.Command, dockerCli command.Cli, args []string) err...
  function wrapRunE (line 75) | func wrapRunE(c *cobra.Command, cmdSpan trace.Span, tracingShutdown trac...
  function commandName (line 130) | func commandName(cmd *cobra.Command) []string {
  function getFlags (line 142) | func getFlags(fs *flag.FlagSet) []string {

FILE: cmd/cmdtrace/cmd_span_test.go
  function TestGetFlags (line 29) | func TestGetFlags(t *testing.T) {
  function TestCommandName (line 68) | func TestCommandName(t *testing.T) {

FILE: cmd/compatibility/convert.go
  function getCompletionCommands (line 28) | func getCompletionCommands() []string {
  function getBoolFlags (line 35) | func getBoolFlags() []string {
  function getStringFlags (line 44) | func getStringFlags() []string {
  function Convert (line 56) | func Convert(args []string) []string {

FILE: cmd/compatibility/convert_test.go
  function Test_convert (line 28) | func Test_convert(t *testing.T) {

FILE: cmd/compose/alpha.go
  function alphaCommand (line 22) | func alphaCommand(p *ProjectOptions, dockerCli command.Cli, backendOptio...

FILE: cmd/compose/attach.go
  type attachOpts (line 29) | type attachOpts struct
  function attachCommand (line 40) | func attachCommand(p *ProjectOptions, dockerCli command.Cli, backendOpti...
  function runAttach (line 68) | func runAttach(ctx context.Context, dockerCli command.Cli, backendOption...

FILE: cmd/compose/bridge.go
  function bridgeCommand (line 36) | func bridgeCommand(p *ProjectOptions, dockerCli command.Cli) *cobra.Comm...
  function convertCommand (line 49) | func convertCommand(p *ProjectOptions, dockerCli command.Cli) *cobra.Com...
  function runConvert (line 65) | func runConvert(ctx context.Context, dockerCli command.Cli, p *ProjectOp...
  function transformersCommand (line 78) | func transformersCommand(dockerCli command.Cli) *cobra.Command {
  function listTransformersCommand (line 90) | func listTransformersCommand(dockerCli command.Cli) *cobra.Command {
  function displayTransformer (line 109) | func displayTransformer(dockerCli command.Cli, transformers []image.Summ...
  function createTransformerCommand (line 143) | func createTransformerCommand(dockerCli command.Cli) *cobra.Command {

FILE: cmd/compose/build.go
  type buildOptions (line 36) | type buildOptions struct
    method toAPIBuildOptions (line 53) | func (opts buildOptions) toAPIBuildOptions(services []string) (api.Bui...
  function buildCommand (line 94) | func buildCommand(p *ProjectOptions, dockerCli command.Cli, backendOptio...
  function runBuild (line 152) | func runBuild(ctx context.Context, dockerCli command.Cli, backendOptions...

FILE: cmd/compose/commit.go
  type commitOptions (line 30) | type commitOptions struct
  function commitCommand (line 44) | func commitCommand(p *ProjectOptions, dockerCli command.Cli, backendOpti...
  function runCommit (line 78) | func runCommit(ctx context.Context, dockerCli command.Cli, backendOption...

FILE: cmd/compose/completion.go
  type validArgsFn (line 31) | type validArgsFn
  function noCompletion (line 33) | func noCompletion() validArgsFn {
  function completeServiceNames (line 39) | func completeServiceNames(dockerCli command.Cli, p *ProjectOptions) vali...
  function completeProjectNames (line 62) | func completeProjectNames(dockerCli command.Cli, backendOptions *Backend...
  function completeProfileNames (line 85) | func completeProfileNames(dockerCli command.Cli, p *ProjectOptions) vali...
  function completeScaleArgs (line 111) | func completeScaleArgs(cli command.Cli, p *ProjectOptions) cobra.Complet...

FILE: cmd/compose/compose.go
  constant ComposeParallelLimit (line 58) | ComposeParallelLimit = "COMPOSE_PARALLEL_LIMIT"
  constant ComposeProjectName (line 60) | ComposeProjectName = "COMPOSE_PROJECT_NAME"
  constant ComposeCompatibility (line 62) | ComposeCompatibility = api.ComposeCompatibility
  constant ComposeRemoveOrphans (line 64) | ComposeRemoveOrphans = "COMPOSE_REMOVE_ORPHANS"
  constant ComposeIgnoreOrphans (line 66) | ComposeIgnoreOrphans = "COMPOSE_IGNORE_ORPHANS"
  constant ComposeEnvFiles (line 68) | ComposeEnvFiles = "COMPOSE_ENV_FILES"
  constant ComposeMenu (line 70) | ComposeMenu = "COMPOSE_MENU"
  constant ComposeProgress (line 72) | ComposeProgress = "COMPOSE_PROGRESS"
  function rawEnv (line 76) | func rawEnv(r io.Reader, filename string, vars map[string]string, lookup...
  function init (line 90) | func init() {
  type Command (line 101) | type Command
  type CobraCommand (line 104) | type CobraCommand
  function AdaptCmd (line 107) | func AdaptCmd(fn CobraCommand) func(cmd *cobra.Command, args []string) e...
  function Adapt (line 134) | func Adapt(fn Command) func(cmd *cobra.Command, args []string) error {
  type ProjectOptions (line 140) | type ProjectOptions struct
    method WithProject (line 161) | func (o *ProjectOptions) WithProject(fn ProjectFunc, dockerCli command...
    method WithServices (line 168) | func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn Projec...
    method addProjectFlags (line 223) | func (o *ProjectOptions) addProjectFlags(f *pflag.FlagSet) {
    method projectOrName (line 245) | func (o *ProjectOptions) projectOrName(ctx context.Context, dockerCli ...
    method toProjectName (line 268) | func (o *ProjectOptions) toProjectName(ctx context.Context, dockerCli ...
    method ToModel (line 290) | func (o *ProjectOptions) ToModel(ctx context.Context, dockerCli comman...
    method ToProject (line 310) | func (o *ProjectOptions) ToProject(ctx context.Context, dockerCli comm...
    method remoteLoaders (line 363) | func (o *ProjectOptions) remoteLoaders(dockerCli command.Cli) []loader...
    method toProjectOptions (line 372) | func (o *ProjectOptions) toProjectOptions(po ...cli.ProjectOptionsFn) ...
  type ProjectFunc (line 155) | type ProjectFunc
  type ProjectServicesFunc (line 158) | type ProjectServicesFunc
  type jsonErrorData (line 191) | type jsonErrorData struct
  function errorAsJSON (line 196) | func errorAsJSON(message string) string {
  function makeJSONError (line 209) | func makeJSONError(err error) error {
  function defaultStringArrayVar (line 239) | func defaultStringArrayVar(env string) []string {
  constant PluginName (line 408) | PluginName = "compose"
  function RunningAsStandalone (line 411) | func RunningAsStandalone() bool {
  type BackendOptions (line 415) | type BackendOptions struct
    method Add (line 419) | func (o *BackendOptions) Add(option compose.Option) {
  function RootCommand (line 424) | func RootCommand(dockerCli command.Cli, backendOptions *BackendOptions) ...
  function stdinfo (line 662) | func stdinfo(dockerCli command.Cli) io.Writer {
  function setEnvWithDotEnv (line 669) | func setEnvWithDotEnv(opts ProjectOptions, dockerCli command.Cli) error {

FILE: cmd/compose/compose_oci_test.go
  function TestSetEnvWithDotEnv_WithOCIArtifact (line 28) | func TestSetEnvWithDotEnv_WithOCIArtifact(t *testing.T) {
  function TestSetEnvWithDotEnv_WithGitRemote (line 44) | func TestSetEnvWithDotEnv_WithGitRemote(t *testing.T) {
  function TestSetEnvWithDotEnv_WithLocalPath (line 60) | func TestSetEnvWithDotEnv_WithLocalPath(t *testing.T) {

FILE: cmd/compose/compose_test.go
  function TestFilterServices (line 26) | func TestFilterServices(t *testing.T) {

FILE: cmd/compose/config.go
  type configOptions (line 42) | type configOptions struct
    method ToProject (line 65) | func (o *configOptions) ToProject(ctx context.Context, dockerCli comma...
    method ToModel (line 70) | func (o *configOptions) ToModel(ctx context.Context, dockerCli command...
    method toProjectOptionsFns (line 76) | func (o *configOptions) toProjectOptionsFns() []cli.ProjectOptionsFn {
  function configCommand (line 91) | func configCommand(p *ProjectOptions, dockerCli command.Cli) *cobra.Comm...
  function runConfig (line 175) | func runConfig(ctx context.Context, dockerCli command.Cli, opts configOp...
  function runConfigInterpolate (line 204) | func runConfigInterpolate(ctx context.Context, dockerCli command.Cli, op...
  function imagesOnly (line 256) | func imagesOnly(project *types.Project) *types.Project {
  function runConfigNoInterpolate (line 267) | func runConfigNoInterpolate(ctx context.Context, dockerCli command.Cli, ...
  function resolveImageDigests (line 301) | func resolveImageDigests(ctx context.Context, dockerCli command.Cli, mod...
  function formatModel (line 334) | func formatModel(model map[string]any, format string) (content []byte, e...
  function runServices (line 349) | func runServices(ctx context.Context, dockerCli command.Cli, opts config...
  function runVolumes (line 383) | func runVolumes(ctx context.Context, dockerCli command.Cli, opts configO...
  function runNetworks (line 399) | func runNetworks(ctx context.Context, dockerCli command.Cli, opts config...
  function runModels (line 415) | func runModels(ctx context.Context, dockerCli command.Cli, opts configOp...
  function runHash (line 433) | func runHash(ctx context.Context, dockerCli command.Cli, opts configOpti...
  function runProfiles (line 475) | func runProfiles(ctx context.Context, dockerCli command.Cli, opts config...
  function runConfigImages (line 503) | func runConfigImages(ctx context.Context, dockerCli command.Cli, opts co...
  function runVariables (line 520) | func runVariables(ctx context.Context, dockerCli command.Cli, opts confi...
  function runEnvironment (line 545) | func runEnvironment(ctx context.Context, dockerCli command.Cli, opts con...
  function escapeDollarSign (line 562) | func escapeDollarSign(marshal []byte) []byte {

FILE: cmd/compose/cp.go
  type copyOptions (line 31) | type copyOptions struct
  function copyCommand (line 42) | func copyCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runCopy (line 77) | func runCopy(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/create.go
  type createOptions (line 37) | type createOptions struct
    method recreateStrategy (line 134) | func (opts createOptions) recreateStrategy() string {
    method dependenciesRecreateStrategy (line 147) | func (opts createOptions) dependenciesRecreateStrategy() string {
    method GetTimeout (line 157) | func (opts createOptions) GetTimeout() *time.Duration {
    method Apply (line 165) | func (opts createOptions) Apply(project *types.Project) error {
    method isPullPolicyValid (line 217) | func (opts createOptions) isPullPolicyValid() bool {
  function createCommand (line 55) | func createCommand(p *ProjectOptions, dockerCli command.Cli, backendOpti...
  function runCreate (line 99) | func runCreate(ctx context.Context, dockerCli command.Cli, backendOption...
  function applyScaleOpts (line 199) | func applyScaleOpts(project *types.Project, opts []string) error {

FILE: cmd/compose/down.go
  type downOptions (line 35) | type downOptions struct
  function downCommand (line 44) | func downCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runDown (line 81) | func runDown(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/events.go
  type eventsOpts (line 31) | type eventsOpts struct
  function eventsCommand (line 38) | func eventsCommand(p *ProjectOptions, dockerCli command.Cli, backendOpti...
  function runEvents (line 59) | func runEvents(ctx context.Context, dockerCli command.Cli, backendOption...

FILE: cmd/compose/exec.go
  type execOpts (line 36) | type execOpts struct
  function execCommand (line 52) | func execCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runExec (line 104) | func runExec(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/export.go
  type exportOptions (line 29) | type exportOptions struct
  function exportCommand (line 37) | func exportCommand(p *ProjectOptions, dockerCli command.Cli, backendOpti...
  function runExport (line 62) | func runExport(ctx context.Context, dockerCli command.Cli, backendOption...

FILE: cmd/compose/generate.go
  type generateOptions (line 31) | type generateOptions struct
  function generateCommand (line 36) | func generateCommand(p *ProjectOptions, dockerCli command.Cli, backendOp...
  function runGenerate (line 58) | func runGenerate(ctx context.Context, dockerCli command.Cli, backendOpti...

FILE: cmd/compose/images.go
  type imageOptions (line 39) | type imageOptions struct
  function imagesCommand (line 45) | func imagesCommand(p *ProjectOptions, dockerCli command.Cli, backendOpti...
  function runImages (line 62) | func runImages(ctx context.Context, dockerCli command.Cli, backendOption...

FILE: cmd/compose/kill.go
  type killOptions (line 33) | type killOptions struct
  function killCommand (line 39) | func killCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runKill (line 60) | func runKill(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/list.go
  type lsOptions (line 37) | type lsOptions struct
  function listCommand (line 44) | func listCommand(dockerCli command.Cli, backendOptions *BackendOptions) ...
  function match (line 68) | func match(filters client.Filters, field, source string) bool {
  function runList (line 86) | func runList(ctx context.Context, dockerCli command.Cli, backendOptions ...
  type stackView (line 129) | type stackView struct
  function viewFromStackList (line 135) | func viewFromStackList(stackList []api.Stack) []stackView {

FILE: cmd/compose/logs.go
  type logsOptions (line 31) | type logsOptions struct
  function logsCommand (line 44) | func logsCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runLogs (line 74) | func runLogs(ctx context.Context, dockerCli command.Cli, backendOptions ...
  type logConsumer (line 108) | type logConsumer struct
    method Log (line 112) | func (l logConsumer) Log(containerName, message string) {
    method Err (line 119) | func (l logConsumer) Err(containerName, message string) {
    method Status (line 127) | func (l logConsumer) Status(containerName, message string) {

FILE: cmd/compose/options.go
  function applyPlatforms (line 39) | func applyPlatforms(project *types.Project, buildForSinglePlatform bool)...
  function isRemoteConfig (line 90) | func isRemoteConfig(dockerCli command.Cli, options buildOptions) bool {
  function checksForRemoteStack (line 104) | func checksForRemoteStack(ctx context.Context, dockerCli command.Cli, pr...
  type varInfo (line 118) | type varInfo struct
  function promptForInterpolatedVariables (line 128) | func promptForInterpolatedVariables(ctx context.Context, dockerCli comma...
  function extractInterpolationVariablesFromModel (line 159) | func extractInterpolationVariablesFromModel(ctx context.Context, dockerC...
  function extractEnvCLIDefined (line 212) | func extractEnvCLIDefined(cmdEnvs []string) map[string]string {
  function displayInterpolationVariables (line 224) | func displayInterpolationVariables(writer io.Writer, varsInfo []varInfo) {
  function displayLocationRemoteStack (line 249) | func displayLocationRemoteStack(dockerCli command.Cli, project *types.Pr...
  function confirmRemoteIncludes (line 256) | func confirmRemoteIncludes(dockerCli command.Cli, options buildOptions, ...

FILE: cmd/compose/options_test.go
  function TestApplyPlatforms_InferFromRuntime (line 36) | func TestApplyPlatforms_InferFromRuntime(t *testing.T) {
  function TestApplyPlatforms_DockerDefaultPlatform (line 71) | func TestApplyPlatforms_DockerDefaultPlatform(t *testing.T) {
  function TestApplyPlatforms_UnsupportedPlatform (line 107) | func TestApplyPlatforms_UnsupportedPlatform(t *testing.T) {
  function TestIsRemoteConfig (line 142) | func TestIsRemoteConfig(t *testing.T) {
  function TestDisplayLocationRemoteStack (line 187) | func TestDisplayLocationRemoteStack(t *testing.T) {
  function TestDisplayInterpolationVariables (line 212) | func TestDisplayInterpolationVariables(t *testing.T) {
  function TestConfirmRemoteIncludes (line 276) | func TestConfirmRemoteIncludes(t *testing.T) {

FILE: cmd/compose/pause.go
  type pauseOptions (line 29) | type pauseOptions struct
  function pauseCommand (line 33) | func pauseCommand(p *ProjectOptions, dockerCli command.Cli, backendOptio...
  function runPause (line 48) | func runPause(ctx context.Context, dockerCli command.Cli, backendOptions...
  type unpauseOptions (line 64) | type unpauseOptions struct
  function unpauseCommand (line 68) | func unpauseCommand(p *ProjectOptions, dockerCli command.Cli, backendOpt...
  function runUnPause (line 83) | func runUnPause(ctx context.Context, dockerCli command.Cli, backendOptio...

FILE: cmd/compose/port.go
  type portOptions (line 32) | type portOptions struct
  function portCommand (line 39) | func portCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runPort (line 66) | func runPort(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/ps.go
  type psOptions (line 37) | type psOptions struct
    method parseFilter (line 49) | func (p *psOptions) parseFilter() error {
  function psCommand (line 68) | func psCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions ...
  function runPs (line 95) | func runPs(ctx context.Context, dockerCli command.Cli, backendOptions *B...
  function filterByStatus (line 167) | func filterByStatus(containers []api.ContainerSummary, statuses []string...

FILE: cmd/compose/publish.go
  type publishOptions (line 33) | type publishOptions struct
  function publishCommand (line 43) | func publishCommand(p *ProjectOptions, dockerCli command.Cli, backendOpt...
  function runPublish (line 76) | func runPublish(ctx context.Context, dockerCli command.Cli, backendOptio...

FILE: cmd/compose/pull.go
  type pullOptions (line 34) | type pullOptions struct
    method apply (line 80) | func (opts pullOptions) apply(project *types.Project, services []strin...
  function pullCommand (line 46) | func pullCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runPull (line 101) | func runPull(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/pullOptions_test.go
  function TestApplyPullOptions (line 26) | func TestApplyPullOptions(t *testing.T) {

FILE: cmd/compose/push.go
  type pushOptions (line 30) | type pushOptions struct
  function pushCommand (line 38) | func pushCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runPush (line 57) | func runPush(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/remove.go
  type removeOptions (line 31) | type removeOptions struct
  function removeCommand (line 38) | func removeCommand(p *ProjectOptions, dockerCli command.Cli, backendOpti...
  function runRemove (line 66) | func runRemove(ctx context.Context, dockerCli command.Cli, backendOption...

FILE: cmd/compose/restart.go
  type restartOptions (line 30) | type restartOptions struct
  function restartCommand (line 37) | func restartCommand(p *ProjectOptions, dockerCli command.Cli, backendOpt...
  function runRestart (line 59) | func runRestart(ctx context.Context, dockerCli command.Cli, backendOptio...

FILE: cmd/compose/run.go
  type runOptions (line 44) | type runOptions struct
    method apply (line 73) | func (options runOptions) apply(project *types.Project) (*types.Projec...
    method getEnvironment (line 122) | func (options runOptions) getEnvironment(resolve func(string) (string,...
  function runCommand (line 145) | func runCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions...
  function normalizeRunFlags (line 260) | func normalizeRunFlags(f *pflag.FlagSet, name string) pflag.NormalizedNa...
  function runRun (line 270) | func runRun(ctx context.Context, backend api.Compose, project *types.Pro...

FILE: cmd/compose/scale.go
  type scaleOptions (line 35) | type scaleOptions struct
  function scaleCommand (line 40) | func scaleCommand(p *ProjectOptions, dockerCli command.Cli, backendOptio...
  function runScale (line 63) | func runScale(ctx context.Context, dockerCli command.Cli, backendOptions...
  function parseServicesReplicasArgs (line 93) | func parseServicesReplicasArgs(args []string) (map[string]int, error) {

FILE: cmd/compose/start.go
  type startOptions (line 30) | type startOptions struct
  function startCommand (line 36) | func startCommand(p *ProjectOptions, dockerCli command.Cli, backendOptio...
  function runStart (line 55) | func runStart(ctx context.Context, dockerCli command.Cli, backendOptions...

FILE: cmd/compose/stats.go
  type statsOptions (line 31) | type statsOptions struct
  function statsCommand (line 39) | func statsCommand(p *ProjectOptions, dockerCli command.Cli) *cobra.Comma...
  function runStats (line 65) | func runStats(ctx context.Context, dockerCli command.Cli, opts statsOpti...

FILE: cmd/compose/stop.go
  type stopOptions (line 30) | type stopOptions struct
  function stopCommand (line 36) | func stopCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runStop (line 57) | func runStop(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/top.go
  type topOptions (line 34) | type topOptions struct
  function topCommand (line 38) | func topCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions...
  type topHeader (line 54) | type topHeader
  type topEntries (line 55) | type topEntries
  function runTop (line 58) | func runTop(ctx context.Context, dockerCli command.Cli, backendOptions *...
  function collectTop (line 81) | func collectTop(containers []api.ContainerProcSummary) (topHeader, []top...
  function topPrint (line 122) | func topPrint(out io.Writer, headers topHeader, rows []topEntries) error {

FILE: cmd/compose/top_test.go
  function TestRunTopCore (line 207) | func TestRunTopCore(t *testing.T) {
  function trim (line 323) | func trim(s string) string {

FILE: cmd/compose/up.go
  type composeOptions (line 42) | type composeOptions struct
  type upOptions (line 46) | type upOptions struct
    method apply (line 67) | func (opts upOptions) apply(project *types.Project, services []string)...
    method validateNavigationMenu (line 86) | func (opts *upOptions) validateNavigationMenu(dockerCli command.Cli) {
    method OnExit (line 102) | func (opts upOptions) OnExit() api.Cascade {
  function upCommand (line 113) | func upCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions ...
  function validateFlags (line 190) | func validateFlags(up *upOptions, create *createOptions) error {
  function runUp (line 232) | func runUp(
  function setServiceScale (line 355) | func setServiceScale(project *types.Project, name string, replicas int) ...

FILE: cmd/compose/up_test.go
  function TestApplyScaleOpt (line 28) | func TestApplyScaleOpt(t *testing.T) {
  function TestUpOptions_OnExit (line 54) | func TestUpOptions_OnExit(t *testing.T) {

FILE: cmd/compose/version.go
  type versionOptions (line 30) | type versionOptions struct
  function versionCommand (line 35) | func versionCommand(dockerCli command.Cli) *cobra.Command {
  function runVersion (line 59) | func runVersion(opts versionOptions, dockerCli command.Cli) {

FILE: cmd/compose/version_test.go
  function TestVersionCommand (line 31) | func TestVersionCommand(t *testing.T) {

FILE: cmd/compose/viz.go
  type vizOptions (line 32) | type vizOptions struct
  function vizCommand (line 40) | func vizCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions...
  function runViz (line 68) | func runViz(ctx context.Context, dockerCli command.Cli, backendOptions *...
  function preferredIndentationStr (line 95) | func preferredIndentationStr(size int, useSpace bool) (string, error) {

FILE: cmd/compose/viz_test.go
  function TestPreferredIndentationStr (line 26) | func TestPreferredIndentationStr(t *testing.T) {

FILE: cmd/compose/volumes.go
  type volumesOptions (line 33) | type volumesOptions struct
  function volumesCommand (line 39) | func volumesCommand(p *ProjectOptions, dockerCli command.Cli, backendOpt...
  function runVol (line 59) | func runVol(ctx context.Context, dockerCli command.Cli, backendOptions *...

FILE: cmd/compose/wait.go
  type waitOptions (line 31) | type waitOptions struct
  function waitCommand (line 39) | func waitCommand(p *ProjectOptions, dockerCli command.Cli, backendOption...
  function runWait (line 65) | func runWait(ctx context.Context, dockerCli command.Cli, backendOptions ...

FILE: cmd/compose/watch.go
  type watchOptions (line 34) | type watchOptions struct
  function watchCommand (line 40) | func watchCommand(p *ProjectOptions, dockerCli command.Cli, backendOptio...
  function runWatch (line 68) | func runWatch(ctx context.Context, dockerCli command.Cli, backendOptions...

FILE: cmd/display/colors.go
  type colorFunc (line 23) | type colorFunc
  function NoColor (line 39) | func NoColor() {

FILE: cmd/display/dryrun.go
  constant DRYRUN_PREFIX (line 20) | DRYRUN_PREFIX = " DRY-RUN MODE - "

FILE: cmd/display/json.go
  function JSON (line 28) | func JSON(out io.Writer) api.EventProcessor {
  type jsonWriter (line 34) | type jsonWriter struct
    method Start (line 52) | func (p *jsonWriter) Start(ctx context.Context, operation string) {
    method Event (line 55) | func (p *jsonWriter) Event(e api.Resource) {
    method On (line 74) | func (p *jsonWriter) On(events ...api.Resource) {
    method Done (line 80) | func (p *jsonWriter) Done(_ string, _ bool) {
  type jsonMessage (line 39) | type jsonMessage struct

FILE: cmd/display/json_test.go
  function TestJsonWriter_Event (line 29) | func TestJsonWriter_Event(t *testing.T) {

FILE: cmd/display/mode.go
  constant ModeAuto (line 24) | ModeAuto = "auto"
  constant ModeTTY (line 26) | ModeTTY = "tty"
  constant ModePlain (line 28) | ModePlain = "plain"
  constant ModeQuiet (line 30) | ModeQuiet = "quiet"
  constant ModeJSON (line 32) | ModeJSON = "json"

FILE: cmd/display/plain.go
  function Plain (line 27) | func Plain(out io.Writer) api.EventProcessor {
  type plainWriter (line 33) | type plainWriter struct
    method Start (line 38) | func (p *plainWriter) Start(ctx context.Context, operation string) {
    method Event (line 41) | func (p *plainWriter) Event(e api.Resource) {
    method On (line 49) | func (p *plainWriter) On(events ...api.Resource) {
    method Done (line 55) | func (p *plainWriter) Done(_ string, _ bool) {

FILE: cmd/display/quiet.go
  function Quiet (line 25) | func Quiet() api.EventProcessor {
  type quiet (line 29) | type quiet struct
    method Start (line 31) | func (q *quiet) Start(_ context.Context, _ string) {
    method Done (line 34) | func (q *quiet) Done(_ string, _ bool) {
    method On (line 37) | func (q *quiet) On(_ ...api.Resource) {

FILE: cmd/display/spinner.go
  type Spinner (line 24) | type Spinner struct
    method String (line 51) | func (s *Spinner) String() string {
    method Stop (line 64) | func (s *Spinner) Stop() {
    method Restart (line 68) | func (s *Spinner) Restart() {
  function NewSpinner (line 32) | func NewSpinner() *Spinner {

FILE: cmd/display/tty.go
  function Full (line 40) | func Full(out io.Writer, info io.Writer, detached bool) api.EventProcess...
  type ttyWriter (line 51) | type ttyWriter struct
    method Start (line 158) | func (w *ttyWriter) Start(ctx context.Context, operation string) {
    method Done (line 177) | func (w *ttyWriter) Done(operation string, success bool) {
    method On (line 188) | func (w *ttyWriter) On(events ...api.Resource) {
    method event (line 205) | func (w *ttyWriter) event(e api.Resource) {
    method printEvent (line 227) | func (w *ttyWriter) printEvent(e api.Resource) {
    method parentTasks (line 247) | func (w *ttyWriter) parentTasks() iter.Seq[*task] {
    method childrenTasks (line 258) | func (w *ttyWriter) childrenTasks(parent string) iter.Seq[*task] {
    method print (line 283) | func (w *ttyWriter) print() {
    method printWithDimensions (line 295) | func (w *ttyWriter) printWithDimensions(terminalWidth, terminalHeight ...
    method applyPadding (line 371) | func (w *ttyWriter) applyPadding(lines []lineData, terminalWidth int, ...
    method adjustLineWidth (line 399) | func (w *ttyWriter) adjustLineWidth(lines []lineData, timerLen int, te...
    method prepareLineData (line 506) | func (w *ttyWriter) prepareLineData(t *task) lineData {
  type task (line 67) | type task struct
    method update (line 106) | func (t *task) update(e api.Resource) {
    method stop (line 140) | func (t *task) stop() {
    method hasMore (line 145) | func (t *task) hasMore() {
    method Completed (line 149) | func (t *task) Completed() bool {
  function newTask (line 82) | func newTask(e api.Resource) task {
  type lineData (line 270) | type lineData struct
  function maxStatusLength (line 420) | func maxStatusLength(lines []lineData) int {
  function maxBeforeStatusWidth (line 432) | func maxBeforeStatusWidth(lines []lineData) int {
  function computeOverflow (line 446) | func computeOverflow(lines []lineData, maxBeforeStatus, maxStatusLen, ti...
  function truncateDetails (line 466) | func truncateDetails(lines []lineData, overflow int) bool {
  function truncateLongestTaskID (line 483) | func truncateLongestTaskID(lines []lineData, overflow, minIDLen int) bool {
  function lineText (line 567) | func lineText(l lineData) string {
  function spinner (line 594) | func spinner(t *task) string {
  function colorFn (line 607) | func colorFn(s api.EventStatus) colorFunc {
  function numDone (line 620) | func numDone(tasks map[string]*task) int {
  function lenAnsi (line 631) | func lenAnsi(s string) int {

FILE: cmd/display/tty_test.go
  function newTestWriter (line 33) | func newTestWriter() (*ttyWriter, *bytes.Buffer) {
  function addTask (line 46) | func addTask(w *ttyWriter, id, text, details string, status api.EventSta...
  function extractLines (line 61) | func extractLines(buf *bytes.Buffer) []string {
  function TestPrintWithDimensions_LinesFitTerminalWidth (line 75) | func TestPrintWithDimensions_LinesFitTerminalWidth(t *testing.T) {
  function TestPrintWithDimensions_MultipleTasksFitTerminalWidth (line 138) | func TestPrintWithDimensions_MultipleTasksFitTerminalWidth(t *testing.T) {
  function TestPrintWithDimensions_VeryNarrowTerminal (line 158) | func TestPrintWithDimensions_VeryNarrowTerminal(t *testing.T) {
  function TestPrintWithDimensions_TaskWithProgress (line 174) | func TestPrintWithDimensions_TaskWithProgress(t *testing.T) {
  function TestAdjustLineWidth_DetailsCorrectlyTruncated (line 218) | func TestAdjustLineWidth_DetailsCorrectlyTruncated(t *testing.T) {
  function TestAdjustLineWidth_TaskIDCorrectlyTruncated (line 249) | func TestAdjustLineWidth_TaskIDCorrectlyTruncated(t *testing.T) {
  function TestAdjustLineWidth_NoTruncationNeeded (line 272) | func TestAdjustLineWidth_NoTruncationNeeded(t *testing.T) {
  function TestAdjustLineWidth_DetailsRemovedWhenTooShort (line 291) | func TestAdjustLineWidth_DetailsRemovedWhenTooShort(t *testing.T) {
  function stripAnsi (line 308) | func stripAnsi(s string) string {
  function TestPrintWithDimensions_PulledAndPullingWithLongIDs (line 328) | func TestPrintWithDimensions_PulledAndPullingWithLongIDs(t *testing.T) {
  function TestLenAnsi (line 407) | func TestLenAnsi(t *testing.T) {
  function TestDoneDeadlockFix (line 427) | func TestDoneDeadlockFix(t *testing.T) {

FILE: cmd/formatter/ansi.go
  function saveCursor (line 28) | func saveCursor() {
  function restoreCursor (line 36) | func restoreCursor() {
  function showCursor (line 44) | func showCursor() {
  function moveCursor (line 51) | func moveCursor(y, x int) {
  function carriageReturn (line 58) | func carriageReturn() {
  function clearLine (line 65) | func clearLine() {
  function moveCursorUp (line 73) | func moveCursorUp(lines int) {
  function moveCursorDown (line 81) | func moveCursorDown(lines int) {
  function newLine (line 89) | func newLine() {
  function lenAnsi (line 94) | func lenAnsi(s string) int {

FILE: cmd/formatter/colors.go
  constant BOLD (line 40) | BOLD      = "1"
  constant FAINT (line 41) | FAINT     = "2"
  constant ITALIC (line 42) | ITALIC    = "3"
  constant UNDERLINE (line 43) | UNDERLINE = "4"
  constant RESET (line 47) | RESET = "0"
  constant CYAN (line 48) | CYAN  = "36"
  constant Never (line 53) | Never = "never"
  constant Always (line 56) | Always = "always"
  constant Auto (line 59) | Auto = "auto"
  constant ansiColorOffset (line 63) | ansiColorOffset = 30
  function SetANSIMode (line 66) | func SetANSIMode(streams command.Streams, ansi string) {
  function useAnsi (line 75) | func useAnsi(streams command.Streams, ansi string) bool {
  type colorFunc (line 86) | type colorFunc
  function ansiColor (line 92) | func ansiColor(code, s string, formatOpts ...string) string {
  function ansiColorCode (line 97) | func ansiColorCode(code string, formatOpts ...string) string {
  function makeColorFunc (line 109) | func makeColorFunc(code string) colorFunc {
  function rainbowColor (line 122) | func rainbowColor() colorFunc {
  function init (line 130) | func init() {

FILE: cmd/formatter/consts.go
  constant JSON (line 21) | JSON = "json"
  constant TemplateLegacyJSON (line 23) | TemplateLegacyJSON = "{{json.}}"
  constant PRETTY (line 27) | PRETTY = "pretty"
  constant TABLE (line 29) | TABLE = "table"

FILE: cmd/formatter/container.go
  constant defaultContainerTableFormat (line 35) | defaultContainerTableFormat = "table {{.Name}}\t{{.Image}}\t{{.Command}}...
  constant nameHeader (line 37) | nameHeader       = "NAME"
  constant projectHeader (line 38) | projectHeader    = "PROJECT"
  constant serviceHeader (line 39) | serviceHeader    = "SERVICE"
  constant commandHeader (line 40) | commandHeader    = "COMMAND"
  constant runningForHeader (line 41) | runningForHeader = "CREATED"
  constant mountsHeader (line 42) | mountsHeader     = "MOUNTS"
  constant localVolumes (line 43) | localVolumes     = "LOCAL VOLUMES"
  constant networksHeader (line 44) | networksHeader   = "NETWORKS"
  function NewContainerFormat (line 48) | func NewContainerFormat(source string, quiet bool, size bool) formatter....
  function ContainerWrite (line 86) | func ContainerWrite(ctx formatter.Context, containers []api.ContainerSum...
  type ContainerContext (line 100) | type ContainerContext struct
    method MarshalJSON (line 134) | func (c *ContainerContext) MarshalJSON() ([]byte, error) {
    method ID (line 140) | func (c *ContainerContext) ID() string {
    method Name (line 147) | func (c *ContainerContext) Name() string {
    method Names (line 154) | func (c *ContainerContext) Names() string {
    method Service (line 167) | func (c *ContainerContext) Service() string {
    method Project (line 171) | func (c *ContainerContext) Project() string {
    method Image (line 175) | func (c *ContainerContext) Image() string {
    method Command (line 179) | func (c *ContainerContext) Command() string {
    method CreatedAt (line 187) | func (c *ContainerContext) CreatedAt() string {
    method RunningFor (line 191) | func (c *ContainerContext) RunningFor() string {
    method ExitCode (line 196) | func (c *ContainerContext) ExitCode() int {
    method State (line 200) | func (c *ContainerContext) State() string {
    method Status (line 204) | func (c *ContainerContext) Status() string {
    method Health (line 208) | func (c *ContainerContext) Health() string {
    method Publishers (line 212) | func (c *ContainerContext) Publishers() api.PortPublishers {
    method Ports (line 216) | func (c *ContainerContext) Ports() string {
    method Labels (line 236) | func (c *ContainerContext) Labels() string {
    method Label (line 250) | func (c *ContainerContext) Label(name string) string {
    method Mounts (line 259) | func (c *ContainerContext) Mounts() string {
    method LocalVolumes (line 271) | func (c *ContainerContext) LocalVolumes() string {
    method Networks (line 277) | func (c *ContainerContext) Networks() string {
    method Size (line 282) | func (c *ContainerContext) Size() string {
  function NewContainerContext (line 113) | func NewContainerContext() *ContainerContext {

FILE: cmd/formatter/formatter.go
  function Print (line 29) | func Print(toJSON any, format string, outWriter io.Writer, writerFn func...

FILE: cmd/formatter/formatter_test.go
  type testStruct (line 29) | type testStruct struct
  function TestPrint (line 35) | func TestPrint(t *testing.T) {
  function TestColorsGoroutinesLeak (line 76) | func TestColorsGoroutinesLeak(t *testing.T) {

FILE: cmd/formatter/json.go
  constant standardIndentation (line 24) | standardIndentation = "    "
  function ToStandardJSON (line 27) | func ToStandardJSON(i any) (string, error) {
  function ToJSON (line 32) | func ToJSON(i any, prefix string, indentation string) (string, error) {

FILE: cmd/formatter/logs.go
  type logConsumer (line 35) | type logConsumer struct
    method register (line 60) | func (l *logConsumer) register(name string) *presenter {
    method getPresenter (line 99) | func (l *logConsumer) getPresenter(container string) *presenter {
    method Log (line 108) | func (l *logConsumer) Log(container, message string) {
    method Err (line 113) | func (l *logConsumer) Err(container, message string) {
    method write (line 117) | func (l *logConsumer) write(w io.Writer, container, message string) {
    method Status (line 132) | func (l *logConsumer) Status(container, msg string) {
    method computeWidth (line 138) | func (l *logConsumer) computeWidth() {
  function NewLogConsumer (line 47) | func NewLogConsumer(ctx context.Context, stdout, stderr io.Writer, color...
  type presenter (line 150) | type presenter struct
    method setPrefix (line 156) | func (p *presenter) setPrefix(width int) {
  type logDecorator (line 164) | type logDecorator struct
    method Log (line 170) | func (l logDecorator) Log(containerName, message string) {
    method Err (line 176) | func (l logDecorator) Err(containerName, message string) {
    method Status (line 182) | func (l logDecorator) Status(container, msg string) {

FILE: cmd/formatter/pretty.go
  function PrintPrettySection (line 27) | func PrintPrettySection(out io.Writer, printer func(writer io.Writer), h...

FILE: cmd/formatter/shortcut.go
  constant DISPLAY_ERROR_TIME (line 38) | DISPLAY_ERROR_TIME = 10
  type KeyboardError (line 40) | type KeyboardError struct
    method shouldDisplay (line 45) | func (ke *KeyboardError) shouldDisplay() bool {
    method printError (line 49) | func (ke *KeyboardError) printError(height int, info string) {
    method addError (line 60) | func (ke *KeyboardError) addError(prefix string, err error) {
    method error (line 69) | func (ke *KeyboardError) error() string {
  type KeyboardWatch (line 73) | type KeyboardWatch struct
  type Feature (line 79) | type Feature interface
  type KEYBOARD_LOG_LEVEL (line 84) | type KEYBOARD_LOG_LEVEL
  constant NONE (line 87) | NONE  KEYBOARD_LOG_LEVEL = 0
  constant INFO (line 88) | INFO  KEYBOARD_LOG_LEVEL = 1
  constant DEBUG (line 89) | DEBUG KEYBOARD_LOG_LEVEL = 2
  type LogKeyboard (line 92) | type LogKeyboard struct
    method Decorate (line 109) | func (lk *LogKeyboard) Decorate(l api.LogConsumer) api.LogConsumer {
    method PrintKeyboardInfo (line 117) | func (lk *LogKeyboard) PrintKeyboardInfo() {
    method createBuffer (line 124) | func (lk *LogKeyboard) createBuffer(lines int) {
    method printNavigationMenu (line 143) | func (lk *LogKeyboard) printNavigationMenu() {
    method navigationMenu (line 166) | func (lk *LogKeyboard) navigationMenu() string {
    method clearNavigationMenu (line 186) | func (lk *LogKeyboard) clearNavigationMenu() {
    method openDockerDesktop (line 199) | func (lk *LogKeyboard) openDockerDesktop(ctx context.Context, project ...
    method openDDComposeUI (line 217) | func (lk *LogKeyboard) openDDComposeUI(ctx context.Context, project *t...
    method openDDWatchDocs (line 235) | func (lk *LogKeyboard) openDDWatchDocs(ctx context.Context, project *t...
    method keyboardError (line 250) | func (lk *LogKeyboard) keyboardError(prefix string, err error) {
    method ToggleWatch (line 261) | func (lk *LogKeyboard) ToggleWatch(ctx context.Context, options api.Up...
    method HandleKeyEvents (line 288) | func (lk *LogKeyboard) HandleKeyEvents(ctx context.Context, event keyb...
    method EnableWatch (line 332) | func (lk *LogKeyboard) EnableWatch(enabled bool, watcher Feature) {
    method EnableDetach (line 339) | func (lk *LogKeyboard) EnableDetach(detach func()) {
  function NewKeyboardManager (line 101) | func NewKeyboardManager(isDockerDesktopActive bool, sc chan<- os.Signal)...
  function allocateSpace (line 343) | func allocateSpace(lines int) {
  function extraLines (line 351) | func extraLines(s string) int {
  function shortcutKeyColor (line 355) | func shortcutKeyColor(key string) string {
  function navColor (line 363) | func navColor(key string) string {

FILE: cmd/formatter/shortcut_unix.go
  function handleCtrlZ (line 23) | func handleCtrlZ() {

FILE: cmd/formatter/shortcut_windows.go
  function handleCtrlZ (line 22) | func handleCtrlZ() {

FILE: cmd/main.go
  function pluginMain (line 37) | func pluginMain() {
  function main (line 80) | func main() {

FILE: cmd/prompt/prompt.go
  type UI (line 32) | type UI interface
  function NewPrompt (line 36) | func NewPrompt(stdin *streams.In, stdout *streams.Out) UI {
  type User (line 44) | type User struct
    method Confirm (line 76) | func (u User) Confirm(message string, defaultValue bool) (bool, error) {
  type streamsFileWriter (line 50) | type streamsFileWriter struct
    method Write (line 54) | func (s streamsFileWriter) Write(p []byte) (n int, err error) {
    method Fd (line 58) | func (s streamsFileWriter) Fd() uintptr {
  type streamsFileReader (line 63) | type streamsFileReader struct
    method Read (line 67) | func (s streamsFileReader) Read(p []byte) (n int, err error) {
    method Fd (line 71) | func (s streamsFileReader) Fd() uintptr {
  type Pipe (line 91) | type Pipe struct
    method Confirm (line 97) | func (u Pipe) Confirm(message string, defaultValue bool) (bool, error) {

FILE: cmd/prompt/prompt_mock.go
  type MockUI (line 14) | type MockUI struct
    method EXPECT (line 32) | func (m *MockUI) EXPECT() *MockUIMockRecorder {
    method Confirm (line 37) | func (m *MockUI) Confirm(arg0 string, arg1 bool) (bool, error) {
    method Input (line 52) | func (m *MockUI) Input(arg0, arg1 string) (string, error) {
    method Password (line 67) | func (m *MockUI) Password(arg0 string) (string, error) {
    method Select (line 82) | func (m *MockUI) Select(arg0 string, arg1 []string) (int, error) {
  type MockUIMockRecorder (line 20) | type MockUIMockRecorder struct
    method Confirm (line 46) | func (mr *MockUIMockRecorder) Confirm(arg0, arg1 interface{}) *gomock....
    method Input (line 61) | func (mr *MockUIMockRecorder) Input(arg0, arg1 interface{}) *gomock.Ca...
    method Password (line 76) | func (mr *MockUIMockRecorder) Password(arg0 interface{}) *gomock.Call {
    method Select (line 91) | func (mr *MockUIMockRecorder) Select(arg0, arg1 interface{}) *gomock.C...
  function NewMockUI (line 25) | func NewMockUI(ctrl *gomock.Controller) *MockUI {

FILE: docs/examples/provider.go
  function main (line 29) | func main() {
  type options (line 42) | type options struct
  function composeCommand (line 47) | func composeCommand() *cobra.Command {
  constant lineSeparator (line 82) | lineSeparator = "\n"
  function up (line 84) | func up(options options, args []string) {
  function down (line 95) | func down(_ *cobra.Command, _ []string) {
  function metadataCommand (line 99) | func metadataCommand(upCmd, downCmd *cobra.Command) *cobra.Command {
  function metadata (line 109) | func metadata(upCmd, downCmd *cobra.Command) {
  function commandParameters (line 121) | func commandParameters(cmd *cobra.Command) CommandMetadata {
  type ProviderMetadata (line 136) | type ProviderMetadata struct
  type CommandMetadata (line 142) | type CommandMetadata struct
  type Metadata (line 146) | type Metadata struct

FILE: docs/yaml/main/generate.go
  function generateDocs (line 31) | func generateDocs(opts *options) error {
  function disableFlagsInUseLine (line 69) | func disableFlagsInUseLine(cmd *cobra.Command) {
  function visitAll (line 79) | func visitAll(root *cobra.Command, fn func(*cobra.Command)) {
  type options (line 86) | type options struct
  function main (line 92) | func main() {

FILE: internal/desktop/client.go
  type Client (line 38) | type Client struct
    method Endpoint (line 60) | func (c *Client) Endpoint() string {
    method Close (line 65) | func (c *Client) Close() error {
    method Ping (line 75) | func (c *Client) Ping(ctx context.Context) (*PingResponse, error) {
    method FeatureFlags (line 106) | func (c *Client) FeatureFlags(ctx context.Context) (FeatureFlagRespons...
    method newRequest (line 131) | func (c *Client) newRequest(ctx context.Context, method, path string, ...
  function NewClient (line 45) | func NewClient(apiEndpoint string) *Client {
  type PingResponse (line 70) | type PingResponse struct
  type FeatureFlagResponse (line 100) | type FeatureFlagResponse
  type FeatureFlagValue (line 102) | type FeatureFlagValue struct
  function backendURL (line 144) | func backendURL(path string) string {

FILE: internal/desktop/client_test.go
  function TestClientPing (line 27) | func TestClientPing(t *testing.T) {

FILE: internal/experimental/experimental.go
  constant envComposeExperimentalGlobal (line 29) | envComposeExperimentalGlobal = "COMPOSE_EXPERIMENTAL"
  type State (line 32) | type State struct
    method Load (line 50) | func (s *State) Load(ctx context.Context, client *desktop.Client) error {
  function NewState (line 38) | func NewState() *State {

FILE: internal/locker/pidfile.go
  type Pidfile (line 24) | type Pidfile struct
  function NewPidfile (line 28) | func NewPidfile(projectName string) (*Pidfile, error) {

FILE: internal/locker/pidfile_unix.go
  method Lock (line 27) | func (f *Pidfile) Lock() error {

FILE: internal/locker/pidfile_windows.go
  method Lock (line 28) | func (f *Pidfile) Lock() error {

FILE: internal/locker/runtime.go
  function runDir (line 23) | func runDir() (string, error) {

FILE: internal/locker/runtime_darwin.go
  function osDependentRunDir (line 28) | func osDependentRunDir() (string, error) {

FILE: internal/locker/runtime_unix.go
  function osDependentRunDir (line 31) | func osDependentRunDir() (string, error) {

FILE: internal/locker/runtime_windows.go
  function osDependentRunDir (line 30) | func osDependentRunDir() (string, error) {

FILE: internal/memnet/conn.go
  function DialEndpoint (line 26) | func DialEndpoint(ctx context.Context, endpoint string) (net.Conn, error) {
  function Dial (line 36) | func Dial(ctx context.Context, network, addr string) (net.Conn, error) {

FILE: internal/memnet/conn_unix.go
  constant maxUnixSocketPathSize (line 28) | maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)
  function dialNamedPipe (line 30) | func dialNamedPipe(_ context.Context, _ string) (net.Conn, error) {
  function validateSocketPath (line 34) | func validateSocketPath(addr string) error {

FILE: internal/memnet/conn_windows.go
  function dialNamedPipe (line 26) | func dialNamedPipe(ctx context.Context, addr string) (net.Conn, error) {
  function validateSocketPath (line 30) | func validateSocketPath(addr string) error {

FILE: internal/oci/push.go
  constant ComposeProjectArtifactType (line 42) | ComposeProjectArtifactType = "application/vnd.docker.compose.project"
  constant ComposeYAMLMediaType (line 45) | ComposeYAMLMediaType = "application/vnd.docker.compose.file+yaml"
  constant ComposeEmptyConfigMediaType (line 58) | ComposeEmptyConfigMediaType = "application/vnd.docker.compose.config.emp...
  constant ComposeEnvFileMediaType (line 60) | ComposeEnvFileMediaType = "application/vnd.docker.compose.envfile"
  function DescriptorForComposeFile (line 71) | func DescriptorForComposeFile(path string, content []byte) v1.Descriptor {
  function DescriptorForEnvFile (line 84) | func DescriptorForEnvFile(path string, content []byte) v1.Descriptor {
  function PushManifest (line 97) | func PushManifest(ctx context.Context, resolver remotes.Resolver, named ...
  function push (line 131) | func push(ctx context.Context, resolver remotes.Resolver, ref reference....
  function createAndPushManifest (line 140) | func createAndPushManifest(ctx context.Context, resolver remotes.Resolve...
  function isNonAuthClientError (line 154) | func isNonAuthClientError(statusCode int) bool {
  function generateManifest (line 162) | func generateManifest(layers []v1.Descriptor, ociCompat api.OCIVersion) ...

FILE: internal/oci/resolver.go
  function NewResolver (line 39) | func NewResolver(config *configfile.ConfigFile, insecureRegistries ...st...
  function Get (line 64) | func Get(ctx context.Context, resolver remotes.Resolver, ref reference.N...
  function Copy (line 85) | func Copy(ctx context.Context, resolver remotes.Resolver, image referenc...
  function Push (line 117) | func Push(ctx context.Context, resolver remotes.Resolver, ref reference....

FILE: internal/paths/paths.go
  function IsChild (line 25) | func IsChild(dir string, file string) bool {
  function EncompassingPaths (line 84) | func EncompassingPaths(paths []string) []string {

FILE: internal/registry/registry.go
  constant DefaultNamespace (line 21) | DefaultNamespace = "docker.io"
  constant DefaultRegistryHost (line 28) | DefaultRegistryHost = "registry-1.docker.io"
  constant IndexHostname (line 30) | IndexHostname = "index.docker.io"
  constant IndexServer (line 32) | IndexServer = "https://" + IndexHostname + "/v1/"
  constant IndexName (line 34) | IndexName = "docker.io"
  function GetAuthConfigKey (line 39) | func GetAuthConfigKey(indexName string) string {

FILE: internal/sync/shared.go
  type PathMapping (line 22) | type PathMapping struct
  type Syncer (line 38) | type Syncer interface

FILE: internal/sync/tar.go
  type archiveEntry (line 39) | type archiveEntry struct
  type LowLevelClient (line 45) | type LowLevelClient interface
  type Tar (line 52) | type Tar struct
    method Sync (line 67) | func (t *Tar) Sync(ctx context.Context, service string, paths []*PathM...
  function NewTar (line 60) | func NewTar(projectName string, client LowLevelClient) *Tar {
  type ArchiveBuilder (line 121) | type ArchiveBuilder struct
    method Close (line 135) | func (a *ArchiveBuilder) Close() error {
    method ArchivePathsIfExist (line 140) | func (a *ArchiveBuilder) ArchivePathsIfExist(paths []PathMapping) error {
    method writeEntry (line 171) | func (a *ArchiveBuilder) writeEntry(entry archiveEntry) error {
    method entriesForPath (line 248) | func (a *ArchiveBuilder) entriesForPath(localPath, containerPath strin...
  function NewArchiveBuilder (line 127) | func NewArchiveBuilder(writer io.Writer) *ArchiveBuilder {
  function tarArchive (line 319) | func tarArchive(ops []PathMapping) io.ReadCloser {
  function dedupeEntries (line 340) | func dedupeEntries(entries []archiveEntry) []archiveEntry {

FILE: internal/tracing/attributes.go
  type SpanOptions (line 35) | type SpanOptions
    method SpanStartOptions (line 45) | func (s SpanOptions) SpanStartOptions() []trace.SpanStartOption {
    method EventOptions (line 53) | func (s SpanOptions) EventOptions() []trace.EventOption {
  type MetricsKey (line 37) | type MetricsKey struct
  type Metrics (line 39) | type Metrics struct
  function ProjectOptions (line 66) | func ProjectOptions(ctx context.Context, proj *types.Project) SpanOptions {
  function ServiceOptions (line 110) | func ServiceOptions(service types.ServiceConfig) SpanOptions {
  function ContainerOptions (line 146) | func ContainerOptions(ctr container.Summary) SpanOptions {
  function keys (line 162) | func keys[T any](m map[string]T) []string {
  function timeAttr (line 170) | func timeAttr(key string, value time.Time) attribute.KeyValue {
  function unixTimeAttr (line 174) | func unixTimeAttr(key string, value int64) attribute.KeyValue {
  function projectHash (line 179) | func projectHash(p *types.Project) (string, bool) {

FILE: internal/tracing/attributes_test.go
  function TestProjectHash (line 26) | func TestProjectHash(t *testing.T) {

FILE: internal/tracing/docker_context.go
  constant otelConfigFieldName (line 33) | otelConfigFieldName = "otel"
  function traceClientFromDockerContext (line 37) | func traceClientFromDockerContext(dockerCli command.Cli, otelEnv envMap)...
  function ConfigFromDockerContext (line 81) | func ConfigFromDockerContext(st store.Store, name string) (OTLPConfig, e...
  function valueOrDefault (line 118) | func valueOrDefault[T any](m map[string]any, key string) T {

FILE: internal/tracing/errors.go
  type skipErrors (line 24) | type skipErrors struct
    method Handle (line 27) | func (skipErrors) Handle(_ error) {}

FILE: internal/tracing/keyboard_metrics.go
  function KeyboardMetrics (line 25) | func KeyboardMetrics(ctx context.Context, enabled, isDockerDesktopActive...

FILE: internal/tracing/mux.go
  type MuxExporter (line 27) | type MuxExporter struct
    method ExportSpans (line 31) | func (m MuxExporter) ExportSpans(ctx context.Context, spans []sdktrace...
    method Shutdown (line 51) | func (m MuxExporter) Shutdown(ctx context.Context) error {

FILE: internal/tracing/tracing.go
  function init (line 41) | func init() {
  type OTLPConfig (line 52) | type OTLPConfig struct
  type ShutdownFunc (line 57) | type ShutdownFunc
  type envMap (line 60) | type envMap
  function InitTracing (line 62) | func InitTracing(dockerCli command.Cli) (ShutdownFunc, error) {
  function InitProvider (line 68) | func InitProvider(dockerCli command.Cli) (ShutdownFunc, error) {
  function traceClientFromEnv (line 123) | func traceClientFromEnv() (otlptrace.Client, envMap) {

FILE: internal/tracing/tracing_test.go
  function TestExtractOtelFromContext (line 35) | func TestExtractOtelFromContext(t *testing.T) {

FILE: internal/tracing/wrap.go
  function SpanWrapFunc (line 38) | func SpanWrapFunc(spanName string, opts SpanOptions, fn func(ctx context...
  function SpanWrapFuncForErrGroup (line 61) | func SpanWrapFuncForErrGroup(ctx context.Context, spanName string, opts ...
  function EventWrapFuncForErrGroup (line 80) | func EventWrapFuncForErrGroup(ctx context.Context, eventName string, opt...
  function AddAttributeToSpan (line 95) | func AddAttributeToSpan(ctx context.Context, attr ...attribute.KeyValue) {

FILE: pkg/api/api.go
  type LoadListener (line 41) | type LoadListener
  type ProjectLoadOptions (line 44) | type ProjectLoadOptions struct
  type OCIOptions (line 77) | type OCIOptions struct
  type Compose (line 83) | type Compose interface
  type VolumesOptions (line 154) | type VolumesOptions struct
  type ScaleOptions (line 160) | type ScaleOptions struct
  type WaitOptions (line 164) | type WaitOptions struct
  type VizOptions (line 171) | type VizOptions struct
  constant WatchLogger (line 183) | WatchLogger = "#watch"
  type WatchOptions (line 186) | type WatchOptions struct
  type BuildOptions (line 194) | type BuildOptions struct
    method Apply (line 232) | func (o BuildOptions) Apply(project *types.Project) error {
  type CreateOptions (line 263) | type CreateOptions struct
  type StartOptions (line 284) | type StartOptions struct
  type Cascade (line 304) | type Cascade
  constant CascadeIgnore (line 307) | CascadeIgnore Cascade = iota
  constant CascadeStop (line 308) | CascadeStop   Cascade = iota
  constant CascadeFail (line 309) | CascadeFail   Cascade = iota
  type RestartOptions (line 313) | type RestartOptions struct
  type StopOptions (line 325) | type StopOptions struct
  type UpOptions (line 335) | type UpOptions struct
  type DownOptions (line 341) | type DownOptions struct
  type ConfigOptions (line 357) | type ConfigOptions struct
  type PushOptions (line 367) | type PushOptions struct
  type PullOptions (line 374) | type PullOptions struct
  type ImagesOptions (line 381) | type ImagesOptions struct
  type KillOptions (line 386) | type KillOptions struct
  type RemoveOptions (line 400) | type RemoveOptions struct
  type RunOptions (line 414) | type RunOptions struct
  type AttachOptions (line 440) | type AttachOptions struct
  type EventsOptions (line 450) | type EventsOptions struct
  type Event (line 458) | type Event struct
    method String (line 499) | func (e Event) String() string {
  type PortOptions (line 467) | type PortOptions struct
  type OCIVersion (line 482) | type OCIVersion
  constant OCIVersion1_0 (line 485) | OCIVersion1_0 OCIVersion = "1.0"
  constant OCIVersion1_1 (line 486) | OCIVersion1_1 OCIVersion = "1.1"
  type PublishOptions (line 490) | type PublishOptions struct
  type ListOptions (line 509) | type ListOptions struct
  type PsOptions (line 514) | type PsOptions struct
  type CopyOptions (line 521) | type CopyOptions struct
  type PortPublisher (line 531) | type PortPublisher struct
  type ContainerSummary (line 539) | type ContainerSummary struct
  type PortPublishers (line 562) | type PortPublishers
    method Len (line 565) | func (p PortPublishers) Len() int {
    method Less (line 570) | func (p PortPublishers) Less(i, j int) bool {
    method Swap (line 586) | func (p PortPublishers) Swap(i, j int) {
  type ContainerProcSummary (line 591) | type ContainerProcSummary struct
  type ImageSummary (line 601) | type ImageSummary struct
  type ServiceStatus (line 612) | type ServiceStatus struct
  type LogOptions (line 622) | type LogOptions struct
  type PauseOptions (line 634) | type PauseOptions struct
  type ExportOptions (line 642) | type ExportOptions struct
  type CommitOptions (line 649) | type CommitOptions struct
  type GenerateOptions (line 661) | type GenerateOptions struct
  constant STARTING (line 670) | STARTING string = "Starting"
  constant RUNNING (line 672) | RUNNING string = "Running"
  constant UPDATING (line 674) | UPDATING string = "Updating"
  constant REMOVING (line 676) | REMOVING string = "Removing"
  constant UNKNOWN (line 678) | UNKNOWN string = "Unknown"
  constant FAILED (line 680) | FAILED string = "Failed"
  constant RecreateDiverged (line 685) | RecreateDiverged = "diverged"
  constant RecreateForce (line 687) | RecreateForce = "force"
  constant RecreateNever (line 689) | RecreateNever = "never"
  type Stack (line 693) | type Stack struct
  type LogConsumer (line 702) | type LogConsumer interface
  type ContainerEventListener (line 709) | type ContainerEventListener
  type ContainerEvent (line 712) | type ContainerEvent struct
  constant ContainerEventLog (line 731) | ContainerEventLog = iota
  constant ContainerEventErr (line 733) | ContainerEventErr
  constant ContainerEventStarted (line 735) | ContainerEventStarted
  constant ContainerEventRestarted (line 737) | ContainerEventRestarted
  constant ContainerEventStopped (line 739) | ContainerEventStopped
  constant ContainerEventCreated (line 741) | ContainerEventCreated
  constant ContainerEventRecreated (line 743) | ContainerEventRecreated
  constant ContainerEventExited (line 745) | ContainerEventExited
  constant HookEventLog (line 747) | HookEventLog
  function GetImageNameOrDefault (line 754) | func GetImageNameOrDefault(service types.ServiceConfig, projectName stri...

FILE: pkg/api/api_test.go
  function TestRunOptionsEnvironmentMap (line 26) | func TestRunOptionsEnvironmentMap(t *testing.T) {

FILE: pkg/api/context.go
  type ContextInfo (line 20) | type ContextInfo interface

FILE: pkg/api/env.go
  constant ComposeCompatibility (line 20) | ComposeCompatibility = "COMPOSE_COMPATIBILITY"

FILE: pkg/api/errors.go
  constant ExitCodeLoginRequired (line 26) | ExitCodeLoginRequired = 5
  function IsNotFoundError (line 51) | func IsNotFoundError(err error) bool {
  function IsAlreadyExistsError (line 56) | func IsAlreadyExistsError(err error) bool {
  function IsForbiddenError (line 61) | func IsForbiddenError(err error) bool {
  function IsUnknownError (line 66) | func IsUnknownError(err error) bool {
  function IsErrUnsupportedFlag (line 71) | func IsErrUnsupportedFlag(err error) bool {
  function IsErrNotImplemented (line 76) | func IsErrNotImplemented(err error) bool {
  function IsErrParsingFailed (line 81) | func IsErrParsingFailed(err error) bool {
  function IsErrCanceled (line 86) | func IsErrCanceled(err error) bool {

FILE: pkg/api/errors_test.go
  function TestIsNotFound (line 27) | func TestIsNotFound(t *testing.T) {
  function TestIsAlreadyExists (line 34) | func TestIsAlreadyExists(t *testing.T) {
  function TestIsForbidden (line 41) | func TestIsForbidden(t *testing.T) {
  function TestIsUnknown (line 48) | func TestIsUnknown(t *testing.T) {

FILE: pkg/api/event.go
  type EventStatus (line 24) | type EventStatus
  constant Working (line 28) | Working EventStatus = iota
  constant Done (line 30) | Done
  constant Warning (line 32) | Warning
  constant Error (line 34) | Error
  constant ResourceCompose (line 38) | ResourceCompose = "Compose"
  constant StatusError (line 41) | StatusError            = "Error"
  constant StatusCreating (line 42) | StatusCreating         = "Creating"
  constant StatusStarting (line 43) | StatusStarting         = "Starting"
  constant StatusStarted (line 44) | StatusStarted          = "Started"
  constant StatusWaiting (line 45) | StatusWaiting          = "Waiting"
  constant StatusHealthy (line 46) | StatusHealthy          = "Healthy"
  constant StatusExited (line 47) | StatusExited           = "Exited"
  constant StatusRestarting (line 48) | StatusRestarting       = "Restarting"
  constant StatusRestarted (line 49) | StatusRestarted        = "Restarted"
  constant StatusRunning (line 50) | StatusRunning          = "Running"
  constant StatusCreated (line 51) | StatusCreated          = "Created"
  constant StatusStopping (line 52) | StatusStopping         = "Stopping"
  constant StatusStopped (line 53) | StatusStopped          = "Stopped"
  constant StatusKilling (line 54) | StatusKilling          = "Killing"
  constant StatusKilled (line 55) | StatusKilled           = "Killed"
  constant StatusRemoving (line 56) | StatusRemoving         = "Removing"
  constant StatusRemoved (line 57) | StatusRemoved          = "Removed"
  constant StatusBuilding (line 58) | StatusBuilding         = "Building"
  constant StatusBuilt (line 59) | StatusBuilt            = "Built"
  constant StatusPulling (line 60) | StatusPulling          = "Pulling"
  constant StatusPulled (line 61) | StatusPulled           = "Pulled"
  constant StatusCommitting (line 62) | StatusCommitting       = "Committing"
  constant StatusCommitted (line 63) | StatusCommitted        = "Committed"
  constant StatusCopying (line 64) | StatusCopying          = "Copying"
  constant StatusCopied (line 65) | StatusCopied           = "Copied"
  constant StatusExporting (line 66) | StatusExporting        = "Exporting"
  constant StatusExported (line 67) | StatusExported         = "Exported"
  constant StatusDownloading (line 68) | StatusDownloading      = "Downloading"
  constant StatusDownloadComplete (line 69) | StatusDownloadComplete = "Download complete"
  constant StatusConfiguring (line 70) | StatusConfiguring      = "Configuring"
  constant StatusConfigured (line 71) | StatusConfigured       = "Configured"
  type Resource (line 75) | type Resource struct
    method StatusText (line 86) | func (e *Resource) StatusText() string {
  type EventProcessor (line 100) | type EventProcessor interface

FILE: pkg/api/labels.go
  constant ProjectLabel (line 27) | ProjectLabel = "com.docker.compose.project"
  constant ServiceLabel (line 29) | ServiceLabel = "com.docker.compose.service"
  constant ConfigHashLabel (line 31) | ConfigHashLabel = "com.docker.compose.config-hash"
  constant ContainerNumberLabel (line 33) | ContainerNumberLabel = "com.docker.compose.container-number"
  constant VolumeLabel (line 35) | VolumeLabel = "com.docker.compose.volume"
  constant NetworkLabel (line 37) | NetworkLabel = "com.docker.compose.network"
  constant WorkingDirLabel (line 39) | WorkingDirLabel = "com.docker.compose.project.working_dir"
  constant ConfigFilesLabel (line 41) | ConfigFilesLabel = "com.docker.compose.project.config_files"
  constant EnvironmentFileLabel (line 43) | EnvironmentFileLabel = "com.docker.compose.project.environment_file"
  constant OneoffLabel (line 45) | OneoffLabel = "com.docker.compose.oneoff"
  constant SlugLabel (line 47) | SlugLabel = "com.docker.compose.slug"
  constant ImageDigestLabel (line 49) | ImageDigestLabel = "com.docker.compose.image"
  constant DependenciesLabel (line 51) | DependenciesLabel = "com.docker.compose.depends_on"
  constant VersionLabel (line 53) | VersionLabel = "com.docker.compose.version"
  constant ImageBuilderLabel (line 55) | ImageBuilderLabel = "com.docker.compose.image.builder"
  constant ContainerReplaceLabel (line 57) | ContainerReplaceLabel = "com.docker.compose.replace"
  function init (line 63) | func init() {

FILE: pkg/api/labels_test.go
  function TestComposeVersionInitialization (line 28) | func TestComposeVersionInitialization(t *testing.T) {

FILE: pkg/bridge/convert.go
  type ConvertOptions (line 45) | type ConvertOptions struct
  function Convert (line 51) | func Convert(ctx context.Context, dockerCli command.Cli, project *types....
  function convert (line 83) | func convert(ctx context.Context, dockerCli command.Cli, model map[strin...
  function LoadAdditionalResources (line 165) | func LoadAdditionalResources(ctx context.Context, dockerCLI command.Cli,...
  function loadFileObject (line 209) | func loadFileObject(conf types.FileObjectConfig) (types.FileObjectConfig...
  function inspectWithPull (line 225) | func inspectWithPull(ctx context.Context, dockerCli command.Cli, imageNa...

FILE: pkg/bridge/transformers.go
  constant TransformerLabel (line 32) | TransformerLabel        = "com.docker.compose.bridge"
  constant DefaultTransformerImage (line 33) | DefaultTransformerImage = "docker/compose-bridge-kubernetes"
  constant templatesPath (line 35) | templatesPath = "/templates"
  type CreateTransformerOptions (line 38) | type CreateTransformerOptions struct
  function CreateTransformer (line 43) | func CreateTransformer(ctx context.Context, dockerCli command.Cli, optio...
  function ListTransformers (line 116) | func ListTransformers(ctx context.Context, dockerCli command.Cli) ([]ima...

FILE: pkg/compose/apiSocket.go
  method useAPISocket (line 32) | func (s *composeService) useAPISocket(project *types.Project) (*types.Pr...

FILE: pkg/compose/api_versions.go
  constant apiVersion148 (line 29) | apiVersion148 = "1.48"
  constant apiVersion149 (line 40) | apiVersion149 = "1.49"
  constant dockerEngineV28 (line 47) | dockerEngineV28 = "v28"
  constant DockerEngineV28_1 (line 50) | DockerEngineV28_1 = "v28.1"
  constant buildxMinVersion (line 56) | buildxMinVersion = "0.17.0"

FILE: pkg/compose/attach.go
  method attach (line 36) | func (s *composeService) attach(ctx context.Context, project *types.Proj...
  method attachContainer (line 66) | func (s *composeService) attachContainer(ctx context.Context, container ...
  method doAttachContainer (line 72) | func (s *composeService) doAttachContainer(ctx context.Context, service,...
  method attachContainerStreams (line 105) | func (s *composeService) attachContainerStreams(ctx context.Context, con...
  method getContainerStreams (line 139) | func (s *composeService) getContainerStreams(ctx context.Context, contai...

FILE: pkg/compose/attach_service.go
  method Attach (line 28) | func (s *composeService) Attach(ctx context.Context, projectName string,...

FILE: pkg/compose/build.go
  method Build (line 35) | func (s *composeService) Build(ctx context.Context, project *types.Proje...
  method build (line 52) | func (s *composeService) build(ctx context.Context, project *types.Proje...
  method ensureImagesExists (line 110) | func (s *composeService) ensureImagesExists(ctx context.Context, project...
  function resolveImageVolumes (line 169) | func resolveImageVolumes(service *types.ServiceConfig, images map[string...
  method getLocalImagesDigests (line 192) | func (s *composeService) getLocalImagesDigests(ctx context.Context, proj...
  function resolveAndMergeBuildArgs (line 252) | func resolveAndMergeBuildArgs(proxyConfig map[string]string, project *ty...
  function getImageBuildLabels (line 269) | func getImageBuildLabels(project *types.Project, service types.ServiceCo...
  function addBuildDependencies (line 283) | func addBuildDependencies(services []string, project *types.Project) []s...

FILE: pkg/compose/build_bake.go
  function buildWithBake (line 54) | func buildWithBake(dockerCli command.Cli) (bool, error) {
  type bakeConfig (line 75) | type bakeConfig struct
  type bakeGroup (line 80) | type bakeGroup struct
  type bakeTarget (line 84) | type bakeTarget struct
  type bakeMetadata (line 111) | type bakeMetadata
  type buildStatus (line 113) | type buildStatus struct
  method doBuildBake (line 118) | func (s *composeService) doBuildBake(ctx context.Context, project *types...
  method getBuildxPlugin (line 413) | func (s *composeService) getBuildxPlugin() (*manager.Plugin, error) {
  function makeConsole (line 437) | func makeConsole(out io.Writer) io.Writer {
  type _console (line 446) | type _console struct
    method Read (line 450) | func (c _console) Read([]byte) (n int, err error) {
    method Close (line 454) | func (c _console) Close() error {
    method Fd (line 458) | func (c _console) Fd() uintptr {
    method Name (line 462) | func (c _console) Name() string {
  function toBakeExtraHosts (line 466) | func toBakeExtraHosts(hosts types.HostsList) map[string]string {
  function additionalContexts (line 474) | func additionalContexts(contexts types.Mapping, targets map[string]strin...
  function toBakeUlimits (line 485) | func toBakeUlimits(ulimits map[string]*types.UlimitsConfig) []string {
  function toBakeSSH (line 497) | func toBakeSSH(ssh types.SSHConfig) []string {
  function toBakeSecrets (line 505) | func toBakeSecrets(project *types.Project, secrets []types.ServiceSecret...
  function toBakeAttest (line 525) | func toBakeAttest(buildConfig types.BuildConfig) []string {
  function dockerFilePath (line 549) | func dockerFilePath(ctxName string, dockerfile string) string {
  method dryRunBake (line 567) | func (s composeService) dryRunBake(cfg bakeConfig) map[string]string {
  method displayDryRunBuildEvent (line 580) | func (s composeService) displayDryRunBuildEvent(name, dryRunUUID, tag st...

FILE: pkg/compose/build_classic.go
  method doBuildClassic (line 48) | func (s *composeService) doBuildClassic(ctx context.Context, project *ty...
  method doBuildImage (line 121) | func (s *composeService) doBuildImage(ctx context.Context, project *type...
  function imageBuildOptions (line 296) | func imageBuildOptions(proxyConfigs map[string]string, project *types.Pr...

FILE: pkg/compose/build_test.go
  function Test_addBuildDependencies (line 27) | func Test_addBuildDependencies(t *testing.T) {

FILE: pkg/compose/commit.go
  method Commit (line 29) | func (s *composeService) Commit(ctx context.Context, projectName string,...
  method commit (line 35) | func (s *composeService) commit(ctx context.Context, projectName string,...

FILE: pkg/compose/compose.go
  type Option (line 44) | type Option
  function NewComposeService (line 66) | func NewComposeService(dockerCli command.Cli, options ...Option) (api.Co...
  function WithStreams (line 98) | func WithStreams(out, err io.Writer, in io.Reader) Option {
  function WithOutputStream (line 108) | func WithOutputStream(out io.Writer) Option {
  function WithErrorStream (line 116) | func WithErrorStream(err io.Writer) Option {
  function WithInputStream (line 124) | func WithInputStream(in io.Reader) Option {
  function WithContextInfo (line 132) | func WithContextInfo(info api.ContextInfo) Option {
  function WithProxyConfig (line 140) | func WithProxyConfig(config map[string]string) Option {
  function WithPrompt (line 148) | func WithPrompt(prompt Prompt) Option {
  function WithMaxConcurrency (line 156) | func WithMaxConcurrency(maxConcurrency int) Option {
  function WithDryRun (line 164) | func WithDryRun(s *composeService) error {
  type Prompt (line 183) | type Prompt
  function AlwaysOkPrompt (line 186) | func AlwaysOkPrompt() Prompt {
  function WithEventProcessor (line 194) | func WithEventProcessor(bus api.EventProcessor) Option {
  type composeService (line 201) | type composeService struct
    method Close (line 224) | func (s *composeService) Close() error {
    method apiClient (line 232) | func (s *composeService) apiClient() client.APIClient {
    method configFile (line 236) | func (s *composeService) configFile() *configfile.ConfigFile {
    method getContextInfo (line 241) | func (s *composeService) getContextInfo() api.ContextInfo {
    method getProxyConfig (line 249) | func (s *composeService) getProxyConfig() map[string]string {
    method stdout (line 256) | func (s *composeService) stdout() *streams.Out {
    method stdin (line 260) | func (s *composeService) stdin() *streams.In {
    method stderr (line 264) | func (s *composeService) stderr() *streams.Out {
    method wrapDockerCliWithStreams (line 282) | func (s *composeService) wrapDockerCliWithStreams(baseCli command.Cli)...
    method projectFromName (line 357) | func (s *composeService) projectFromName(containers Containers, projec...
    method actualVolumes (line 433) | func (s *composeService) actualVolumes(ctx context.Context, projectNam...
    method actualNetworks (line 453) | func (s *composeService) actualNetworks(ctx context.Context, projectNa...
    method isSwarmEnabled (line 478) | func (s *composeService) isSwarmEnabled(ctx context.Context) (bool, er...
    method RuntimeVersion (line 502) | func (s *composeService) RuntimeVersion(ctx context.Context) (string, ...
  type readCloserAdapter (line 269) | type readCloserAdapter struct
    method Read (line 273) | func (r *readCloserAdapter) Read(p []byte) (int, error) {
    method Close (line 277) | func (r *readCloserAdapter) Close() error {
  type streamOverrideWrapper (line 302) | type streamOverrideWrapper struct
    method Out (line 309) | func (w *streamOverrideWrapper) Out() *streams.Out {
    method Err (line 316) | func (w *streamOverrideWrapper) Err() *streams.Out {
    method In (line 323) | func (w *streamOverrideWrapper) In() *streams.In {
  function getCanonicalContainerName (line 330) | func getCanonicalContainerName(c container.Summary) string {
  function getContainerNameWithoutProject (line 345) | func getContainerNameWithoutProject(c container.Summary) string {
  function increment (line 425) | func increment(scale *int) *int {
  type runtimeVersionCache (line 494) | type runtimeVersionCache struct

FILE: pkg/compose/container.go
  type ContainerStdout (line 28) | type ContainerStdout struct
    method Read (line 33) | func (l ContainerStdout) Read(p []byte) (n int, err error) {
    method Close (line 38) | func (l ContainerStdout) Close() error {
  type ContainerStdin (line 46) | type ContainerStdin struct
    method Write (line 51) | func (c ContainerStdin) Write(p []byte) (n int, err error) {
    method Close (line 56) | func (c ContainerStdin) Close() error {

FILE: pkg/compose/containers.go
  type Containers (line 34) | type Containers
    method filter (line 151) | func (containers Containers) filter(predicates ...containerPredicate) ...
    method names (line 161) | func (containers Containers) names() []string {
    method forEach (line 169) | func (containers Containers) forEach(fn func(container.Summary)) {
    method sorted (line 175) | func (containers Containers) sorted() Containers {
  type oneOff (line 36) | type oneOff
  constant oneOffInclude (line 39) | oneOffInclude = oneOff(iota)
  constant oneOffExclude (line 40) | oneOffExclude
  constant oneOffOnly (line 41) | oneOffOnly
  method getContainers (line 44) | func (s *composeService) getContainers(ctx context.Context, project stri...
  function getDefaultFilters (line 59) | func getDefaultFilters(projectName string, oneOff oneOff, selectedServic...
  method getSpecifiedContainer (line 75) | func (s *composeService) getSpecifiedContainer(ctx context.Context, proj...
  type containerPredicate (line 112) | type containerPredicate
  function matches (line 114) | func matches(c container.Summary, predicates ...containerPredicate) bool {
  function isService (line 123) | func isService(services ...string) containerPredicate {
  function isOrphaned (line 131) | func isOrphaned(project *types.Project) containerPredicate {
  function isNotOneOff (line 145) | func isNotOneOff(c container.Summary) bool {

FILE: pkg/compose/convergence.go
  constant doubledContainerNameWarning (line 48) | doubledContainerNameWarning = "WARNING: The %q service is using the cust...
  type convergence (line 58) | type convergence struct
    method getObservedState (line 66) | func (c *convergence) getObservedState(serviceName string) Containers {
    method setObservedState (line 72) | func (c *convergence) setObservedState(serviceName string, containers ...
    method apply (line 95) | func (c *convergence) apply(ctx context.Context, project *types.Projec...
    method ensureService (line 112) | func (c *convergence) ensureService(ctx context.Context, project *type...
    method stopDependentContainers (line 227) | func (c *convergence) stopDependentContainers(ctx context.Context, pro...
    method resolveServiceReferences (line 265) | func (c *convergence) resolveServiceReferences(service *types.ServiceC...
    method resolveVolumeFrom (line 278) | func (c *convergence) resolveVolumeFrom(service *types.ServiceConfig) ...
    method resolveSharedNamespaces (line 298) | func (c *convergence) resolveSharedNamespaces(service *types.ServiceCo...
    method mustRecreate (line 329) | func (c *convergence) mustRecreate(expected types.ServiceConfig, actua...
  function newConvergence (line 78) | func newConvergence(services []string, state Containers, networks map[st...
  function getScale (line 254) | func getScale(config types.ServiceConfig) (int, error) {
  function checkExpectedNetworks (line 361) | func checkExpectedNetworks(expected types.ServiceConfig, actual containe...
  function checkExpectedVolumes (line 384) | func checkExpectedVolumes(expected types.ServiceConfig, actual container...
  function getContainerName (line 412) | func getContainerName(projectName string, service types.ServiceConfig, n...
  function getDefaultContainerName (line 420) | func getDefaultContainerName(projectName, serviceName, index string) str...
  function getContainerProgressName (line 424) | func getContainerProgressName(ctr container.Summary) string {
  function containerEvents (line 428) | func containerEvents(containers Containers, eventFunc func(string) api.R...
  function containerReasonEvents (line 436) | func containerReasonEvents(containers Containers, eventFunc func(string,...
  constant ServiceConditionRunningOrHealthy (line 445) | ServiceConditionRunningOrHealthy = "running_or_healthy"
  method waitDependencies (line 448) | func (s *composeService) waitDependencies(ctx context.Context, project *...
  function shouldWaitForDependency (line 555) | func shouldWaitForDependency(serviceName string, dependencyConfig types....
  function nextContainerNumber (line 578) | func nextContainerNumber(containers []container.Summary) int {
  method createContainer (line 597) | func (s *composeService) createContainer(ctx context.Context, project *t...
  method recreateContainer (line 617) | func (s *composeService) recreateContainer(ctx context.Context, project ...
  method startContainer (line 684) | func (s *composeService) startContainer(ctx context.Context, ctr contain...
  method createMobyContainer (line 696) | func (s *composeService) createMobyContainer(ctx context.Context, projec...
  method getLinks (line 752) | func (s *composeService) getLinks(ctx context.Context, projectName strin...
  method isServiceHealthy (line 806) | func (s *composeService) isServiceHealthy(ctx context.Context, container...
  method isServiceCompleted (line 842) | func (s *composeService) isServiceCompleted(ctx context.Context, contain...
  method startService (line 855) | func (s *composeService) startService(ctx context.Context,
  function mergeLabels (line 910) | func mergeLabels(ls ...types.Labels) types.Labels {

FILE: pkg/compose/convergence_test.go
  function TestContainerName (line 39) | func TestContainerName(t *testing.T) {
  function intPtr (line 60) | func intPtr(i int) *int {
  function TestServiceLinks (line 64) | func TestServiceLinks(t *testing.T) {
  function TestWaitDependencies (line 222) | func TestWaitDependencies(t *testing.T) {
  function TestIsServiceHealthy (line 260) | func TestIsServiceHealthy(t *testing.T) {
  function TestCreateMobyContainer (line 402) | func TestCreateMobyContainer(t *testing.T) {

FILE: pkg/compose/convert.go
  function ToMobyEnv (line 30) | func ToMobyEnv(environment compose.MappingWithEquals) []string {
  method ToMobyHealthCheck (line 43) | func (s *composeService) ToMobyHealthCheck(ctx context.Context, check *c...
  function ToSeconds (line 88) | func ToSeconds(d *compose.Duration) *int {

FILE: pkg/compose/cp.go
  type copyDirection (line 37) | type copyDirection
  constant fromService (line 40) | fromService copyDirection = 1 << iota
  constant toService (line 41) | toService
  constant acrossServices (line 42) | acrossServices = fromService | toService
  method Copy (line 45) | func (s *composeService) Copy(ctx context.Context, projectName string, o...
  method copy (line 51) | func (s *composeService) copy(ctx context.Context, projectName string, o...
  method listContainersTargetedForCopy (line 115) | func (s *composeService) listContainersTargetedForCopy(ctx context.Conte...
  method copyToContainer (line 145) | func (s *composeService) copyToContainer(ctx context.Context, containerI...
  method copyFromContainer (line 256) | func (s *composeService) copyFromContainer(ctx context.Context, containe...
  function isAbs (line 332) | func isAbs(path string) bool {
  function splitCpArg (line 336) | func splitCpArg(arg string) (ctr, path string) {
  function resolveLocalPath (line 353) | func resolveLocalPath(localPath string) (absPath string, err error) {

FILE: pkg/compose/create.go
  type createOptions (line 48) | type createOptions struct
  type createConfigs (line 55) | type createConfigs struct
  method Create (line 62) | func (s *composeService) Create(ctx context.Context, project *types.Proj...
  method create (line 68) | func (s *composeService) create(ctx context.Context, project *types.Proj...
  function prepareNetworks (line 129) | func prepareNetworks(project *types.Project) {
  method ensureNetworks (line 139) | func (s *composeService) ensureNetworks(ctx context.Context, project *ty...
  method ensureProjectVolumes (line 152) | func (s *composeService) ensureProjectVolumes(ctx context.Context, proje...
  method getCreateConfigs (line 169) | func (s *composeService) getCreateConfigs(ctx context.Context,
  method prepareContainerMACAddress (line 349) | func (s *composeService) prepareContainerMACAddress(service types.Servic...
  function getAliases (line 371) | func getAliases(project *types.Project, service types.ServiceConfig, ser...
  function createEndpointSettings (line 382) | func createEndpointSettings(p *types.Project, service types.ServiceConfi...
  function parseSecurityOpts (line 461) | func parseSecurityOpts(p *types.Project, securityOpts []string) ([]strin...
  method prepareLabels (line 497) | func (s *composeService) prepareLabels(labels types.Labels, service type...
  function defaultNetworkSettings (line 518) | func defaultNetworkSettings(project *types.Project,
  function getRestartPolicy (line 585) | func getRestartPolicy(service types.ServiceConfig) container.RestartPoli...
  function mapRestartPolicyCondition (line 612) | func mapRestartPolicyCondition(condition string) container.RestartPolicy...
  function getDeployResources (line 628) | func getDeployResources(s types.ServiceConfig) container.Resources {
  function toUlimits (line 701) | func toUlimits(m map[string]*types.UlimitsConfig) []*container.Ulimit {
  function setReservations (line 721) | func setReservations(reservations *types.Resource, resources *container....
  function setLimits (line 742) | func setLimits(limits *types.Resource, resources *container.Resources) {
  function setBlkio (line 757) | func setBlkio(blkio *types.BlkioConfig, resources *container.Resources) {
  function buildContainerPorts (line 794) | func buildContainerPorts(s types.ServiceConfig) (network.PortSet, error) {
  function buildContainerPortBindingOptions (line 822) | func buildContainerPortBindingOptions(s types.ServiceConfig) (network.Po...
  function getDependentServiceFromMode (line 845) | func getDependentServiceFromMode(mode string) string {
  method buildContainerVolumes (line 855) | func (s *composeService) buildContainerVolumes(
  function toBindString (line 913) | func toBindString(name string, v *types.ServiceVolumeConfig) string {
  function findVolumeByName (line 931) | func findVolumeByName(volumes types.Volumes, name string) *types.VolumeC...
  function findVolumeByTarget (line 940) | func findVolumeByTarget(volumes []types.ServiceVolumeConfig, target stri...
  function bindRequiresMountAPI (line 951) | func bindRequiresMountAPI(bind *types.ServiceVolumeBind) bool {
  function volumeRequiresMountAPI (line 968) | func volumeRequiresMountAPI(vol *types.ServiceVolumeVolume) bool {
  method buildContainerMountOptions (line 983) | func (s *composeService) buildContainerMountOptions(ctx context.Context,...
  function fillBindMounts (line 1041) | func fillBindMounts(p types.Project, s types.ServiceConfig, m map[string...
  function buildContainerConfigMounts (line 1074) | func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ...
  function buildContainerSecretMounts (line 1124) | func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ...
  function isAbsTarget (line 1181) | func isAbsTarget(p string) bool {
  function isUnixAbs (line 1185) | func isUnixAbs(p string) bool {
  function isWindowsAbs (line 1189) | func isWindowsAbs(p string) bool {
  function buildMount (line 1193) | func buildMount(project types.Project, volume types.ServiceVolumeConfig)...
  function buildMountOptions (line 1233) | func buildMountOptions(volume types.ServiceVolumeConfig) (*mount.BindOpt...
  function buildBindOption (line 1260) | func buildBindOption(bind *types.ServiceVolumeBind) *mount.BindOptions {
  function buildVolumeOptions (line 1279) | func buildVolumeOptions(vol *types.ServiceVolumeVolume) *mount.VolumeOpt...
  function buildTmpfsOptions (line 1291) | func buildTmpfsOptions(tmpfs *types.ServiceVolumeTmpfs) *mount.TmpfsOpti...
  function buildImageOptions (line 1301) | func buildImageOptions(image *types.ServiceVolumeImage) *mount.ImageOpti...
  method ensureNetwork (line 1310) | func (s *composeService) ensureNetwork(ctx context.Context, project *typ...
  method resolveOrCreateNetwork (line 1324) | func (s *composeService) resolveOrCreateNetwork(ctx context.Context, pro...
  method removeDivergedNetwork (line 1464) | func (s *composeService) removeDivergedNetwork(ctx context.Context, proj...
  method disconnectNetwork (line 1500) | func (s *composeService) disconnectNetwork(
  method connectNetwork (line 1518) | func (s *composeService) connectNetwork(
  method resolveExternalNetwork (line 1537) | func (s *composeService) resolveExternalNetwork(ctx context.Context, n *...
  method ensureVolume (line 1588) | func (s *composeService) ensureVolume(ctx context.Context, name string, ...
  method removeDivergedVolume (line 1636) | func (s *composeService) removeDivergedVolume(ctx context.Context, name ...
  method createVolume (line 1679) | func (s *composeService) createVolume(ctx context.Context, volume types....
  function parseIPAMPool (line 1701) | func parseIPAMPool(pool *types.IPAMPool) (network.IPAMConfig, error) {
  function parseMACAddr (line 1746) | func parseMACAddr(macAddress string) (network.HardwareAddr, error) {

FILE: pkg/compose/create_test.go
  function TestBuildBindMount (line 41) | func TestBuildBindMount(t *testing.T) {
  function TestBuildNamedPipeMount (line 56) | func TestBuildNamedPipeMount(t *testing.T) {
  function TestBuildVolumeMount (line 68) | func TestBuildVolumeMount(t *testing.T) {
  function TestServiceImageName (line 88) | func TestServiceImageName(t *testing.T) {
  function TestPrepareNetworkLabels (line 93) | func TestPrepareNetworkLabels(t *testing.T) {
  function TestBuildContainerMountOptions (line 106) | func TestBuildContainerMountOptions(t *testing.T) {
  function TestDefaultNetworkSettings (line 194) | func TestDefaultNetworkSettings(t *testing.T) {
  function TestCreateEndpointSettings (line 298) | func TestCreateEndpointSettings(t *testing.T) {
  function Test_buildContainerVolumes (line 344) | func Test_buildContainerVolumes(t *testing.T) {

FILE: pkg/compose/dependencies.go
  type ServiceStatus (line 33) | type ServiceStatus
  constant ServiceStopped (line 37) | ServiceStopped ServiceStatus = iota
  constant ServiceStarted (line 38) | ServiceStarted
  type graphTraversal (line 41) | type graphTraversal struct
    method visit (line 132) | func (t *graphTraversal) visit(ctx context.Context, g *Graph) error {
    method run (line 167) | func (t *graphTraversal) run(ctx context.Context, graph *Graph, eg *er...
    method consume (line 194) | func (t *graphTraversal) consume(nodeKey string) bool {
  function upDirectionTraversal (line 56) | func upDirectionTraversal(visitorFn func(context.Context, string) error)...
  function downDirectionTraversal (line 67) | func downDirectionTraversal(visitorFn func(context.Context, string) erro...
  function InDependencyOrder (line 79) | func InDependencyOrder(ctx context.Context, project *types.Project, fn f...
  function InReverseDependencyOrder (line 92) | func InReverseDependencyOrder(ctx context.Context, project *types.Projec...
  function WithRootNodesAndDown (line 104) | func WithRootNodesAndDown(nodes []string) func(*graphTraversal) {
  type Graph (line 208) | type Graph struct
    method AddVertex (line 308) | func (g *Graph) AddVertex(key string, service string, initialStatus Se...
    method AddEdge (line 317) | func (g *Graph) AddEdge(source string, destination string) error {
    method Leaves (line 347) | func (g *Graph) Leaves() []*Vertex {
    method Roots (line 366) | func (g *Graph) Roots() []*Vertex {
    method UpdateStatus (line 380) | func (g *Graph) UpdateStatus(key string, status ServiceStatus) {
    method FilterChildren (line 391) | func (g *Graph) FilterChildren(key string, status ServiceStatus) []*Ve...
    method FilterParents (line 412) | func (g *Graph) FilterParents(key string, status ServiceStatus) []*Ver...
    method HasCycles (line 429) | func (g *Graph) HasCycles() (bool, error) {
    method visit (line 449) | func (g *Graph) visit(key string, path []string, discovered []string, ...
  type Vertex (line 214) | type Vertex struct
    method GetParents (line 227) | func (v *Vertex) GetParents() []*Vertex {
    method GetChildren (line 250) | func (v *Vertex) GetChildren() []*Vertex {
  function getParents (line 222) | func getParents(v *Vertex) []*Vertex {
  function getChildren (line 235) | func getChildren(v *Vertex) []*Vertex {
  function getAncestors (line 240) | func getAncestors(v *Vertex) []*Vertex {
  function NewGraph (line 259) | func NewGraph(project *types.Project, initialStatus ServiceStatus) (*Gra...
  function NewVertex (line 297) | func NewVertex(key string, service string, initialStatus ServiceStatus) ...
  function leaves (line 342) | func leaves(g *Graph) []*Vertex {
  function roots (line 361) | func roots(g *Graph) []*Vertex {
  function filterChildren (line 386) | func filterChildren(g *Graph, k string, s ServiceStatus) []*Vertex {
  function filterParents (line 407) | func filterParents(g *Graph, k string, s ServiceStatus) []*Vertex {
  function remove (line 470) | func remove(slice []string, item string) []string {

FILE: pkg/compose/dependencies_test.go
  function createTestProject (line 34) | func createTestProject() *types.Project {
  function TestTraversalWithMultipleParents (line 56) | func TestTraversalWithMultipleParents(t *testing.T) {
  function TestInDependencyUpCommandOrder (line 98) | func TestInDependencyUpCommandOrder(t *testing.T) {
  function TestInDependencyReverseDownCommandOrder (line 108) | func TestInDependencyReverseDownCommandOrder(t *testing.T) {
  function TestBuildGraph (line 118) | func TestBuildGraph(t *testing.T) {
  function TestBuildGraphDependsOn (line 277) | func TestBuildGraphDependsOn(t *testing.T) {
  function isVertexEqual (line 327) | func isVertexEqual(a, b Vertex) bool {
  function TestWith_RootNodesAndUp (line 346) | func TestWith_RootNodesAndUp(t *testing.T) {

FILE: pkg/compose/desktop.go
  constant engineLabelDesktopAddress (line 29) | engineLabelDesktopAddress = "com.docker.desktop.address"
  method isDesktopIntegrationActive (line 31) | func (s *composeService) isDesktopIntegrationActive(ctx context.Context)...

FILE: pkg/compose/docker_cli_providers.go
  type dockerCliContextInfo (line 24) | type dockerCliContextInfo struct
    method CurrentContext (line 28) | func (c *dockerCliContextInfo) CurrentContext() string {
    method ServerOSType (line 32) | func (c *dockerCliContextInfo) ServerOSType() string {
    method BuildKitEnabled (line 36) | func (c *dockerCliContextInfo) BuildKitEnabled() (bool, error) {

FILE: pkg/compose/down.go
  type downOp (line 36) | type downOp
  method Down (line 38) | func (s *composeService) Down(ctx context.Context, projectName string, o...
  method down (line 44) | func (s *composeService) down(ctx context.Context, projectName string, o...
  function checkSelectedServices (line 127) | func checkSelectedServices(options api.DownOptions, project *types.Proje...
  method ensureVolumesDown (line 144) | func (s *composeService) ensureVolumesDown(ctx context.Context, project ...
  method ensureImagesDown (line 159) | func (s *composeService) ensureImagesDown(ctx context.Context, project *...
  method ensureNetworksDown (line 180) | func (s *composeService) ensureNetworksDown(ctx context.Context, project...
  method removeNetwork (line 196) | func (s *composeService) removeNetwork(ctx context.Context, composeNetwo...
  method removeImage (line 253) | func (s *composeService) removeImage(ctx context.Context, image string) ...
  method removeVolume (line 272) | func (s *composeService) removeVolume(ctx context.Context, id string) er...
  method stopContainer (line 300) | func (s *composeService) stopContainer(ctx context.Context, service *typ...
  method stopContainers (line 328) | func (s *composeService) stopContainers(ctx context.Context, serv *types...
  method removeContainers (line 338) | func (s *composeService) removeContainers(ctx context.Context, container...
  method stopAndRemoveContainer (line 348) | func (s *composeService) stopAndRemoveContainer(ctx context.Context, ctr...
  method getProjectWithResources (line 371) | func (s *composeService) getProjectWithResources(ctx context.Context, co...

FILE: pkg/compose/down_test.go
  function TestDown (line 40) | func TestDown(t *testing.T) {
  function TestDownWithGivenServices (line 98) | func TestDownWithGivenServices(t *testing.T) {
  function TestDownWithSpecifiedServiceButTheServicesAreNotRunning (line 147) | func TestDownWithSpecifiedServiceButTheServicesAreNotRunning(t *testing....
  function TestDownRemoveOrphans (line 184) | func TestDownRemoveOrphans(t *testing.T) {
  function TestDownRemoveVolumes (line 239) | func TestDownRemoveVolumes(t *testing.T) {
  function TestDownRemoveImages (line 273) | func TestDownRemoveImages(t *testing.T) {
  function TestDownRemoveImages_NoLabel (line 374) | func TestDownRemoveImages_NoLabel(t *testing.T) {
  function prepareMocks (line 416) | func prepareMocks(mockCtrl *gomock.Controller) (*mocks.MockAPIClient, *m...

FILE: pkg/compose/envresolver.go
  function envResolver (line 30) | func envResolver(environment map[string]string) func(string) (string, bo...
  function envResolverWithCase (line 37) | func envResolverWithCase(environment map[string]string, caseInsensitive ...

FILE: pkg/compose/envresolver_test.go
  function Test_EnvResolverWithCase (line 25) | func Test_EnvResolverWithCase(t *testing.T) {

FILE: pkg/compose/events.go
  method Events (line 30) | func (s *composeService) Events(ctx context.Context, projectName string,...

FILE: pkg/compose/exec.go
  method Exec (line 31) | func (s *composeService) Exec(ctx context.Context, projectName string, o...
  method getExecTarget (line 61) | func (s *composeService) getExecTarget(ctx context.Context, projectName ...

FILE: pkg/compose/export.go
  method Export (line 32) | func (s *composeService) Export(ctx context.Context, projectName string,...
  method export (line 38) | func (s *composeService) export(ctx context.Context, projectName string,...

FILE: pkg/compose/filters.go
  function projectFilter (line 27) | func projectFilter(projectName string) client.Filters {
  function serviceFilter (line 31) | func serviceFilter(serviceName string) string {
  function networkFilter (line 35) | func networkFilter(name string) string {
  function oneOffFilter (line 39) | func oneOffFilter(b bool) string {
  function containerNumberFilter (line 47) | func containerNumberFilter(index int) string {
  function hasConfigHashLabel (line 51) | func hasConfigHashLabel() string {

FILE: pkg/compose/generate.go
  method Generate (line 35) | func (s *composeService) Generate(ctx context.Context, options api.Gener...
  method createProjectFromContainers (line 68) | func (s *composeService) createProjectFromContainers(containers []contai...
  method extractComposeConfiguration (line 112) | func (s *composeService) extractComposeConfiguration(service *types.Serv...
  method toComposeHealthCheck (line 144) | func (s *composeService) toComposeHealthCheck(healthConfig *container.He...
  method toComposeVolumes (line 170) | func (s *composeService) toComposeVolumes(volumes []container.MountPoint...
  method toComposeNetwork (line 215) | func (s *composeService) toComposeNetwork(networks map[string]*network.E...
  function cleanDockerPreviousLabels (line 235) | func cleanDockerPreviousLabels(labels types.Labels) types.Labels {

FILE: pkg/compose/hash.go
  function ServiceHash (line 27) | func ServiceHash(o types.ServiceConfig) (string, error) {
  function NetworkHash (line 46) | func NetworkHash(o *types.NetworkConfig) (string, error) {
  function VolumeHash (line 55) | func VolumeHash(o types.VolumeConfig) (string, error) {

FILE: pkg/compose/hash_test.go
  function TestServiceHash (line 26) | func TestServiceHash(t *testing.T) {
  function serviceConfig (line 34) | func serviceConfig(replicas int) types.ServiceConfig {

FILE: pkg/compose/hook.go
  method runHook (line 34) | func (s composeService) runHook(ctx context.Context, ctr container.Summa...
  method runWaitExec (line 99) | func (s composeService) runWaitExec(ctx context.Context, execID string, ...

FILE: pkg/compose/hook_test.go
  function TestRunHook_ConsoleSize (line 40) | func TestRunHook_ConsoleSize(t *testing.T) {

FILE: pkg/compose/image_pruner.go
  type ImagePruneMode (line 37) | type ImagePruneMode
  constant ImagePruneNone (line 41) | ImagePruneNone ImagePruneMode = ""
  constant ImagePruneLocal (line 44) | ImagePruneLocal ImagePruneMode = "local"
  constant ImagePruneAll (line 47) | ImagePruneAll ImagePruneMode = "all"
  type ImagePruneOptions (line 51) | type ImagePruneOptions struct
  type ImagePruner (line 60) | type ImagePruner struct
    method ImagesToPrune (line 74) | func (p *ImagePruner) ImagesToPrune(ctx context.Context, opts ImagePru...
    method namedImages (line 135) | func (p *ImagePruner) namedImages(ctx context.Context) ([]string, erro...
    method labeledLocalImages (line 151) | func (p *ImagePruner) labeledLocalImages(ctx context.Context) ([]image...
    method unlabeledLocalImages (line 174) | func (p *ImagePruner) unlabeledLocalImages(ctx context.Context) ([]str...
    method filterImagesByExistence (line 194) | func (p *ImagePruner) filterImagesByExistence(ctx context.Context, ima...
  function NewImagePruner (line 66) | func NewImagePruner(imageClient client.ImageAPIClient, project *types.Pr...
  function normalizeAndDedupeImages (line 222) | func normalizeAndDedupeImages(images []string) []string {

FILE: pkg/compose/images.go
  method Images (line 38) | func (s *composeService) Images(ctx context.Context, projectName string,...
  method getImageSummaries (line 126) | func (s *composeService) getImageSummaries(ctx context.Context, repoTags...

FILE: pkg/compose/images_test.go
  function TestImages (line 34) | func TestImages(t *testing.T) {
  function imageInspect (line 90) | func imageInspect(id string, imageReference string, size int64, created ...
  function containerDetail (line 102) | func containerDetail(service string, id string, status container.Contain...

FILE: pkg/compose/kill.go
  method Kill (line 30) | func (s *composeService) Kill(ctx context.Context, projectName string, o...
  method kill (line 36) | func (s *composeService) kill(ctx context.Context, projectName string, o...

FILE: pkg/compose/kill_test.go
  constant testProject (line 34) | testProject = "testProject"
  function TestKillAll (line 36) | func TestKillAll(t *testing.T) {
  function TestKillSignal (line 75) | func TestKillSignal(t *testing.T) {
  function testContainer (line 112) | func testContainer(service string, id string, oneOff bool) container.Sum...
  function containerLabels (line 125) | func containerLabels(service string, oneOff bool) map[string]string {
  function anyCancellableContext (line 140) | func anyCancellableContext() gomock.Matcher {
  function projectFilterListOpt (line 147) | func projectFilterListOpt(withOneOff bool) client.ContainerListOptions {

FILE: pkg/compose/loader.go
  method LoadProject (line 36) | func (s *composeService) LoadProject(ctx context.Context, options api.Pr...
  method createRemoteLoaders (line 71) | func (s *composeService) createRemoteLoaders(options api.ProjectLoadOpti...
  method buildProjectOptions (line 81) | func (s *composeService) buildProjectOptions(options api.ProjectLoadOpti...
  method postProcessProject (line 120) | func (s *composeService) postProcessProject(project *types.Project, opti...

FILE: pkg/compose/loader_test.go
  function TestLoadProject_Basic (line 31) | func TestLoadProject_Basic(t *testing.T) {
  function TestLoadProject_WithEnvironmentResolution (line 72) | func TestLoadProject_WithEnvironmentResolution(t *testing.T) {
  function TestLoadProject_ServiceSelection (line 122) | func TestLoadProject_ServiceSelection(t *testing.T) {
  function TestLoadProject_WithProfiles (line 153) | func TestLoadProject_WithProfiles(t *testing.T) {
  function TestLoadProject_WithLoadListeners (line 193) | func TestLoadProject_WithLoadListeners(t *testing.T) {
  function TestLoadProject_ProjectNameInference (line 226) | func TestLoadProject_ProjectNameInference(t *testing.T) {
  function TestLoadProject_Compatibility (line 261) | func TestLoadProject_Compatibility(t *testing.T) {
  function TestLoadProject_InvalidComposeFile (line 290) | func TestLoadProject_InvalidComposeFile(t *testing.T) {
  function TestLoadProject_MissingComposeFile (line 311) | func TestLoadProject_MissingComposeFile(t *testing.T) {

FILE: pkg/compose/logs.go
  method Logs (line 34) | func (s *composeService) Logs(
  method logContainer (line 116) | func (s *composeService) logContainer(ctx context.Context, consumer api....
  method doLogContainer (line 125) | func (s *composeService) doLogContainer(ctx context.Context, consumer ap...

FILE: pkg/compose/logs_test.go
  function TestComposeService_Logs_Demux (line 36) | func TestComposeService_Logs_Demux(t *testing.T) {
  function TestComposeService_Logs_ServiceFiltering (line 109) | func TestComposeService_Logs_ServiceFiltering(t *testing.T) {
  type testLogConsumer (line 174) | type testLogConsumer struct
    method Log (line 180) | func (l *testLogConsumer) Log(containerName, message string) {
    method Err (line 189) | func (l *testLogConsumer) Err(containerName, message string) {
    method Status (line 193) | func (l *testLogConsumer) Status(containerName, msg string) {}
    method LogsForContainer (line 195) | func (l *testLogConsumer) LogsForContainer(containerName string) []str...

FILE: pkg/compose/ls.go
  method List (line 33) | func (s *composeService) List(ctx context.Context, opts api.ListOptions)...
  function containersToStacks (line 45) | func containersToStacks(containers []container.Summary) ([]api.Stack, er...
  function combinedConfigFiles (line 68) | func combinedConfigFiles(containers []container.Summary) (string, error) {
  function containerToState (line 87) | func containerToState(containers []container.Summary) []string {
  function combinedStatus (line 95) | func combinedStatus(statuses []string) string {
  function groupContainerByLabel (line 118) | func groupContainerByLabel(containers []container.Summary, labelName str...

FILE: pkg/compose/ls_test.go
  function TestContainersToStacks (line 29) | func TestContainersToStacks(t *testing.T) {
  function TestStacksMixedStatus (line 65) | func TestStacksMixedStatus(t *testing.T) {
  function TestCombinedConfigFiles (line 71) | func TestCombinedConfigFiles(t *testing.T) {

FILE: pkg/compose/model.go
  method ensureModels (line 39) | func (s *composeService) ensureModels(ctx context.Context, project *type...
  type modelAPI (line 73) | type modelAPI struct
    method Close (line 107) | func (m *modelAPI) Close() {
    method PullModel (line 111) | func (m *modelAPI) PullModel(ctx context.Context, model types.ModelCon...
    method ConfigureModel (line 161) | func (m *modelAPI) ConfigureModel(ctx context.Context, config types.Mo...
    method SetModelVariables (line 196) | func (m *modelAPI) SetModelVariables(ctx context.Context, project *typ...
    method ListModels (line 253) | func (m *modelAPI) ListModels(ctx context.Context) ([]string, error) {
    method supportsRuntimeFlags (line 285) | func (m *modelAPI) supportsRuntimeFlags() bool {
  method newModelAPI (line 81) | func (s *composeService) newModelAPI(project *types.Project) (*modelAPI,...
  type Model (line 240) | type Model struct

FILE: pkg/compose/monitor.go
  type monitor (line 32) | type monitor struct
    method withServices (line 48) | func (c *monitor) withServices(services []string) {
    method Start (line 57) | func (c *monitor) Start(ctx context.Context) error {
    method getContainerSummary (line 190) | func (c *monitor) getContainerSummary(event events.Message) (*api.Cont...
    method withListener (line 208) | func (c *monitor) withListener(listener api.ContainerEventListener) {
  function newMonitor (line 40) | func newMonitor(apiClient client.APIClient, project string) *monitor {
  function newContainerEvent (line 167) | func newContainerEvent(timeNano int64, ctr *api.ContainerSummary, eventT...

FILE: pkg/compose/pause.go
  method Pause (line 30) | func (s *composeService) Pause(ctx context.Context, projectName string, ...
  method pause (line 36) | func (s *composeService) pause(ctx context.Context, projectName string, ...
  method UnPause (line 60) | func (s *composeService) UnPause(ctx context.Context, projectName string...
  method unPause (line 66) | func (s *composeService) unPause(ctx context.Context, projectName string...

FILE: pkg/compose/plugins.go
  type JsonMessage (line 42) | type JsonMessage struct
  constant ErrorType (line 48) | ErrorType                 = "error"
  constant InfoType (line 49) | InfoType                  = "info"
  constant SetEnvType (line 50) | SetEnvType                = "setenv"
  constant DebugType (line 51) | DebugType                 = "debug"
  constant providerMetadataDirectory (line 52) | providerMetadataDirectory = "compose/providers"
  method runPlugin (line 57) | func (s *composeService) runPlugin(ctx context.Context, project *types.P...
  method executePlugin (line 89) | func (s *composeService) executePlugin(cmd *exec.Cmd, command string, se...
  method getPluginBinaryPath (line 159) | func (s *composeService) getPluginBinaryPath(provider string) (path stri...
  method setupPluginCommand (line 173) | func (s *composeService) setupPluginCommand(ctx context.Context, project...
  method getPluginMetadata (line 208) | func (s *composeService) getPluginMetadata(path, command string, project...
  type ProviderMetadata (line 243) | type ProviderMetadata struct
    method IsEmpty (line 249) | func (p ProviderMetadata) IsEmpty() bool {
  type CommandMetadata (line 253) | type CommandMetadata struct
    method GetParameter (line 265) | func (c CommandMetadata) GetParameter(paramName string) (ParameterMeta...
    method CheckRequiredParameters (line 274) | func (c CommandMetadata) CheckRequiredParameters(provider types.Servic...
  type ParameterMetadata (line 257) | type ParameterMetadata struct

FILE: pkg/compose/plugins_windows.go
  function executable (line 21) | func executable(s string) string {

FILE: pkg/compose/port.go
  method Port (line 29) | func (s *composeService) Port(ctx context.Context, projectName string, s...
  function portNotFoundError (line 43) | func portNotFoundError(protocol string, port uint16, ctr container.Summa...

FILE: pkg/compose/printer.go
  type logPrinter (line 26) | type logPrinter interface
  type printer (line 30) | type printer struct
    method HandleEvent (line 42) | func (p *printer) HandleEvent(event api.ContainerEvent) {
  function newLogPrinter (line 35) | func newLogPrinter(consumer api.LogConsumer) logPrinter {

FILE: pkg/compose/progress.go
  type progressFunc (line 26) | type progressFunc
  function Run (line 28) | func Run(ctx context.Context, pf progressFunc, operation string, bus api...
  function errorEvent (line 36) | func errorEvent(id string, msg string) api.Resource {
  function errorEventf (line 46) | func errorEventf(id string, msg string, args ...any) api.Resource {
  function creatingEvent (line 51) | func creatingEvent(id string) api.Resource {
  function startingEvent (line 56) | func startingEvent(id string) api.Resource {
  function startedEvent (line 61) | func startedEvent(id string) api.Resource {
  function waiting (line 66) | func waiting(id string) api.Resource {
  function healthy (line 71) | func healthy(id string) api.Resource {
  function exited (line 76) | func exited(id string) api.Resource {
  function restartingEvent (line 81) | func restartingEvent(id string) api.Resource {
  function runningEvent (line 86) | func runningEvent(id string) api.Resource {
  function createdEvent (line 91) | func createdEvent(id string) api.Resource {
  function stoppingEvent (line 96) | func stoppingEvent(id string) api.Resource {
  function stoppedEvent (line 101) | func stoppedEvent(id string) api.Resource {
  function killingEvent (line 106) | func killingEvent(id string) api.Resource {
  function killedEvent (line 111) | func killedEvent(id string) api.Resource {
  function removingEvent (line 116) | func removingEvent(id string) api.Resource {
  function removedEvent (line 121) | func removedEvent(id string) api.Resource {
  function buildingEvent (line 126) | func buildingEvent(id string) api.Resource {
  function builtEvent (line 131) | func builtEvent(id string) api.Resource {
  function pullingEvent (line 136) | func pullingEvent(id string) api.Resource {
  function pulledEvent (line 141) | func pulledEvent(id string) api.Resource {
  function skippedEvent (line 146) | func skippedEvent(id string, reason string) api.Resource {
  function newEvent (line 155) | func newEvent(id string, status api.EventStatus, text string, reason ......
  type ignore (line 167) | type ignore struct
    method Start (line 169) | func (q *ignore) Start(_ context.Context, _ string) {
    method Done (line 172) | func (q *ignore) Done(_ string, _ bool) {
    method On (line 175) | func (q *ignore) On(_ ...api.Resource) {

FILE: pkg/compose/ps.go
  method Ps (line 32) | func (s *composeService) Ps(ctx context.Context, projectName string, opt...

FILE: pkg/compose/ps_test.go
  function TestPs (line 32) | func TestPs(t *testing.T) {
  function containerDetails (line 98) | func containerDetails(service string, id string, status containerType.Co...

FILE: pkg/compose/publish.go
  method Publish (line 45) | func (s *composeService) Publish(ctx context.Context, project *types.Pro...
  method publish (line 52) | func (s *composeService) publish(ctx context.Context, project *types.Pro...
  method createLayers (line 161) | func (s *composeService) createLayers(ctx context.Context, project *type...
  function processExtends (line 197) | func processExtends(ctx context.Context, project *types.Project, extFile...
  function processFile (line 226) | func processFile(ctx context.Context, file string, project *types.Projec...
  method generateImageDigestsOverride (line 285) | func (s *composeService) generateImageDigestsOverride(ctx context.Contex...
  method preChecks (line 301) | func (s *composeService) preChecks(project *types.Project, options api.P...
  method checkEnvironmentVariables (line 350) | func (s *composeService) checkEnvironmentVariables(project *types.Projec...
  function envFileLayers (line 374) | func envFileLayers(files map[string]string) []v1.Descriptor {
  method checkOnlyBuildSection (line 388) | func (s *composeService) checkOnlyBuildSection(project *types.Project) (...
  method checkForBindMount (line 406) | func (s *composeService) checkForBindMount(project *types.Project) map[s...
  method checkForSensitiveData (line 422) | func (s *composeService) checkForSensitiveData(project *types.Project) (...
  function composeFileAsByteReader (line 474) | func composeFileAsByteReader(filePath string, project *types.Project) (i...

FILE: pkg/compose/publish_test.go
  function Test_createLayers (line 33) | func Test_createLayers(t *testing.T) {

FILE: pkg/compose/pull.go
  method Pull (line 47) | func (s *composeService) Pull(ctx context.Context, project *types.Projec...
  method pull (line 53) | func (s *composeService) pull(ctx context.Context, project *types.Projec...
  function imageAlreadyPresent (line 153) | func imageAlreadyPresent(serviceImage string, localImages map[string]api...
  function getUnwrappedErrorMessage (line 168) | func getUnwrappedErrorMessage(err error) string {
  method pullServiceImage (line 176) | func (s *composeService) pullServiceImage(ctx context.Context, service t...
  function ImageDigestResolver (line 259) | func ImageDigestResolver(ctx context.Context, file *configfile.ConfigFil...
  type authProvider (line 276) | type authProvider interface
  function encodedAuth (line 280) | func encodedAuth(ref reference.Named, configFile authProvider) (string, ...
  method pullRequiredImages (line 293) | func (s *composeService) pullRequiredImages(ctx context.Context, project...
  function mustPull (line 351) | func mustPull(service types.ServiceConfig, images map[string]api.ImageSu...
  function isServiceImageToBuild (line 380) | func isServiceImageToBuild(service types.ServiceConfig, services types.S...
  constant PreparingPhase (line 401) | PreparingPhase         = "Preparing"
  constant WaitingPhase (line 402) | WaitingPhase           = "waiting"
  constant PullingFsPhase (line 403) | PullingFsPhase         = "Pulling fs layer"
  constant DownloadingPhase (line 404) | DownloadingPhase       = "Downloading"
  constant DownloadCompletePhase (line 405) | DownloadCompletePhase  = "Download complete"
  constant ExtractingPhase (line 406) | ExtractingPhase        = "Extracting"
  constant VerifyingChecksumPhase (line 407) | VerifyingChecksumPhase = "Verifying Checksum"
  constant AlreadyExistsPhase (line 408) | AlreadyExistsPhase     = "Already exists"
  constant PullCompletePhase (line 409) | PullCompletePhase      = "Pull complete"
  function toPullProgressEvent (line 412) | func toPullProgressEvent(parent string, jm jsonstream.Message, events ap...

FILE: pkg/compose/push.go
  method Push (line 39) | func (s *composeService) Push(ctx context.Context, project *types.Projec...
  method push (line 48) | func (s *composeService) push(ctx context.Context, project *types.Projec...
  method pushServiceImage (line 89) | func (s *composeService) pushServiceImage(ctx context.Context, tag strin...
  function toPushProgressEvent (line 132) | func toPushProgressEvent(prefix string, jm jsonstream.Message, events ap...
  function isDone (line 174) | func isDone(msg jsonstream.Message) bool {
  function progressText (line 187) | func progressText(p *jsonstream.Progress) string {

FILE: pkg/compose/remove.go
  method Remove (line 31) | func (s *composeService) Remove(ctx context.Context, projectName string,...
  method remove (line 99) | func (s *composeService) remove(ctx context.Context, containers Containe...

FILE: pkg/compose/restart.go
  method Restart (line 31) | func (s *composeService) Restart(ctx context.Context, projectName string...
  method restart (line 37) | func (s *composeService) restart(ctx context.Context, projectName string...

FILE: pkg/compose/run.go
  type prepareRunResult (line 38) | type prepareRunResult struct
  method RunOneOffContainer (line 44) | func (s *composeService) RunOneOffContainer(ctx context.Context, project...
  method runPostStartHooksOnEvent (line 93) | func (s *composeService) runPostStartHooksOnEvent(ctx context.Context, c...
  method prepareRun (line 122) | func (s *composeService) prepareRun(ctx context.Context, project *types....
  function prepareBuildOptions (line 217) | func prepareBuildOptions(opts api.RunOptions) *api.BuildOptions {
  function applyRunOptions (line 227) | func applyRunOptions(project *types.Project, service *types.ServiceConfi...
  method startDependencies (line 272) | func (s *composeService) startDependencies(ctx context.Context, project ...

FILE: pkg/compose/scale.go
  method Scale (line 27) | func (s *composeService) Scale(ctx context.Context, project *types.Proje...

FILE: pkg/compose/secrets.go
  type mountType (line 31) | type mountType
  constant secretMount (line 34) | secretMount mountType = "secret"
  constant configMount (line 35) | configMount mountType = "config"
  method injectSecrets (line 38) | func (s *composeService) injectSecrets(ctx context.Context, project *typ...
  method injectConfigs (line 42) | func (s *composeService) injectConfigs(ctx context.Context, project *typ...
  method injectFileReferences (line 46) | func (s *composeService) injectFileReferences(ctx context.Context, proje...
  method getFilesAndMap (line 71) | func (s *composeService) getFilesAndMap(project *types.Project, service ...
  method resolveFileContent (line 98) | func (s *composeService) resolveFileContent(project *types.Project, sour...
  method setDefaultTarget (line 113) | func (s *composeService) setDefaultTarget(file *types.FileReferenceConfi...
  method copyFileToContainer (line 125) | func (s *composeService) copyFileToContainer(ctx context.Context, id, co...
  function createTar (line 139) | func createTar(env string, config types.FileReferenceConfig) (bytes.Buff...

FILE: pkg/compose/shellout.go
  method prepareShellOut (line 37) | func (s *composeService) prepareShellOut(gctx context.Context, env types...
  method propagateDockerEndpoint (line 53) | func (s *composeService) propagateDockerEndpoint() ([]string, func(), er...

FILE: pkg/compose/start.go
  method Start (line 31) | func (s *composeService) Start(ctx context.Context, projectName string, ...
  method start (line 37) | func (s *composeService) start(ctx context.Context, projectName string, ...
  function getDependencyCondition (line 102) | func getDependencyCondition(service types.ServiceConfig, project *types....

FILE: pkg/compose/stop.go
  method Stop (line 27) | func (s *composeService) Stop(ctx context.Context, projectName string, o...
  method stop (line 33) | func (s *composeService) stop(ctx context.Context, projectName string, o...

FILE: pkg/compose/stop_test.go
  function TestStopTimeout (line 33) | func TestStopTimeout(t *testing.T) {

FILE: pkg/compose/suffix_unix.go
  function executable (line 21) | func executable(s string) string {

FILE: pkg/compose/top.go
  method Top (line 29) | func (s *composeService) Top(ctx context.Context, projectName string, se...

FILE: pkg/compose/transform/replace.go
  function ReplaceExtendsFile (line 26) | func ReplaceExtendsFile(in []byte, service string, value string) ([]byte...
  function ReplaceEnvFile (line 65) | func ReplaceEnvFile(in []byte, service string, i int, value string) ([]b...
  function getMapping (line 109) | func getMapping(root *yaml.Node, key string) (*yaml.Node, error) {
  function replace (line 126) | func replace(in []byte, line int, column int, value string) []byte {

FILE: pkg/compose/transform/replace_test.go
  function TestReplace (line 26) | func TestReplace(t *testing.T) {

FILE: pkg/compose/up.go
  method Up (line 43) | func (s *composeService) Up(ctx context.Context, project *types.Project,...

FILE: pkg/compose/viz.go
  type vizGraph (line 30) | type vizGraph
  method Viz (line 32) | func (s *composeService) Viz(_ context.Context, project *types.Project, ...
  function addNodes (line 66) | func addNodes(graphBuilder *strings.Builder, graph vizGraph, projectName...
  function addEdges (line 122) | func addEdges(graphBuilder *strings.Builder, graph vizGraph, opts *api.V...
  function writeQuoted (line 137) | func writeQuoted(builder *strings.Builder, str string) {

FILE: pkg/compose/viz_test.go
  function TestViz (line 32) | func TestViz(t *testing.T) {

FILE: pkg/compose/volumes.go
  method Volumes (line 29) | func (s *composeService) Volumes(ctx context.Context, project string, op...

FILE: pkg/compose/volumes_test.go
  function TestVolumes (line 31) | func TestVolumes(t *testing.T) {

FILE: pkg/compose/wait.go
  method Wait (line 29) | func (s *composeService) Wait(ctx context.Context, projectName string, o...

FILE: pkg/compose/watch.go
  type WatchFunc (line 50) | type WatchFunc
  type Watcher (line 52) | type Watcher struct
    method Start (line 84) | func (w *Watcher) Start(ctx context.Context) error {
    method Stop (line 102) | func (w *Watcher) Stop() error {
  function NewWatcher (line 60) | func NewWatcher(project *types.Project, options api.UpOptions, w WatchFu...
  method getSyncImplementation (line 119) | func (s *composeService) getSyncImplementation(project *types.Project) (...
  method Watch (line 133) | func (s *composeService) Watch(ctx context.Context, project *types.Proje...
  type watchRule (line 141) | type watchRule struct
    method Matches (line 148) | func (r watchRule) Matches(event watch.FileEvent) *sync.PathMapping {
  method watch (line 189) | func (s *composeService) watch(ctx context.Context, project *types.Proje...
  function getWatchRules (line 295) | func getWatchRules(config *types.DevelopConfig, service types.ServiceCon...
  function isSync (line 342) | func isSync(trigger types.Trigger) bool {
  method watchEvents (line 346) | func (s *composeService) watchEvents(ctx context.Context, project *types...
  function loadDevelopmentConfig (line 395) | func loadDevelopmentConfig(service types.ServiceConfig, project *types.P...
  function checkIfPathAlreadyBindMounted (line 436) | func checkIfPathAlreadyBindMounted(watchPath string, volumes []types.Ser...
  type tarDockerClient (line 448) | type tarDockerClient struct
    method ContainersForService (line 452) | func (t tarDockerClient) ContainersForService(ctx context.Context, pro...
    method Exec (line 460) | func (t tarDockerClient) Exec(ctx context.Context, containerID string,...
    method Untar (line 523) | func (t tarDockerClient) Untar(ctx context.Context, id string, archive...
  method handleWatchBatch (line 533) | func (s *composeService) handleWatchBatch(ctx context.Context, project *...
  method exec (line 610) | func (s *composeService) exec(ctx context.Context, project *types.Projec...
  method rebuild (line 635) | func (s *composeService) rebuild(ctx context.Context, project *types.Pro...
  function writeWatchSyncMessage (line 690) | func writeWatchSyncMessage(log api.LogConsumer, serviceName string, path...
  method pruneDanglingImagesOnRebuild (line 712) | func (s *composeService) pruneDanglingImagesOnRebuild(ctx context.Contex...
  method initialSync (line 733) | func (s *composeService) initialSync(ctx context.Context, project *types...
  method initialSyncFiles (line 766) | func (s *composeService) initialSyncFiles(ctx context.Context, project *...
  function shouldIgnore (line 829) | func shouldIgnore(name string, ignore watch.PathMatcher) bool {
  method imageCreatedTime (line 836) | func (s *composeService) imageCreatedTime(ctx context.Context, project *...

FILE: pkg/compose/watch_test.go
  type testWatcher (line 40) | type testWatcher struct
    method Start (line 45) | func (t testWatcher) Start() error {
    method Close (line 49) | func (t testWatcher) Close() error {
    method Events (line 53) | func (t testWatcher) Events() chan watch.FileEvent {
    method Errors (line 57) | func (t testWatcher) Errors() chan error {
  type stdLogger (line 61) | type stdLogger struct
    method Log (line 63) | func (s stdLogger) Log(containerName, message string) {
    method Err (line 67) | func (s stdLogger) Err(containerName, message string) {
    method Status (line 71) | func (s stdLogger) Status(containerName, msg string) {
  function TestWatch_Sync (line 75) | func TestWatch_Sync(t *testing.T) {
  type fakeSyncer (line 178) | type fakeSyncer struct
    method Sync (line 188) | func (f *fakeSyncer) Sync(ctx context.Context, service string, paths [...
  function newFakeSyncer (line 182) | func newFakeSyncer() *fakeSyncer {

FILE: pkg/dryrun/dryrunclient.go
  type DryRunClient (line 46) | type DryRunClient struct
    method ContainerAttach (line 92) | func (d *DryRunClient) ContainerAttach(ctx context.Context, container ...
    method ContainerCreate (line 96) | func (d *DryRunClient) ContainerCreate(ctx context.Context, options cl...
    method ContainerInspect (line 109) | func (d *DryRunClient) ContainerInspect(ctx context.Context, container...
    method ContainerKill (line 137) | func (d *DryRunClient) ContainerKill(ctx context.Context, container st...
    method ContainerList (line 141) | func (d *DryRunClient) ContainerList(ctx context.Context, options clie...
    method ContainerPause (line 162) | func (d *DryRunClient) ContainerPause(ctx context.Context, container s...
    method ContainerRemove (line 166) | func (d *DryRunClient) ContainerRemove(ctx context.Context, container ...
    method ContainerRename (line 170) | func (d *DryRunClient) ContainerRename(ctx context.Context, container ...
    method ContainerRestart (line 174) | func (d *DryRunClient) ContainerRestart(ctx context.Context, container...
    method ContainerStart (line 178) | func (d *DryRunClient) ContainerStart(ctx context.Context, container s...
    method ContainerStop (line 182) | func (d *DryRunClient) ContainerStop(ctx context.Context, container st...
    method ContainerUnpause (line 186) | func (d *DryRunClient) ContainerUnpause(ctx context.Context, container...
    method CopyFromContainer (line 190) | func (d *DryRunClient) CopyFromContainer(ctx context.Context, containe...
    method CopyToContainer (line 197) | func (d *DryRunClient) CopyToContainer(ctx context.Context, container ...
    method ImageBuild (line 201) | func (d *DryRunClient) ImageBuild(ctx context.Context, reader io.Reade...
    method ImageInspect (line 207) | func (d *DryRunClient) ImageInspect(ctx context.Context, imageName str...
    method ImagePull (line 219) | func (d *DryRunClient) ImagePull(ctx context.Context, ref string, opti...
    method ImagePush (line 226) | func (d *DryRunClient) ImagePush(ctx context.Context, ref string, opti...
    method ImageRemove (line 247) | func (d *DryRunClient) ImageRemove(ctx context.Context, imageName stri...
    method NetworkConnect (line 251) | func (d *DryRunClient) NetworkConnect(ctx context.Context, networkName...
    method NetworkCreate (line 255) | func (d *DryRunClient) NetworkCreate(ctx context.Context, name string,...
    method NetworkDisconnect (line 261) | func (d *DryRunClient) NetworkDisconnect(ctx context.Context, networkN...
    method NetworkRemove (line 265) | func (d *DryRunClient) NetworkRemove(ctx context.Context, networkName ...
    method VolumeCreate (line 269) | func (d *DryRunClient) VolumeCreate(ctx context.Context, options clien...
    method VolumeRemove (line 281) | func (d *DryRunClient) VolumeRemove(ctx context.Context, volumeID stri...
    method ExecCreate (line 285) | func (d *DryRunClient) ExecCreate(ctx context.Context, container strin...
    method ExecStart (line 298) | func (d *DryRunClient) ExecStart(ctx context.Context, execID string, c...
    method ConfigList (line 308) | func (d *DryRunClient) ConfigList(ctx context.Context, options client....
    method ConfigInspect (line 312) | func (d *DryRunClient) ConfigInspect(ctx context.Context, name string,...
    method ConfigCreate (line 316) | func (d *DryRunClient) ConfigCreate(ctx context.Context, options clien...
    method ConfigRemove (line 320) | func (d *DryRunClient) ConfigRemove(ctx context.Context, id string, op...
    method ConfigUpdate (line 324) | func (d *DryRunClient) ConfigUpdate(ctx context.Context, id string, op...
    method ContainerCommit (line 328) | func (d *DryRunClient) ContainerCommit(ctx context.Context, container ...
    method ContainerDiff (line 332) | func (d *DryRunClient) ContainerDiff(ctx context.Context, container st...
    method ExecAttach (line 336) | func (d *DryRunClient) ExecAttach(ctx context.Context, execID string, ...
    method ExecInspect (line 340) | func (d *DryRunClient) ExecInspect(ctx context.Context, execID string,...
    method ExecResize (line 344) | func (d *DryRunClient) ExecResize(ctx context.Context, execID string, ...
    method ContainerExport (line 348) | func (d *DryRunClient) ContainerExport(ctx context.Context, container ...
    method ContainerLogs (line 352) | func (d *DryRunClient) ContainerLogs(ctx context.Context, container st...
    method ContainerResize (line 356) | func (d *DryRunClient) ContainerResize(ctx context.Context, container ...
    method ContainerStatPath (line 360) | func (d *DryRunClient) ContainerStatPath(ctx context.Context, containe...
    method ContainerStats (line 364) | func (d *DryRunClient) ContainerStats(ctx context.Context, container s...
    method ContainerTop (line 368) | func (d *DryRunClient) ContainerTop(ctx context.Context, container str...
    method ContainerUpdate (line 372) | func (d *DryRunClient) ContainerUpdate(ctx context.Context, container ...
    method ContainerWait (line 376) | func (d *DryRunClient) ContainerWait(ctx context.Context, container st...
    method ContainerPrune (line 380) | func (d *DryRunClient) ContainerPrune(ctx context.Context, options cli...
    method DistributionInspect (line 384) | func (d *DryRunClient) DistributionInspect(ctx context.Context, imageN...
    method BuildCachePrune (line 388) | func (d *DryRunClient) BuildCachePrune(ctx context.Context, opts clien...
    method BuildCancel (line 392) | func (d *DryRunClient) BuildCancel(ctx context.Context, id string, opt...
    method ImageHistory (line 396) | func (d *DryRunClient) ImageHistory(ctx context.Context, imageName str...
    method ImageImport (line 400) | func (d *DryRunClient) ImageImport(ctx context.Context, source client....
    method ImageList (line 404) | func (d *DryRunClient) ImageList(ctx context.Context, options client.I...
    method ImageLoad (line 408) | func (d *DryRunClient) ImageLoad(ctx context.Context, input io.Reader,...
    method ImageSearch (line 412) | func (d *DryRunClient) ImageSearch(ctx context.Context, term string, o...
    method ImageSave (line 416) | func (d *DryRunClient) ImageSave(ctx context.Context, images []string,...
    method ImageTag (line 420) | func (d *DryRunClient) ImageTag(ctx context.Context, options client.Im...
    method ImagePrune (line 424) | func (d *DryRunClient) ImagePrune(ctx context.Context, options client....
    method NodeInspect (line 428) | func (d *DryRunClient) NodeInspect(ctx context.Context, nodeID string,...
    method NodeList (line 432) | func (d *DryRunClient) NodeList(ctx context.Context, options client.No...
    method NodeRemove (line 436) | func (d *DryRunClient) NodeRemove(ctx context.Context, nodeID string, ...
    method NodeUpdate (line 440) | func (d *DryRunClient) NodeUpdate(ctx context.Context, nodeID string, ...
    method NetworkInspect (line 444) | func (d *DryRunClient) NetworkInspect(ctx context.Context, networkName...
    method NetworkList (line 448) | func (d *DryRunClient) NetworkList(ctx context.Context, options client...
    method NetworkPrune (line 452) | func (d *DryRunClient) NetworkPrune(ctx context.Context, options clien...
    method PluginList (line 456) | func (d *DryRunClient) PluginList(ctx context.Context, options client....
    method PluginRemove (line 460) | func (d *DryRunClient) PluginRemove(ctx context.Context, name string, ...
    method PluginEnable (line 464) | func (d *DryRunClient) PluginEnable(ctx context.Context, name string, ...
    method PluginDisable (line 468) | func (d *DryRunClient) PluginDisable(ctx context.Context, name string,...
    method PluginInstall (line 472) | func (d *DryRunClient) PluginInstall(ctx context.Context, name string,...
    method PluginUpgrade (line 476) | func (d *DryRunClient) PluginUpgrade(ctx context.Context, name string,...
    method PluginPush (line 480) | func (d *DryRunClient) PluginPush(ctx context.Context, name string, op...
    method PluginSet (line 484) | func (d *DryRunClient) PluginSet(ctx context.Context, name string, opt...
    method PluginInspect (line 488) | func (d *DryRunClient) PluginInspect(ctx context.Context, name string,...
    method PluginCreate (line 492) | func (d *DryRunClient) PluginCreate(ctx context.Context, createContext...
    method ServiceCreate (line 496) | func (d *DryRunClient) ServiceCreate(ctx context.Context, options clie...
    method ServiceInspect (line 500) | func (d *DryRunClient) ServiceInspect(ctx context.Context, serviceID s...
    method ServiceList (line 504) | func (d *DryRunClient) ServiceList(ctx context.Context, options client...
    method ServiceRemove (line 508) | func (d *DryRunClient) ServiceRemove(ctx context.Context, serviceID st...
    method ServiceUpdate (line 512) | func (d *DryRunClient) ServiceUpdate(ctx context.Context, serviceID st...
    method ServiceLogs (line 516) | func (d *DryRunClient) ServiceLogs(ctx context.Context, serviceID stri...
    method TaskLogs (line 520) | func (d *DryRunClient) TaskLogs(ctx context.Context, taskID string, op...
    method TaskInspect (line 524) | func (d *DryRunClient) TaskInspect(ctx context.Context, taskID string,...
    method TaskList (line 528) | func (d *DryRunClient) TaskList(ctx context.Context, options client.Ta...
    method SwarmInit (line 532) | func (d *DryRunClient) SwarmInit(ctx context.Context, options client.S...
    method SwarmJoin (line 536) | func (d *DryRunClient) SwarmJoin(ctx context.Context, options client.S...
    method SwarmGetUnlockKey (line 540) | func (d *DryRunClient) SwarmGetUnlockKey(ctx context.Context) (client....
    method SwarmUnlock (line 544) | func (d *DryRunClient) SwarmUnlock(ctx context.Context, options client...
    method SwarmLeave (line 548) | func (d *DryRunClient) SwarmLeave(ctx context.Context, options client....
    method SwarmInspect (line 552) | func (d *DryRunClient) SwarmInspect(ctx context.Context, options clien...
    method SwarmUpdate (line 556) | func (d *DryRunClient) SwarmUpdate(ctx context.Context, options client...
    method SecretList (line 560) | func (d *DryRunClient) SecretList(ctx context.Context, options client....
    method SecretCreate (line 564) | func (d *DryRunClient) SecretCreate(ctx context.Context, options clien...
    method SecretRemove (line 568) | func (d *DryRunClient) SecretRemove(ctx context.Context, id string, op...
    method SecretInspect (line 572) | func (d *DryRunClient) SecretInspect(ctx context.Context, name string,...
    method SecretUpdate (line 576) | func (d *DryRunClient) SecretUpdate(ctx context.Context, id string, op...
    method Events (line 580) | func (d *DryRunClient) Events(ctx context.Context, options client.Even...
    method Info (line 584) | func (d *DryRunClient) Info(ctx context.Context, options client.InfoOp...
    method RegistryLogin (line 588) | func (d *DryRunClient) RegistryLogin(ctx context.Context, options clie...
    method DiskUsage (line 592) | func (d *DryRunClient) DiskUsage(ctx context.Context, options client.D...
    method Ping (line 596) | func (d *DryRunClient) Ping(ctx context.Context, options client.PingOp...
    method VolumeInspect (line 600) | func (d *DryRunClient) VolumeInspect(ctx context.Context, volumeID str...
    method VolumeList (line 604) | func (d *DryRunClient) VolumeList(ctx context.Context, opts client.Vol...
    method VolumePrune (line 608) | func (d *DryRunClient) VolumePrune(ctx context.Context, options client...
    method VolumeUpdate (line 612) | func (d *DryRunClient) VolumeUpdate(ctx context.Context, volumeID stri...
    method ClientVersion (line 616) | func (d *DryRunClient) ClientVersion() string {
    method DaemonHost (line 620) | func (d *DryRunClient) DaemonHost() string {
    method ServerVersion (line 624) | func (d *DryRunClient) ServerVersion(ctx context.Context, options clie...
    method DialHijack (line 628) | func (d *DryRunClient) DialHijack(ctx context.Context, url, proto stri...
    method Dialer (line 632) | func (d *DryRunClient) Dialer() func(context.Context) (net.Conn, error) {
    method Close (line 636) | func (d *DryRunClient) Close() error {
    method CheckpointCreate (line 640) | func (d *DryRunClient) CheckpointCreate(ctx context.Context, container...
    method CheckpointRemove (line 644) | func (d *DryRunClient) CheckpointRemove(ctx context.Context, container...
    method CheckpointList (line 648) | func (d *DryRunClient) CheckpointList(ctx context.Context, container s...
  type execDetails (line 53) | type execDetails struct
  type fakeStreamResult (line 58) | type fakeStreamResult struct
    method Read (line 63) | func (e fakeStreamResult) Read(p []byte) (int, error) { return e.ReadC...
    method Close (line 64) | func (e fakeStreamResult) Close() error               { return e.ReadC...
  function NewDryRunClient (line 67) | func NewDryRunClient(apiClient client.APIClient, cli command.Cli) (*DryR...
  function getCallingFunction (line 84) | func getCallingFunction() string {

FILE: pkg/e2e/assert.go
  function RequireServiceState (line 29) | func RequireServiceState(t testing.TB, cli *CLI, service string, state s...

FILE: pkg/e2e/bridge_test.go
  function TestConvertAndTransformList (line 28) | func TestConvertAndTransformList(t *testing.T) {

FILE: pkg/e2e/build_test.go
  function TestLocalComposeBuild (line 36) | func TestLocalComposeBuild(t *testing.T) {
  function TestBuildSSH (line 146) | func TestBuildSSH(t *testing.T) {
  function TestBuildSecrets (line 201) | func TestBuildSecrets(t *testing.T) {
  function TestBuildTags (line 221) | func TestBuildTags(t *testing.T) {
  function TestBuildImageDependencies (line 241) | func TestBuildImageDependencies(t *testing.T) {
  function TestBuildPlatformsWithCorrectBuildxConfig (line 298) | func TestBuildPlatformsWithCorrectBuildxConfig(t *testing.T) {
  function TestBuildPrivileged (line 365) | func TestBuildPrivileged(t *testing.T) {
  function TestBuildPlatformsStandardErrors (line 397) | func TestBuildPlatformsStandardErrors(t *testing.T) {
  function TestBuildBuilder (line 453) | func TestBuildBuilder(t *testing.T) {
  function TestBuildEntitlements (line 479) | func TestBuildEntitlements(t *testing.T) {
  function TestBuildDependsOn (line 511) | func TestBuildDependsOn(t *testing.T) {
  function TestBuildSubset (line 523) | func TestBuildSubset(t *testing.T) {
  function TestBuildDependentImage (line 535) | func TestBuildDependentImage(t *testing.T) {
  function TestBuildSubDependencies (line 551) | func TestBuildSubDependencies(t *testing.T) {
  function TestBuildLongOutputLine (line 567) | func TestBuildLongOutputLine(t *testing.T) {
  function TestBuildDependentImageWithProfile (line 583) | func TestBuildDependentImageWithProfile(t *testing.T) {
  function TestBuildTLS (line 595) | func TestBuildTLS(t *testing.T) {
  function TestBuildEscaped (line 630) | func TestBuildEscaped(t *testing.T) {

FILE: pkg/e2e/cancel_test.go
  function TestComposeCancel (line 36) | func TestComposeCancel(t *testing.T) {
  function StartWithNewGroupID (line 87) | func StartWithNewGroupID(ctx context.Context, command icmd.Cmd, stdout *...

FILE: pkg/e2e/cascade_test.go
  function TestCascadeStop (line 28) | func TestCascadeStop(t *testing.T) {
  function TestCascadeFail (line 42) | func TestCascadeFail(t *testing.T) {

FILE: pkg/e2e/commit_test.go
  function TestCommit (line 23) | func TestCommit(t *testing.T) {
  function TestCommitWithReplicas (line 51) | func TestCommitWithReplicas(t *testing.T) {

FILE: pkg/e2e/compose_environment_test.go
  function TestEnvPriority (line 27) | func TestEnvPriority(t *testing.T) {
  function TestEnvInterpolation (line 192) | func TestEnvInterpolation(t *testing.T) {
  function TestCommentsInEnvFile (line 208) | func TestCommentsInEnvFile(t *testing.T) {
  function TestUnsetEnv (line 226) | func TestUnsetEnv(t *testing.T) {

FILE: pkg/e2e/compose_exec_test.go
  function TestLocalComposeExec (line 27) | func TestLocalComposeExec(t *testing.T) {
  function TestLocalComposeExecOneOff (line 69) | func TestLocalComposeExecOneOff(t *testing.T) {

FILE: pkg/e2e/compose_run_build_once_test.go
  function TestRunBuildOnce (line 34) | func TestRunBuildOnce(t *testing.T) {
  function countServiceBuilds (line 89) | func countServiceBuilds(output, projectName, serviceName string) int {
  function randomProjectName (line 96) | func randomProjectName(prefix string) string {

FILE: pkg/e2e/compose_run_test.go
  function TestLocalComposeRun (line 28) | func TestLocalComposeRun(t *testing.T) {

FILE: pkg/e2e/compose_test.go
  function TestLocalComposeUp (line 33) | func TestLocalComposeUp(t *testing.T) {
  function TestDownComposefileInParentFolder (line 127) | func TestDownComposefileInParentFolder(t *testing.T) {
  function TestAttachRestart (line 142) | func TestAttachRestart(t *testing.T) {
  function TestInitContainer (line 164) | func TestInitContainer(t *testing.T) {
  function TestRm (line 172) | func TestRm(t *testing.T) {
  function TestCompatibility (line 214) | func TestCompatibility(t *testing.T) {
  function TestConfig (line 237) | func TestConfig(t *testing.T) {
  function TestConfigInterpolate (line 261) | func TestConfigInterpolate(t *testing.T) {
  function TestStopWithDependenciesAttached (line 285) | func TestStopWithDependenciesAttached(t *testing.T) {
  function TestRemoveOrphaned (line 299) | func TestRemoveOrphaned(t *testing.T) {
  function TestComposeFileSetByDotEnv (line 320) | func TestComposeFileSetByDotEnv(t *testing.T) {
  function TestComposeFileSetByProjectDirectory (line 336) | func TestComposeFileSetByProjectDirectory(t *testing.T) {
  function TestComposeFileSetByEnvFile (line 349) | func TestComposeFileSetByEnvFile(t *testing.T) {
  function TestNestedDotEnv (line 373) | func TestNestedDotEnv(t *testing.T) {
  function TestUnnecessaryResources (line 395) | func TestUnnecessaryResources(t *testing.T) {

FILE: pkg/e2e/compose_up_test.go
  function TestUpWait (line 28) | func TestUpWait(t *testing.T) {
  function TestUpExitCodeFrom (line 51) | func TestUpExitCodeFrom(t *testing.T) {
  function TestUpExitCodeFromContainerKilled (line 61) | func TestUpExitCodeFromContainerKilled(t *testing.T) {
  function TestPortRange (line 71) | func TestPortRange(t *testing.T) {
  function TestStdoutStderr (line 85) | func TestStdoutStderr(t *testing.T) {
  function TestLoggingDriver (line 95) | func TestLoggingDriver(t *testing.T) {

FILE: pkg/e2e/config_test.go
  function TestLocalComposeConfig (line 25) | func TestLocalComposeConfig(t *testing.T) {

FILE: pkg/e2e/configs_test.go
  function TestConfigFromEnv (line 25) | func TestConfigFromEnv(t *testing.T) {

FILE: pkg/e2e/container_name_test.go
  function TestUpContainerNameConflict (line 27) | func TestUpContainerNameConflict(t *testing.T) {

FILE: pkg/e2e/cp_test.go
  function TestCopy (line 28) | func TestCopy(t *testing.T) {

FILE: pkg/e2e/e2e_config_plugin.go
  constant composeStandaloneMode (line 21) | composeStandaloneMode = false

FILE: pkg/e2e/e2e_config_standalone.go
  constant composeStandaloneMode (line 21) | composeStandaloneMode = true

FILE: pkg/e2e/env_file_test.go
  function TestRawEnvFile (line 27) | func TestRawEnvFile(t *testing.T) {
  function TestUnusedMissingEnvFile (line 35) | func TestUnusedMissingEnvFile(t *testing.T) {
  function TestRunEnvFile (line 47) | func TestRunEnvFile(t *testing.T) {

FILE: pkg/e2e/exec_test.go
  function TestExec (line 25) | func TestExec(t *testing.T) {

FILE: pkg/e2e/export_test.go
  function TestExport (line 23) | func TestExport(t *testing.T) {
  function TestExportWithReplicas (line 37) | func TestExportWithReplicas(t *testing.T) {

FILE: pkg/e2e/expose_test.go
  function TestExposeRange (line 30) | func TestExposeRange(t *testing.T) {

FILE: pkg/e2e/framework.go
  function init (line 62) | func init() {
  type CLI (line 72) | type CLI struct
    method BaseEnvironment (line 267) | func (c *CLI) BaseEnvironment() []string {
    method NewCmd (line 290) | func (c *CLI) NewCmd(command string, args ...string) icmd.Cmd {
    method NewCmdWithEnv (line 298) | func (c *CLI) NewCmdWithEnv(envvars []string, command string, args ......
    method MetricsSocket (line 309) | func (c *CLI) MetricsSocket() string {
    method NewDockerCmd (line 314) | func (c *CLI) NewDockerCmd(t testing.TB, args ...string) icmd.Cmd {
    method RunDockerOrExitError (line 325) | func (c *CLI) RunDockerOrExitError(t testing.TB, args ...string) *icmd...
    method RunCmd (line 332) | func (c *CLI) RunCmd(t testing.TB, args ...string) *icmd.Result {
    method RunCmdInDir (line 342) | func (c *CLI) RunCmdInDir(t testing.TB, dir string, args ...string) *i...
    method RunDockerCmd (line 354) | func (c *CLI) RunDockerCmd(t testing.TB, args ...string) *icmd.Result {
    method RunDockerComposeCmd (line 362) | func (c *CLI) RunDockerComposeCmd(t testing.TB, args ...string) *icmd....
    method RunDockerComposeCmdNoCheck (line 370) | func (c *CLI) RunDockerComposeCmdNoCheck(t testing.TB, args ...string)...
    method NewDockerComposeCmd (line 380) | func (c *CLI) NewDockerComposeCmd(t testing.TB, args ...string) icmd.C...
    method WaitForCmdResult (line 435) | func (c *CLI) WaitForCmdResult(
    method WaitForCondition (line 457) | func (c *CLI) WaitForCondition(
    method cleanupWithDown (line 517) | func (c *CLI) cleanupWithDown(t testing.TB, project string, args ...st...
  type CLIOption (line 86) | type CLIOption
  function NewParallelCLI (line 90) | func NewParallelCLI(t *testing.T, opts ...CLIOption) *CLI {
  function NewCLI (line 97) | func NewCLI(t testing.TB, opts ...CLIOption) *CLI {
  function WithEnv (line 118) | func WithEnv(env ...string) CLIOption {
  function copyLocalConfig (line 124) | func copyLocalConfig(t testing.TB, configDir string) {
  function initializePlugins (line 138) | func initializePlugins(t testing.TB, configDir string) {
  function initializeContextDir (line 178) | func initializeContextDir(t testing.TB, configDir string) {
  function checkExists (line 189) | func checkExists(path string) bool {
  function dirContents (line 194) | func dirContents(dir string) []string {
  function findExecutable (line 203) | func findExecutable(executableName string) (string, error) {
  function findPluginExecutable (line 221) | func findPluginExecutable(pluginExecutableName string) (string, error) {
  function CopyFile (line 248) | func CopyFile(t testing.TB, sourceFile string, destinationFile string) {
  function ComposeStandalonePath (line 394) | func ComposeStandalonePath(t testing.TB) string {
  function StdoutContains (line 406) | func StdoutContains(expected string) func(*icmd.Result) bool {
  function IsHealthy (line 412) | func IsHealthy(service string) func(res *icmd.Result) bool {
  function Lines (line 475) | func Lines(output string) []string {
  function HTTPGetWithRetry (line 482) | func HTTPGetWithRetry(

FILE: pkg/e2e/healthcheck_test.go
  function TestStartInterval (line 28) | func TestStartInterval(t *testing.T) {

FILE: pkg/e2e/hooks_test.go
  function TestPostStartHookInError (line 26) | func TestPostStartHookInError(t *testing.T) {
  function TestPostStartHookSuccess (line 39) | func TestPostStartHookSuccess(t *testing.T) {
  function TestPreStopHookSuccess (line 51) | func TestPreStopHookSuccess(t *testing.T) {
  function TestPreStopHookInError (line 66) | func TestPreStopHookInError(t *testing.T) {
  function TestPreStopHookSuccessWithPreviousStop (line 82) | func TestPreStopHookSuccessWithPreviousStop(t *testing.T) {
  function TestPostStartAndPreStopHook (line 98) | func TestPostStartAndPreStopHook(t *testing.T) {

FILE: pkg/e2e/ipc_test.go
  function TestIPC (line 27) | func TestIPC(t *testing.T) {

FILE: pkg/e2e/logs_test.go
  function TestLocalComposeLogs (line 33) | func TestLocalComposeLogs(t *testing.T) {
  function TestLocalComposeLogsFollow (line 76) | func TestLocalComposeLogsFollow(t *testing.T) {
  function TestLocalComposeLargeLogs (line 102) | func TestLocalComposeLargeLogs(t *testing.T) {
  function expectOutput (line 124) | func expectOutput(res *icmd.Result, expected string) func(t poll.LogT) p...

FILE: pkg/e2e/main_test.go
  function TestMain (line 24) | func TestMain(m *testing.M) {

FILE: pkg/e2e/model_test.go
  function TestComposeModel (line 23) | func TestComposeModel(t *testing.T) {

FILE: pkg/e2e/networks_test.go
  function TestNetworks (line 30) | func TestNetworks(t *testing.T) {
  function TestNetworkAliases (line 62) | func TestNetworkAliases(t *testing.T) {
  function TestNetworkLinks (line 90) | func TestNetworkLinks(t *testing.T) {
  function TestIPAMConfig (line 111) | func TestIPAMConfig(t *testing.T) {
  function TestNetworkModes (line 135) | func TestNetworkModes(t *testing.T) {
  function TestNetworkConfigChanged (line 148) | func TestNetworkConfigChanged(t *testing.T) {
  function TestMacAddress (line 174) | func TestMacAddress(t *testing.T) {
  function TestInterfaceName (line 185) | func TestInterfaceName(t *testing.T) {
  function TestNetworkRecreate (line 203) | func TestNetworkRecreate(t *testing.T) {

FILE: pkg/e2e/noDeps_test.go
  function TestNoDepsVolumeFrom (line 28) | func TestNoDepsVolumeFrom(t *testing.T) {
  function TestNoDepsNetworkMode (line 45) | func TestNoDepsNetworkMode(t *testing.T) {

FILE: pkg/e2e/orphans_test.go
  function TestRemoveOrphans (line 26) | func TestRemoveOrphans(t *testing.T) {

FILE: pkg/e2e/pause_test.go
  function TestPause (line 33) | func TestPause(t *testing.T) {
  function TestPauseServiceNotRunning (line 77) | func TestPauseServiceNotRunning(t *testing.T) {
  function TestPauseServiceAlreadyPaused (line 95) | func TestPauseServiceAlreadyPaused(t *testing.T) {
  function TestPauseServiceDoesNotExist (line 116) | func TestPauseServiceDoesNotExist(t *testing.T) {
  function urlForService (line 133) | func urlForService(t testing.TB, cli *CLI, service string, targetPort in...
  function publishedPortForService (line 141) | func publishedPortForService(t testing.TB, cli *CLI, service string, tar...

FILE: pkg/e2e/profiles_test.go
  constant profiledService (line 28) | profiledService = "profiled-service"
  constant regularService (line 29) | regularService  = "regular-service"
  function TestExplicitProfileUsage (line 32) | func TestExplicitProfileUsage(t *testing.T) {
  function TestNoProfileUsage (line 83) | func TestNoProfileUsage(t *testing.T) {
  function TestActiveProfileViaTargetedService (line 133) | func TestActiveProfileViaTargetedService(t *testing.T) {
  function TestDotEnvProfileUsage (line 189) | func TestDotEnvProfileUsage(t *testing.T) {

FILE: pkg/e2e/providers_test.go
  function TestDependsOnMultipleProviders (line 32) | func TestDependsOnMultipleProviders(t *testing.T) {
  function getEnv (line 50) | func getEnv(out string, run bool) []string {

FILE: pkg/e2e/ps_test.go
  function TestPs (line 31) | func TestPs(t *testing.T) {

FILE: pkg/e2e/publish_test.go
  function TestPublishChecks (line 28) | func TestPublishChecks(t *testing.T) {
  function TestPublish (line 128) | func TestPublish(t *testing.T) {

FILE: pkg/e2e/pull_test.go
  function TestComposePull (line 27) | func TestComposePull(t *testing.T) {

FILE: pkg/e2e/recreate_no_deps_test.go
  function TestRecreateWithNoDeps (line 25) | func TestRecreateWithNoDeps(t *testing.T) {

FILE: pkg/e2e/restart_test.go
  function assertServiceStatus (line 29) | func assertServiceStatus(t *testing.T, projectName, service, status stri...
  function TestRestart (line 36) | func TestRestart(t *testing.T) {
  function TestRestartWithDependencies (line 67) | func TestRestartWithDependencies(t *testing.T) {
  function TestRestartWithProfiles (line 101) | func TestRestartWithProfiles(t *testing.T) {

FILE: pkg/e2e/scale_test.go
  constant NO_STATE_TO_CHECK (line 28) | NO_STATE_TO_CHECK = ""
  function TestScaleBasicCases (line 30) | func TestScaleBasicCases(t *testing.T) {
  function TestScaleWithDepsCases (line 71) | func TestScaleWithDepsCases(t *testing.T) {
  function TestScaleUpAndDownPreserveContainerNumber (line 98) | func TestScaleUpAndDownPreserveContainerNumber(t *testing.T) {
  function TestScaleDownRemovesObsolete (line 132) | func TestScaleDownRemovesObsolete(t *testing.T) {
  function checkServiceContainer (line 170) | func checkServiceContainer(t *testing.T, stdout, containerName, containe...
  function TestScaleDownNoRecreate (line 188) | func TestScaleDownNoRecreate(t *testing.T) {

FILE: pkg/e2e/secrets_test.go
  function TestSecretFromEnv (line 25) | func TestSecretFromEnv(t *testing.T) {
  function TestSecretFromInclude (line 45) | func TestSecretFromInclude(t *testing.T) {

FILE: pkg/e2e/start_stop_test.go
  function TestStartStop (line 29) | func TestStartStop(t *testing.T) {
  function TestStartStopWithDependencies (line 81) | func TestStartStopWithDependencies(t *testing.T) {
  function TestStartStopWithOneOffs (line 132) | func TestStartStopWithOneOffs(t *testing.T) {
  function TestStartAlreadyRunning (line 183) | func TestStartAlreadyRunning(t *testing.T) {
  function TestStopAlreadyStopped (line 197) | func TestStopAlreadyStopped(t *testing.T) {
  function TestStartStopMultipleServices (line 220) | func TestStartStopMultipleServices(t *testing.T) {
  function TestStartSingleServiceAndDependency (line 246) | func TestStartSingleServiceAndDependency(t *testing.T) {
  function TestStartStopMultipleFiles (line 270) | func TestStartStopMultipleFiles(t *testing.T) {

FILE: pkg/e2e/up_test.go
  function TestUpServiceUnhealthy (line 38) | func TestUpServiceUnhealthy(t *testing.T) {
  function TestUpDependenciesNotStopped (line 48) | func TestUpDependenciesNotStopped(t *testing.T) {
  function TestUpWithBuildDependencies (line 110) | func TestUpWithBuildDependencies(t *testing.T) {
  function TestUpWithDependencyExit (line 129) | func TestUpWithDependencyExit(t *testing.T) {
  function TestScaleDoesntRecreate (line 144) | func TestScaleDoesntRecreate(t *testing.T) {
  function TestUpWithDependencyNotRequired (line 157) | func TestUpWithDependencyNotRequired(t *testing.T) {
  function TestUpWithAllResources (line 170) | func TestUpWithAllResources(t *testing.T) {
  function TestUpProfile (line 182) | func TestUpProfile(t *testing.T) {
  function TestUpImageID (line 195) | func TestUpImageID(t *testing.T) {
  function TestUpStopWithLogsMixed (line 210) | func TestUpStopWithLogsMixed(t *testing.T) {

FILE: pkg/e2e/volumes_test.go
  function TestLocalComposeVolume (line 32) | func TestLocalComposeVolume(t *testing.T) {
  function TestProjectVolumeBind (line 95) | func TestProjectVolumeBind(t *testing.T) {
  function TestUpSwitchVolumes (line 123) | func TestUpSwitchVolumes(t *testing.T) {
  function TestUpRecreateVolumes (line 145) | func TestUpRecreateVolumes(t *testing.T) {
  function TestUpRecreateVolumes_IgnoreBinds (line 162) | func TestUpRecreateVolumes_IgnoreBinds(t *testing.T) {
  function TestImageVolume (line 175) | func TestImageVolume(t *testing.T) {
  function TestImageVolumeRecreateOnRebuild (line 194) | func TestImageVolumeRecreateOnRebuild(t *testing.T) {

FILE: pkg/e2e/wait_test.go
  function TestWaitOnFaster (line 28) | func TestWaitOnFaster(t *testing.T) {
  function TestWaitOnSlower (line 42) | func TestWaitOnSlower(t *testing.T) {
  function TestWaitOnInfinity (line 56) | func TestWaitOnInfinity(t *testing.T) {
  function TestWaitAndDrop (line 91) | func TestWaitAndDrop(t *testing.T) {

FILE: pkg/e2e/watch_test.go
  function TestWatch (line 37) | func TestWatch(t *testing.T) {
  function TestRebuildOnDotEnvWithExternalNetwork (line 47) | func TestRebuildOnDotEnvWithExternalNetwork(t *testing.T) {
  function doTest (line 136) | func doTest(t *testing.T, svcName string) {
  function TestWatchExec (line 289) | func TestWatchExec(t *testing.T) {
  function TestWatchMultiServices (line 326) | func TestWatchMultiServices(t *testing.T) {
  function TestWatchIncludes (line 372) | func TestWatchIncludes(t *testing.T) {
  function TestCheckWarningXInitialSyn (line 409) | func TestCheckWarningXInitialSyn(t *testing.T) {

FILE: pkg/mocks/mock_docker_api.go
  type MockAPIClient (line 23) | type MockAPIClient struct
    method EXPECT (line 41) | func (m *MockAPIClient) EXPECT() *MockAPIClientMockRecorder {
    method BuildCachePrune (line 46) | func (m *MockAPIClient) BuildCachePrune(arg0 context.Context, arg1 cli...
    method BuildCancel (line 61) | func (m *MockAPIClient) BuildCancel(arg0 context.Context, arg1 string,...
    method CheckpointCreate (line 76) | func (m *MockAPIClient) CheckpointCreate(arg0 context.Context, arg1 st...
    method CheckpointList (line 91) | func (m *MockAPIClient) CheckpointList(arg0 context.Context, arg1 stri...
    method CheckpointRemove (line 106) | func (m *MockAPIClient) CheckpointRemove(arg0 context.Context, arg1 st...
    method ClientVersion (line 121) | func (m *MockAPIClient) ClientVersion() string {
    method Close (line 135) | func (m *MockAPIClient) Close() error {
    method ConfigCreate (line 149) | func (m *MockAPIClient) ConfigCreate(arg0 context.Context, arg1 client...
    method ConfigInspect (line 164) | func (m *MockAPIClient) ConfigInspect(arg0 context.Context, arg1 strin...
    method ConfigList (line 179) | func (m *MockAPIClient) ConfigList(arg0 context.Context, arg1 client.C...
    method ConfigRemove (line 194) | func (m *MockAPIClient) ConfigRemove(arg0 context.Context, arg1 string...
    method ConfigUpdate (line 209) | func (m *MockAPIClient) ConfigUpdate(arg0 context.Context, arg1 string...
    method ContainerAttach (line 224) | func (m *MockAPIClient) ContainerAttach(arg0 context.Context, arg1 str...
    method ContainerCommit (line 239) | func (m *MockAPIClient) ContainerCommit(arg0 context.Context, arg1 str...
    method ContainerCreate (line 254) | func (m *MockAPIClient) ContainerCreate(arg0 context.Context, arg1 cli...
    method ContainerDiff (line 269) | func (m *MockAPIClient) ContainerDiff(arg0 context.Context, arg1 strin...
    method ContainerExport (line 284) | func (m *MockAPIClient) ContainerExport(arg0 context.Context, arg1 str...
    method ContainerInspect (line 299) | func (m *MockAPIClient) ContainerInspect(arg0 context.Context, arg1 st...
    method ContainerKill (line 314) | func (m *MockAPIClient) ContainerKill(arg0 context.Context, arg1 strin...
    method ContainerList (line 329) | func (m *MockAPIClient) ContainerList(arg0 context.Context, arg1 clien...
    method ContainerLogs (line 344) | func (m *MockAPIClient) ContainerLogs(arg0 context.Context, arg1 strin...
    method ContainerPause (line 359) | func (m *MockAPIClient) ContainerPause(arg0 context.Context, arg1 stri...
    method ContainerPrune (line 374) | func (m *MockAPIClient) ContainerPrune(arg0 context.Context, arg1 clie...
    method ContainerRemove (line 389) | func (m *MockAPIClient) ContainerRemove(arg0 context.Context, arg1 str...
    method ContainerRename (line 404) | func (m *MockAPIClient) ContainerRename(arg0 context.Context, arg1 str...
    method ContainerResize (line 419) | func (m *MockAPIClient) ContainerResize(arg0 context.Context, arg1 str...
    method ContainerRestart (line 434) | func (m *MockAPIClient) ContainerRestart(arg0 context.Context, arg1 st...
    method ContainerStart (line 449) | func (m *MockAPIClient) ContainerStart(arg0 context.Context, arg1 stri...
    method ContainerStatPath (line 464) | func (m *MockAPIClient) ContainerStatPath(arg0 context.Context, arg1 s...
    method ContainerStats (line 479) | func (m *MockAPIClient) ContainerStats(arg0 context.Context, arg1 stri...
    method ContainerStop (line 494) | func (m *MockAPIClient) ContainerStop(arg0 context.Context, arg1 strin...
    method ContainerTop (line 509) | func (m *MockAPIClient) ContainerTop(arg0 context.Context, arg1 string...
    method ContainerUnpause (line 524) | func (m *MockAPIClient) ContainerUnpause(arg0 context.Context, arg1 st...
    method ContainerUpdate (line 539) | func (m *MockAPIClient) ContainerUpdate(arg0 context.Context, arg1 str...
    method ContainerWait (line 554) | func (m *MockAPIClient) ContainerWait(arg0 context.Context, arg1 strin...
    method CopyFromContainer (line 568) | func (m *MockAPIClient) CopyFromContainer(arg0 context.Context, arg1 s...
    method CopyToContainer (line 583) | func (m *MockAPIClient) CopyToContainer(arg0 context.Context, arg1 str...
    method DaemonHost (line 598) | func (m *MockAPIClient) DaemonHost() string {
    method DialHijack (line 612) | func (m *MockAPIClient) DialHijack(arg0 context.Context, arg1, arg2 st...
    method Dialer (line 627) | func (m *MockAPIClient) Dialer() func(context.Context) (net.Conn, erro...
    method DiskUsage (line 641) | func (m *MockAPIClient) DiskUsage(arg0 context.Context, arg1 client.Di...
    method DistributionInspect (line 656) | func (m *MockAPIClient) DistributionInspect(arg0 context.Context, arg1...
    method Events (line 671) | func (m *MockAPIClient) Events(arg0 context.Context, arg1 client.Event...
    method ExecAttach (line 685) | func (m *MockAPIClient) ExecAttach(arg0 context.Context, arg1 string, ...
    method ExecCreate (line 700) | func (m *MockAPIClient) ExecCreate(arg0 context.Context, arg1 string, ...
    method ExecInspect (line 715) | func (m *MockAPIClient) ExecInspect(arg0 context.Context, arg1 string,...
    method ExecResize (line 730) | func (m *MockAPIClient) ExecResize(arg0 context.Context, arg1 string, ...
    method ExecStart (line 745) | func (m *MockAPIClient) ExecStart(arg0 context.Context, arg1 string, a...
    method ImageBuild (line 760) | func (m *MockAPIClient) ImageBuild(arg0 context.Context, arg1 io.Reade...
    method ImageHistory (line 775) | func (m *MockAPIClient) ImageHistory(arg0 context.Context, arg1 string...
    method ImageImport (line 795) | func (m *MockAPIClient) ImageImport(arg0 context.Context, arg1 client....
    method ImageInspect (line 810) | func (m *MockAPIClient) ImageInspect(arg0 context.Context, arg1 string...
    method ImageList (line 830) | func (m *MockAPIClient) ImageList(arg0 context.Context, arg1 client.Im...
    method ImageLoad (line 845) | func (m *MockAPIClient) ImageLoad(arg0 context.Context, arg1 io.Reader...
    method ImagePrune (line 865) | func (m *MockAPIClient) ImagePrune(arg0 context.Context, arg1 client.I...
    method ImagePull (line 880) | func (m *MockAPIClient) ImagePull(arg0 context.Context, arg1 string, a...
    method ImagePush (line 895) | func (m *MockAPIClient) ImagePush(arg0 context.Context, arg1 string, a...
    method ImageRemove (line 910) | func (m *MockAPIClient) ImageRemove(arg0 context.Context, arg1 string,...
    method ImageSave (line 925) | func (m *MockAPIClient) ImageSave(arg0 context.Context, arg1 []string,...
    method ImageSearch (line 945) | func (m *MockAPIClient) ImageSearch(arg0 context.Context, arg1 string,...
    method ImageTag (line 960) | func (m *MockAPIClient) ImageTag(arg0 context.Context, arg1 client.Ima...
    method Info (line 975) | func (m *MockAPIClient) Info(arg0 context.Context, arg1 client.InfoOpt...
    method NetworkConnect (line 990) | func (m *MockAPIClient) NetworkConnect(arg0 context.Context, arg1 stri...
    method NetworkCreate (line 1005) | func (m *MockAPIClient) NetworkCreate(arg0 context.Context, arg1 strin...
    method NetworkDisconnect (line 1020) | func (m *MockAPIClient) NetworkDisconnect(arg0 context.Context, arg1 s...
    method NetworkInspect (line 1035) | func (m *MockAPIClient) NetworkInspect(arg0 context.Context, arg1 stri...
    method NetworkList (line 1050) | func (m *MockAPIClient) NetworkList(arg0 context.Context, arg1 client....
    method NetworkPrune (line 1065) | func (m *MockAPIClient) NetworkPrune(arg0 context.Context, arg1 client...
    method NetworkRemove (line 1080) | func (m *MockAPIClient) NetworkRemove(arg0 context.Context, arg1 strin...
    method NodeInspect (line 1095) | func (m *MockAPIClient) NodeInspect(arg0 context.Context, arg1 string,...
    method NodeList (line 1110) | func (m *MockAPIClient) NodeList(arg0 context.Context, arg1 client.Nod...
    method NodeRemove (line 1125) | func (m *MockAPIClient) NodeRemove(arg0 context.Context, arg1 string, ...
    method NodeUpdate (line 1140) | func (m *MockAPIClient) NodeUpdate(arg0 context.Context, arg1 string, ...
    method Ping (line 1155) | func (m *MockAPIClient) Ping(arg0 context.Context, arg1 client.PingOpt...
    method PluginCreate (line 1170) | func (m *MockAPIClient) PluginCreate(arg0 context.Context, arg1 io.Rea...
    method PluginDisable (line 1185) | func (m *MockAPIClient) PluginDisable(arg0 context.Context, arg1 strin...
    method PluginEnable (line 1200) | func (m *MockAPIClient) PluginEnable(arg0 context.Context, arg1 string...
    method PluginInspect (line 1215) | func (m *MockAPIClient) PluginInspect(arg0 context.Context, arg1 strin...
    method PluginInstall (line 1230) | func (m *MockAPIClient) PluginInstall(arg0 context.Context, arg1 strin...
    method PluginList (line 1245) | func (m *MockAPIClient) PluginList(arg0 context.Context, arg1 client.P...
    method PluginPush (line 1260) | func (m *MockAPIClient) PluginPush(arg0 context.Context, arg1 string, ...
    method PluginRemove (line 1275) | func (m *MockAPIClient) PluginRemove(arg0 context.Context, arg1 string...
    method PluginSet (line 1290) | func (m *MockAPIClient) PluginSet(arg0 context.Context, arg1 string, a...
    method PluginUpgrade (line 1305) | func (m *MockAPIClient) PluginUpgrade(arg0 context.Context, arg1 strin...
    method RegistryLogin (line 1320) | func (m *MockAPIClient) RegistryLogin(arg0 context.Context, arg1 clien...
    method SecretCreate (line 1335) | func (m *MockAPIClient) SecretCreate(arg0 context.Context, arg1 client...
    method SecretInspect (line 1350) | func (m *MockAPIClient) SecretInspect(arg0 context.Context, arg1 strin...
    method SecretList (line 1365) | func (m *MockAPIClient) SecretList(arg0 context.Context, arg1 client.S...
    method SecretRemove (line 1380) | func (m *MockAPIClient) SecretRemove(arg0 context.Context, arg1 string...
    method SecretUpdate (line 1395) | func (m *MockAPIClient) SecretUpdate(arg0 context.Context, arg1 string...
    method ServerVersion (line 1410) | func (m *MockAPIClient) ServerVersion(arg0 context.Context, arg1 clien...
    method ServiceCreate (line 1425) | func (m *MockAPIClient) ServiceCreate(arg0 context.Context, arg1 clien...
    method ServiceInspect (line 1440) | func (m *MockAPIClient) ServiceInspect(arg0 context.Context, arg1 stri...
    method ServiceList (line 1455) | func (m *MockAPIClient) ServiceList(arg0 context.Context, arg1 client....
    method ServiceLogs (line 1470) | func (m *MockAPIClient) ServiceLogs(arg0 context.Context, arg1 string,...
    method ServiceRemove (line 1485) | func (m *MockAPIClient) ServiceRemove(arg0 context.Context, arg1 strin...
    method ServiceUpdate (line 1500) | func (m *MockAPIClient) ServiceUpdate(arg0 context.Context, arg1 strin...
    method SwarmGetUnlockKey (line 1515) | func (m *MockAPIClient) SwarmGetUnlockKey(arg0 context.Context) (clien...
    method SwarmInit (line 1530) | func (m *MockAPIClient) SwarmInit(arg0 context.Context, arg1 client.Sw...
    method SwarmInspect (line 1545) | func (m *MockAPIClient) SwarmInspect(arg0 context.Context, arg1 client...
    method SwarmJoin (line 1560) | func (m *MockAPIClient) SwarmJoin(arg0 context.Context, arg1 client.Sw...
    method SwarmLeave (line 1575) | func (m *MockAPIClient) SwarmLeave(arg0 context.Context, arg1 client.S...
    method SwarmUnlock (line 1590) | func (m *MockAPIClient) SwarmUnlock(arg0 context.Context, arg1 client....
    method SwarmUpdate (line 1605) | func (m *MockAPIClient) SwarmUpdate(arg0 context.Context, arg1 client....
    method TaskInspect (line 1620) | func (m *MockAPIClient) TaskInspect(arg0 context.Context, arg1 string,...
    method TaskList (line 1635) | func (m *MockAPIClient) TaskList(arg0 context.Context, arg1 client.Tas...
    method TaskLogs (line 1650) | func (m *MockAPIClient) TaskLogs(arg0 context.Context, arg1 string, ar...
    method VolumeCreate (line 1665) | func (m *MockAPIClient) VolumeCreate(arg0 context.Context, arg1 client...
    method VolumeInspect (line 1680) | func (m *MockAPIClient) VolumeInspect(arg0 context.Context, arg1 strin...
    method VolumeList (line 1695) | func (m *MockAPIClient) VolumeList(arg0 context.Context, arg1 client.V...
    method VolumePrune (line 1710) | func (m *MockAPIClient) VolumePrune(arg0 context.Context, arg1 client....
    method VolumeRemove (line 1725) | func (m *MockAPIClient) VolumeRemove(arg0 context.Context, arg1 string...
    method VolumeUpdate (line 1740) | func (m *MockAPIClient) VolumeUpdate(arg0 context.Context, arg1 string...
  type MockAPIClientMockRecorder (line 29) | type MockAPIClientMockRecorder struct
    method BuildCachePrune (line 55) | func (mr *MockAPIClientMockRecorder) BuildCachePrune(arg0, arg1 any) *...
    method BuildCancel (line 70) | func (mr *MockAPIClientMockRecorder) BuildCancel(arg0, arg1, arg2 any)...
    method CheckpointCreate (line 85) | func (mr *MockAPIClientMockRecorder) CheckpointCreate(arg0, arg1, arg2...
    method CheckpointList (line 100) | func (mr *MockAPIClientMockRecorder) CheckpointList(arg0, arg1, arg2 a...
    method CheckpointRemove (line 115) | func (mr *MockAPIClientMockRecorder) CheckpointRemove(arg0, arg1, arg2...
    method ClientVersion (line 129) | func (mr *MockAPIClientMockRecorder) ClientVersion() *gomock.Call {
    method Close (line 143) | func (mr *MockAPIClientMockRecorder) Close() *gomock.Call {
    method ConfigCreate (line 158) | func (mr *MockAPIClientMockRecorder) ConfigCreate(arg0, arg1 any) *gom...
    method ConfigInspect (line 173) | func (mr *MockAPIClientMockRecorder) ConfigInspect(arg0, arg1, arg2 an...
    method ConfigList (line 188) | func (mr *MockAPIClientMockRecorder) ConfigList(arg0, arg1 any) *gomoc...
    method ConfigRemove (line 203) | func (mr *MockAPIClientMockRecorder) ConfigRemove(arg0, arg1, arg2 any...
    method ConfigUpdate (line 218) | func (mr *MockAPIClientMockRecorder) ConfigUpdate(arg0, arg1, arg2 any...
    method ContainerAttach (line 233) | func (mr *MockAPIClientMockRecorder) ContainerAttach(arg0, arg1, arg2 ...
    method ContainerCommit (line 248) | func (mr *MockAPIClientMockRecorder) ContainerCommit(arg0, arg1, arg2 ...
    method ContainerCreate (line 263) | func (mr *MockAPIClientMockRecorder) ContainerCreate(arg0, arg1 any) *...
    method ContainerDiff (line 278) | func (mr *MockAPIClientMockRecorder) ContainerDiff(arg0, arg1, arg2 an...
    method ContainerExport (line 293) | func (mr *MockAPIClientMockRecorder) ContainerExport(arg0, arg1, arg2 ...
    method ContainerInspect (line 308) | func (mr *MockAPIClientMockRecorder) ContainerInspect(arg0, arg1, arg2...
    method ContainerKill (line 323) | func (mr *MockAPIClientMockRecorder) ContainerKill(arg0, arg1, arg2 an...
    method ContainerList (line 338) | func (mr *MockAPIClientMockRecorder) ContainerList(arg0, arg1 any) *go...
    method ContainerLogs (line 353) | func (mr *MockAPIClientMockRecorder) ContainerLogs(arg0, arg1, arg2 an...
    method ContainerPause (line 368) | func (mr *MockAPIClientMockRecorder) ContainerPause(arg0, arg1, arg2 a...
    method ContainerPrune (line 383) | func (mr *MockAPIClientMockRecorder) ContainerPrune(arg0, arg1 any) *g...
    method ContainerRemove (line 398) | func (mr *MockAPIClientMockRecorder) ContainerRemove(arg0, arg1, arg2 ...
    method ContainerRename (line 413) | func (mr *MockAPIClientMockRecorder) ContainerRename(arg0, arg1, arg2 ...
    method ContainerResize (line 428) | func (mr *MockAPIClientMockRecorder) ContainerResize(arg0, arg1, arg2 ...
    method ContainerRestart (line 443) | func (mr *MockAPIClientMockRecorder) ContainerRestart(arg0, arg1, arg2...
    method ContainerStart (line 458) | func (mr *MockAPIClientMockRecorder) ContainerStart(arg0, arg1, arg2 a...
    method ContainerStatPath (line 473) | func (mr *MockAPIClientMockRecorder) ContainerStatPath(arg0, arg1, arg...
    method ContainerStats (line 488) | func (mr *MockAPIClientMockRecorder) ContainerStats(arg0, arg1, arg2 a...
    method ContainerStop (line 503) | func (mr *MockAPIClientMockRecorder) ContainerStop(arg0, arg1, arg2 an...
    method ContainerTop (line 518) | func (mr *MockAPIClientMockRecorder) ContainerTop(arg0, arg1, arg2 any...
    method ContainerUnpause (line 533) | func (mr *MockAPIClientMockRecorder) ContainerUnpause(arg0, arg1, arg2...
    method ContainerUpdate (line 548) | func (mr *MockAPIClientMockRecorder) ContainerUpdate(arg0, arg1, arg2 ...
    method ContainerWait (line 562) | func (mr *MockAPIClientMockRecorder) ContainerWait(arg0, arg1, arg2 an...
    method CopyFromContainer (line 577) | func (mr *MockAPIClientMockRecorder) CopyFromContainer(arg0, arg1, arg...
    method CopyToContainer (line 592) | func (mr *MockAPIClientMockRecorder) CopyToContainer(arg0, arg1, arg2 ...
    method DaemonHost (line 606) | func (mr *MockAPIClientMockRecorder) DaemonHost() *gomock.Call {
    method DialHijack (line 621) | func (mr *MockAPIClientMockRecorder) DialHijack(arg0, arg1, arg2, arg3...
    method Dialer (line 635) | func (mr *MockAPIClientMockRecorder) Dialer() *gomock.Call {
    method DiskUsage (line 650) | func (mr *MockAPIClientMockRecorder) DiskUsage(arg0, arg1 any) *gomock...
    method DistributionInspect (line 665) | func (mr *MockAPIClientMockRecorder) DistributionInspect(arg0, arg1, a...
    method Events (line 679) | func (mr *MockAPIClientMockRecorder) Events(arg0, arg1 any) *gomock.Ca...
    method ExecAttach (line 694) | func (mr *MockAPIClientMockRecorder) ExecAttach(arg0, arg1, arg2 any) ...
    method ExecCreate (line 709) | func (mr *MockAPIClientMockRecorder) ExecCreate(arg0, arg1, arg2 any) ...
    method ExecInspect (line 724) | func (mr *MockAPIClientMockRecorder) ExecInspect(arg0, arg1, arg2 any)...
    method ExecResize (line 739) | func (mr *MockAPIClientMockRecorder) ExecResize(arg0, arg1, arg2 any) ...
    method ExecStart (line 754) | func (mr *MockAPIClientMockRecorder) ExecStart(arg0, arg1, arg2 any) *...
    method ImageBuild (line 769) | func (mr *MockAPIClientMockRecorder) ImageBuild(arg0, arg1, arg2 any) ...
    method ImageHistory (line 788) | func (mr *MockAPIClientMockRecorder) ImageHistory(arg0, arg1 any, arg2...
    method ImageImport (line 804) | func (mr *MockAPIClientMockRecorder) ImageImport(arg0, arg1, arg2, arg...
    method ImageInspect (line 823) | func (mr *MockAPIClientMockRecorder) ImageInspect(arg0, arg1 any, arg2...
    method ImageList (line 839) | func (mr *MockAPIClientMockRecorder) ImageList(arg0, arg1 any) *gomock...
    method ImageLoad (line 858) | func (mr *MockAPIClientMockRecorder) ImageLoad(arg0, arg1 any, arg2 .....
    method ImagePrune (line 874) | func (mr *MockAPIClientMockRecorder) ImagePrune(arg0, arg1 any) *gomoc...
    method ImagePull (line 889) | func (mr *MockAPIClientMockRecorder) ImagePull(arg0, arg1, arg2 any) *...
    method ImagePush (line 904) | func (mr *MockAPIClientMockRecorder) ImagePush(arg0, arg1, arg2 any) *...
    method ImageRemove (line 919) | func (mr *MockAPIClientMockRecorder) ImageRemove(arg0, arg1, arg2 any)...
    method ImageSave (line 938) | func (mr *MockAPIClientMockRecorder) ImageSave(arg0, arg1 any, arg2 .....
    method ImageSearch (line 954) | func (mr *MockAPIClientMockRecorder) ImageSearch(arg0, arg1, arg2 any)...
    method ImageTag (line 969) | func (mr *MockAPIClientMockRecorder) ImageTag(arg0, arg1 any) *gomock....
    method Info (line 984) | func (mr *MockAPIClientMockRecorder) Info(arg0, arg1 any) *gomock.Call {
    method NetworkConnect (line 999) | func (mr *MockAPIClientMockRecorder) NetworkConnect(arg0, arg1, arg2 a...
    method NetworkCreate (line 1014) | func (mr *MockAPIClientMockRecorder) NetworkCreate(arg0, arg1, arg2 an...
    method NetworkDisconnect (line 1029) | func (mr *MockAPIClientMockRecorder) NetworkDisconnect(arg0, arg1, arg...
    method NetworkInspect (line 1044) | func (mr *MockAPIClientMockRecorder) NetworkInspect(arg0, arg1, arg2 a...
    method NetworkList (line 1059) | func (mr *MockAPIClientMockRecorder) NetworkList(arg0, arg1 any) *gomo...
    method NetworkPrune (line 1074) | func (mr *MockAPIClientMockRecorder) NetworkPrune(arg0, arg1 any) *gom...
    method NetworkRemove (line 1089) | func (mr *MockAPIClientMockRecorder) NetworkRemove(arg0, arg1, arg2 an...
    method NodeInspect (line 1104) | func (mr *MockAPIClientMockRecorder) NodeInspect(arg0, arg1, arg2 any)...
    method NodeList (line 1119) | func (mr *MockAPIClientMockRecorder) NodeList(arg0, arg1 any) *gomock....
    method NodeRemove (line 1134) | func (mr *MockAPIClientMockRecorder) NodeRemove(arg0, arg1, arg2 any) ...
    method NodeUpdate (line 1149) | func (mr *MockAPIClientMockRecorder) NodeUpdate(arg0, arg1, arg2 any) ...
    method Ping (line 1164) | func (mr *MockAPIClientMockRecorder) Ping(arg0, arg1 any) *gomock.Call {
    method PluginCreate (line 1179) | func (mr *MockAPIClientMockRecorder) PluginCreate(arg0, arg1, arg2 any...
    method PluginDisable (line 1194) | func (mr *MockAPIClientMockRecorder) PluginDisable(arg0, arg1, arg2 an...
    method PluginEnable (line 1209) | func (mr *MockAPIClientMockRecorder) PluginEnable(arg0, arg1, arg2 any...
    method PluginInspect (line 1224) | func (mr *MockAPIClientMockRecorder) PluginInspect(arg0, arg1, arg2 an...
    method PluginInstall (line 1239) | func (mr *MockAPIClientMockRecorder) PluginInstall(arg0, arg1, arg2 an...
    method PluginList (line 1254) | func (mr *MockAPIClientMockRecorder) PluginList(arg0, arg1 any) *gomoc...
    method PluginPush (line 1269) | func (mr *MockAPIClientMockRecorder) PluginPush(arg0, arg1, arg2 any) ...
    method PluginRemove (line 1284) | func (mr *MockAPIClientMockRecorder) PluginRemove(arg0, arg1, arg2 any...
    method PluginSet (line 1299) | func (mr *MockAPIClientMockRecorder) PluginSet(arg0, arg1, arg2 any) *...
    method PluginUpgrade (line 1314) | func (mr *MockAPIClientMockRecorder) PluginUpgrade(arg0, arg1, arg2 an...
    method RegistryLogin (line 1329) | func (mr *MockAPIClientMockRecorder) RegistryLogin(arg0, arg1 any) *go...
    method SecretCreate (line 1344) | func (mr *MockAPIClientMockRecorder) SecretCreate(arg0, arg1 any) *gom...
    method SecretInspect (line 1359) | func (mr *MockAPIClientMockRecorder) SecretInspect(arg0, arg1, arg2 an...
    method SecretList (line 1374) | func (mr *MockAPIClientMockRecorder) SecretList(arg0, arg1 any) *gomoc...
    method SecretRemove (line 1389) | func (mr *MockAPIClientMockRecorder) SecretRemove(arg0, arg1, arg2 any...
    method SecretUpdate (line 1404) | func (mr *MockAPIClientMockRecorder) SecretUpdate(arg0, arg1, arg2 any...
    method ServerVersion (line 1419) | func (mr *MockAPIClientMockRecorder) ServerVersion(arg0, arg1 any) *go...
    method ServiceCreate (line 1434) | func (mr *MockAPIClientMockRecorder) ServiceCreate(arg0, arg1 any) *go...
    method ServiceInspect (line 1449) | func (mr *MockAPIClientMockRecorder) ServiceInspect(arg0, arg1, arg2 a...
    method ServiceList (line 1464) | func (mr *MockAPIClientMockRecorder) ServiceList(arg0, arg1 any) *gomo...
    method ServiceLogs (line 1479) | func (mr *MockAPIClientMockRecorder) ServiceLogs(arg0, arg1, arg2 any)...
    method ServiceRemove (line 1494) | func (mr *MockAPIClientMockRecorder) ServiceRemove(arg0, arg1, arg2 an...
    method ServiceUpdate (line 1509) | func (mr *MockAPIClientMockRecorder) ServiceUpdate(arg0, arg1, arg2 an...
    method SwarmGetUnlockKey (line 1524) | func (mr *MockAPIClientMockRecorder) SwarmGetUnlockKey(arg0 any) *gomo...
    method SwarmInit (line 1539) | func (mr *MockAPIClientMockRecorder) SwarmInit(arg0, arg1 any) *gomock...
    method SwarmInspect (line 1554) | func (mr *MockAPIClientMockRecorder) SwarmInspect(arg0, arg1 any) *gom...
    method SwarmJoin (line 1569) | func (mr *MockAPIClientMockRecorder) SwarmJoin(arg0, arg1 any) *gomock...
    method SwarmLeave (line 1584) | func (mr *MockAPIClientMockRecorder) SwarmLeave(arg0, arg1 any) *gomoc...
    method SwarmUnlock (line 1599) | func (mr *MockAPIClientMockRecorder) SwarmUnlock(arg0, arg1 any) *gomo...
    method SwarmUpdate (line 1614) | func (mr *MockAPIClientMockRecorder) SwarmUpdate(arg0, arg1 any) *gomo...
    method TaskInspect (line 1629) | func (mr *MockAPIClientMockRecorder) TaskInspect(arg0, arg1, arg2 any)...
    method TaskList (line 1644) | func (mr *MockAPIClientMockRecorder) TaskList(arg0, arg1 any) *gomock....
    method TaskLogs (line 1659) | func (mr *MockAPIClientMockRecorder) TaskLogs(arg0, arg1, arg2 any) *g...
    method VolumeCreate (line 1674) | func (mr *MockAPIClientMockRecorder) VolumeCreate(arg0, arg1 any) *gom...
    method VolumeInspect (line 1689) | func (mr *MockAPIClientMockRecorder) VolumeInspect(arg0, arg1, arg2 an...
    method VolumeList (line 1704) | func (mr *MockAPIClientMockRecorder) VolumeList(arg0, arg1 any) *gomoc...
    method VolumePrune (line 1719) | func (mr *MockAPIClientMockRecorder) VolumePrune(arg0, arg1 any) *gomo...
    method VolumeRemove (line 1734) | func (mr *MockAPIClientMockRecorder) VolumeRemove(arg0, arg1, arg2 any...
    method VolumeUpdate (line 1749) | func (mr *MockAPIClientMockRecorder) VolumeUpdate(arg0, arg1, arg2 any...
  function NewMockAPIClient (line 34) | func NewMockAPIClient(ctrl *gomock.Controller) *MockAPIClient {

FILE: pkg/mocks/mock_docker_cli.go
  type MockCli (line 28) | type MockCli struct
    method EXPECT (line 46) | func (m *MockCli) EXPECT() *MockCliMockRecorder {
    method BuildKitEnabled (line 51) | func (m *MockCli) BuildKitEnabled() (bool, error) {
    method Client (line 66) | func (m *MockCli) Client() client.APIClient {
    method ConfigFile (line 80) | func (m *MockCli) ConfigFile() *configfile.ConfigFile {
    method ContextStore (line 94) | func (m *MockCli) ContextStore() store.Store {
    method CurrentContext (line 108) | func (m *MockCli) CurrentContext() string {
    method CurrentVersion (line 122) | func (m *MockCli) CurrentVersion() string {
    method DockerEndpoint (line 136) | func (m *MockCli) DockerEndpoint() docker.Endpoint {
    method Err (line 150) | func (m *MockCli) Err() *streams.Out {
    method In (line 164) | func (m *MockCli) In() *streams.In {
    method MeterProvider (line 178) | func (m *MockCli) MeterProvider() metric.MeterProvider {
    method Out (line 192) | func (m *MockCli) Out() *streams.Out {
    method Resource (line 206) | func (m *MockCli) Resource() *resource.Resource {
    method ServerInfo (line 220) | func (m *MockCli) ServerInfo() command.ServerInfo {
    method SetIn (line 234) | func (m *MockCli) SetIn(arg0 *streams.In) {
    method TracerProvider (line 246) | func (m *MockCli) TracerProvider() trace.TracerProvider {
  type MockCliMockRecorder (line 34) | type MockCliMockRecorder struct
    method BuildKitEnabled (line 60) | func (mr *MockCliMockRecorder) BuildKitEnabled() *gomock.Call {
    method Client (line 74) | func (mr *MockCliMockRecorder) Client() *gomock.Call {
    method ConfigFile (line 88) | func (mr *MockCliMockRecorder) ConfigFile() *gomock.Call {
    method ContextStore (line 102) | func (mr *MockCliMockRecorder) ContextStore() *gomock.Call {
    method CurrentContext (line 116) | func (mr *MockCliMockRecorder) CurrentContext() *gomock.Call {
    method CurrentVersion (line 130) | func (mr *MockCliMockRecorder) CurrentVersion() *gomock.Call {
    method DockerEndpoint (line 144) | func (mr *MockCliMockRecorder) DockerEndpoint() *gomock.Call {
    method Err (line 158) | func (mr *MockCliMockRecorder) Err() *gomock.Call {
    method In (line 172) | func (mr *MockCliMockRecorder) In() *gomock.Call {
    method MeterProvider (line 186) | func (mr *MockCliMockRecorder) MeterProvider() *gomock.Call {
    method Out (line 200) | func (mr *MockCliMockRecorder) Out() *gomock.Call {
    method Resource (line 214) | func (mr *MockCliMockRecorder) Resource() *gomock.Call {
    method ServerInfo (line 228) | func (mr *MockCliMockRecorder) ServerInfo() *gomock.Call {
    method SetIn (line 240) | func (mr *MockCliMockRecorder) SetIn(arg0 any) *gomock.Call {
    method TracerProvider (line 254) | func (mr *MockCliMockRecorder) TracerProvider() *gomock.Call {
  function NewMockCli (line 39) | func NewMockCli(ctrl *gomock.Controller) *MockCli {

FILE: pkg/mocks/mock_docker_compose_api.go
  type MockCompose (line 22) | type MockCompose struct
    method EXPECT (line 40) | func (m *MockCompose) EXPECT() *MockComposeMockRecorder {
    method Attach (line 45) | func (m *MockCompose) Attach(ctx context.Context, projectName string, ...
    method Build (line 59) | func (m *MockCompose) Build(ctx context.Context, project *types.Projec...
    method Commit (line 73) | func (m *MockCompose) Commit(ctx context.Context, projectName string, ...
    method Copy (line 87) | func (m *MockCompose) Copy(ctx context.Context, projectName string, op...
    method Create (line 101) | func (m *MockCompose) Create(ctx context.Context, project *types.Proje...
    method Down (line 115) | func (m *MockCompose) Down(ctx context.Context, projectName string, op...
    method Events (line 129) | func (m *MockCompose) Events(ctx context.Context, projectName string, ...
    method Exec (line 143) | func (m *MockCompose) Exec(ctx context.Context, projectName string, op...
    method Export (line 158) | func (m *MockCompose) Export(ctx context.Context, projectName string, ...
    method Generate (line 172) | func (m *MockCompose) Generate(ctx context.Context, options api.Genera...
    method Images (line 187) | func (m *MockCompose) Images(ctx context.Context, projectName string, ...
    method Kill (line 202) | func (m *MockCompose) Kill(ctx context.Context, projectName string, op...
    method List (line 216) | func (m *MockCompose) List(ctx context.Context, options api.ListOption...
    method LoadProject (line 231) | func (m *MockCompose) LoadProject(ctx context.Context, options api.Pro...
    method Logs (line 246) | func (m *MockCompose) Logs(ctx context.Context, projectName string, co...
    method Pause (line 260) | func (m *MockCompose) Pause(ctx context.Context, projectName string, o...
    method Port (line 274) | func (m *MockCompose) Port(ctx context.Context, projectName, service s...
    method Ps (line 290) | func (m *MockCompose) Ps(ctx context.Context, projectName string, opti...
    method Publish (line 305) | func (m *MockCompose) Publish(ctx context.Context, project *types.Proj...
    method Pull (line 319) | func (m *MockCompose) Pull(ctx context.Context, project *types.Project...
    method Push (line 333) | func (m *MockCompose) Push(ctx context.Context, project *types.Project...
    method Remove (line 347) | func (m *MockCompose) Remove(ctx context.Context, projectName string, ...
    method Restart (line 361) | func (m *MockCompose) Restart(ctx context.Context, projectName string,...
    method RunOneOffContainer (line 375) | func (m *MockCompose) RunOneOffContainer(ctx context.Context, project ...
    method Scale (line 390) | func (m *MockCompose) Scale(ctx context.Context, project *types.Projec...
    method Start (line 404) | func (m *MockCompose) Start(ctx context.Context, projectName string, o...
    method Stop (line 418) | func (m *MockCompose) Stop(ctx context.Context, projectName string, op...
    method Top (line 432) | func (m *MockCompose) Top(ctx context.Context, projectName string, ser...
    method UnPause (line 447) | func (m *MockCompose) UnPause(ctx context.Context, projectName string,...
    method Up (line 461) | func (m *MockCompose) Up(ctx context.Context, project *types.Project, ...
    method Viz (line 475) | func (m *MockCompose) Viz(ctx context.Context, project *types.Project,...
    method Volumes (line 490) | func (m *MockCompose) Volumes(ctx context.Context, project string, opt...
    method Wait (line 505) | func (m *MockCompose) Wait(ctx context.Context, projectName string, op...
    method Watch (line 520) | func (m *MockCompose) Watch(ctx context.Context, project *types.Projec...
  type MockComposeMockRecorder (line 28) | type MockComposeMockRecorder struct
    method Attach (line 53) | func (mr *MockComposeMockRecorder) Attach(ctx, projectName, options an...
    method Build (line 67) | func (mr *MockComposeMockRecorder) Build(ctx, project, options any) *g...
    method Commit (line 81) | func (mr *MockComposeMockRecorder) Commit(ctx, projectName, options an...
    method Copy (line 95) | func (mr *MockComposeMockRecorder) Copy(ctx, projectName, options any)...
    method Create (line 109) | func (mr *MockComposeMockRecorder) Create(ctx, project, options any) *...
    method Down (line 123) | func (mr *MockComposeMockRecorder) Down(ctx, projectName, options any)...
    method Events (line 137) | func (mr *MockComposeMockRecorder) Events(ctx, projectName, options an...
    method Exec (line 152) | func (mr *MockComposeMockRecorder) Exec(ctx, projectName, options any)...
    method Export (line 166) | func (mr *MockComposeMockRecorder) Export(ctx, projectName, options an...
    method Generate (line 181) | func (mr *MockComposeMockRecorder) Generate(ctx, options any) *gomock....
    method Images (line 196) | func (mr *MockComposeMockRecorder) Images(ctx, projectName, options an...
    method Kill (line 210) | func (mr *MockComposeMockRecorder) Kill(ctx, projectName, options any)...
    method List (line 225) | func (mr *MockComposeMockRecorder) List(ctx, options any) *gomock.Call {
    method LoadProject (line 240) | func (mr *MockComposeMockRecorder) LoadProject(ctx, options any) *gomo...
    method Logs (line 254) | func (mr *MockComposeMockRecorder) Logs(ctx, projectName, consumer, op...
    method Pause (line 268) | func (mr *MockComposeMockRecorder) Pause(ctx, projectName, options any...
    method Port (line 284) | func (mr *MockComposeMockRecorder) Port(ctx, projectName, service, por...
    method Ps (line 299) | func (mr *MockComposeMockRecorder) Ps(ctx, projectName, options any) *...
    method Publish (line 313) | func (mr *MockComposeMockRecorder) Publish(ctx, project, repository, o...
    method Pull (line 327) | func (mr *MockComposeMockRecorder) Pull(ctx, project, options any) *go...
    method Push (line 341) | func (mr *MockComposeMockRecorder) Push(ctx, project, options any) *go...
    method Remove (line 355) | func (mr *MockComposeMockRecorder) Remove(ctx, projectName, options an...
    method Restart (line 369) | func (mr *MockComposeMockRecorder) Restart(ctx, projectName, options a...
    method RunOneOffContainer (line 384) | func (mr *MockComposeMockRecorder) RunOneOffContainer(ctx, project, op...
    method Scale (line 398) | func (mr *MockComposeMockRecorder) Scale(ctx, project, options any) *g...
    method Start (line 412) | func (mr *MockComposeMockRecorder) Start(ctx, projectName, options any...
    method Stop (line 426) | func (mr *MockComposeMockRecorder) Stop(ctx, projectName, options any)...
    method Top (line 441) | func (mr *MockComposeMockRecorder) Top(ctx, projectName, services any)...
    method UnPause (line 455) | func (mr *MockComposeMockRecorder) UnPause(ctx, projectName, options a...
    method Up (line 469) | func (mr *MockComposeMockRecorder) Up(ctx, project, options any) *gomo...
    method Viz (line 484) | func (mr *MockComposeMockRecorder) Viz(ctx, project, options any) *gom...
    method Volumes (line 499) | func (mr *MockComposeMockRecorder) Volumes(ctx, project, options any) ...
    method Wait (line 514) | func (mr *MockComposeMockRecorder) Wait(ctx, projectName, options any)...
    method Watch (line 528) | func (mr *MockComposeMockRecorder) Watch(ctx, project, options any) *g...
  function NewMockCompose (line 33) | func NewMockCompose(ctrl *gomock.Controller) *MockCompose {
  type MockLogConsumer (line 534) | type MockLogConsumer struct
    method EXPECT (line 552) | func (m *MockLogConsumer) EXPECT() *MockLogConsumerMockRecorder {
    method Err (line 557) | func (m *MockLogConsumer) Err(containerName, message string) {
    method Log (line 569) | func (m *MockLogConsumer) Log(containerName, message string) {
    method Status (line 581) | func (m *MockLogConsumer) Status(container, msg string) {
  type MockLogConsumerMockRecorder (line 540) | type MockLogConsumerMockRecorder struct
    method Err (line 563) | func (mr *MockLogConsumerMockRecorder) Err(containerName, message any)...
    method Log (line 575) | func (mr *MockLogConsumerMockRecorder) Log(containerName, message any)...
    method Status (line 587) | func (mr *MockLogConsumerMockRecorder) Status(container, msg any) *gom...
  function NewMockLogConsumer (line 545) | func NewMockLogConsumer(ctrl *gomock.Controller) *MockLogConsumer {

FILE: pkg/remote/cache.go
  function cacheDir (line 24) | func cacheDir() (string, error) {

FILE: pkg/remote/cache_darwin.go
  function osDependentCacheDir (line 28) | func osDependentCacheDir() (string, error) {

FILE: pkg/remote/cache_unix.go
  function osDependentCacheDir (line 30) | func osDependentCacheDir() (string, error) {

FILE: pkg/remote/cache_windows.go
  function osDependentCacheDir (line 30) | func osDependentCacheDir() (string, error) {

FILE: pkg/remote/git.go
  constant GIT_REMOTE_ENABLED (line 41) | GIT_REMOTE_ENABLED = "COMPOSE_EXPERIMENTAL_GIT_REMOTE"
  function gitRemoteLoaderEnabled (line 43) | func gitRemoteLoaderEnabled() (bool, error) {
  function NewGitRemoteLoader (line 54) | func NewGitRemoteLoader(dockerCli command.Cli, offline bool) loader.Reso...
  type gitRemoteLoader (line 62) | type gitRemoteLoader struct
    method Accept (line 68) | func (g gitRemoteLoader) Accept(path string) bool {
    method Load (line 75) | func (g gitRemoteLoader) Load(ctx context.Context, path string) (strin...
    method Dir (line 133) | func (g gitRemoteLoader) Dir(path string) string {
    method resolveGitRef (line 172) | func (g gitRemoteLoader) resolveGitRef(ctx context.Context, path strin...
    method checkout (line 195) | func (g gitRemoteLoader) checkout(ctx context.Context, path string, re...
    method run (line 230) | func (g gitRemoteLoader) run(cmd *exec.Cmd) error {
    method gitCommandEnv (line 243) | func (g gitRemoteLoader) gitCommandEnv() []string {
  function validateGitSubDir (line 140) | func validateGitSubDir(base, subDir string) error {
  function findFile (line 257) | func findFile(names []string, pwd string) (string, error) {

FILE: pkg/remote/git_test.go
  function TestValidateGitSubDir (line 25) | func TestValidateGitSubDir(t *testing.T) {
  function TestValidateGitSubDirSecurityScenarios (line 152) | func TestValidateGitSubDirSecurityScenarios(t *testing.T) {

FILE: pkg/remote/oci.go
  constant OCI_REMOTE_ENABLED (line 40) | OCI_REMOTE_ENABLED = "COMPOSE_EXPERIMENTAL_OCI_REMOTE"
  constant OciPrefix (line 41) | OciPrefix          = "oci://"
  function validatePathInBase (line 46) | func validatePathInBase(base, unsafePath string) error {
  function ociRemoteLoaderEnabled (line 70) | func ociRemoteLoaderEnabled() (bool, error) {
  function NewOCIRemoteLoader (line 81) | func NewOCIRemoteLoader(dockerCli command.Cli, offline bool, options api...
  type ociRemoteLoader (line 90) | type ociRemoteLoader struct
    method Accept (line 97) | func (g ociRemoteLoader) Accept(path string) bool {
    method Load (line 102) | func (g ociRemoteLoader) Load(ctx context.Context, path string) (strin...
    method Dir (line 182) | func (g ociRemoteLoader) Dir(path string) string {
    method pullComposeFiles (line 186) | func (g ociRemoteLoader) pullComposeFiles(ctx context.Context, local s...
  function writeComposeFile (line 222) | func writeComposeFile(layer spec.Descriptor, i int, local string, conten...
  function writeEnvFile (line 245) | func writeEnvFile(layer spec.Descriptor, local string, content []byte) e...

FILE: pkg/remote/oci_test.go
  function TestValidatePathInBase (line 27) | func TestValidatePathInBase(t *testing.T) {
  function TestWriteComposeFileWithExtendsPathTraversal (line 120) | func TestWriteComposeFileWithExtendsPathTraversal(t *testing.T) {

FILE: pkg/utils/durationutils.go
  function DurationSecondToInt (line 21) | func DurationSecondToInt(d *time.Duration) *int {

FILE: pkg/utils/safebuffer.go
  type SafeBuffer (line 30) | type SafeBuffer struct
    method Read (line 36) | func (b *SafeBuffer) Read(p []byte) (n int, err error) {
    method Write (line 43) | func (b *SafeBuffer) Write(p []byte) (n int, err error) {
    method String (line 50) | func (b *SafeBuffer) String() string {
    method Bytes (line 57) | func (b *SafeBuffer) Bytes() []byte {
    method RequireEventuallyContains (line 64) | func (b *SafeBuffer) RequireEventuallyContains(t testing.TB, v string) {

FILE: pkg/utils/set.go
  type Set (line 17) | type Set
  function NewSet (line 19) | func NewSet[T comparable](v ...T) Set[T] {
  method Has (line 31) | func (s Set[T]) Has(v T) bool {
  method Add (line 36) | func (s Set[T]) Add(v T) {
  method AddAll (line 40) | func (s Set[T]) AddAll(v ...T) {
  method Remove (line 46) | func (s Set[T]) Remove(v T) bool {
  method Clear (line 54) | func (s Set[T]) Clear() {
  method Elements (line 60) | func (s Set[T]) Elements() []T {
  method RemoveAll (line 68) | func (s Set[T]) RemoveAll(elements ...T) {
  method Diff (line 74) | func (s Set[T]) Diff(other Set[T]) Set[T] {
  method Union (lin
Condensed preview — 650 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,040K chars).
[
  {
    "path": ".dockerignore",
    "chars": 5,
    "preview": "bin/\n"
  },
  {
    "path": ".gitattributes",
    "chars": 41,
    "preview": "core.autocrlf false\n*.golden text eol=lf\n"
  },
  {
    "path": ".github/CODEOWNERS",
    "chars": 44,
    "preview": "# global rules\n* @docker/compose-maintainers"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "chars": 1750,
    "preview": "name: 🐞 Bug\ndescription: File a bug/issue\ntitle: \"[BUG] <title>\"\nlabels: ['status/0-triage', 'kind/bug']\nbody:\n  - type:"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 487,
    "preview": "blank_issues_enabled: true\ncontact_links:\n  - name: Docker Community Slack\n    url: https://dockr.ly/slack\n    about: 'U"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yaml",
    "chars": 306,
    "preview": "name: Feature request\ndescription: Missing functionality? Come tell us about it!\nlabels:\n  - kind/feature\n  - status/0-t"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 223,
    "preview": "**What I did**\n\n**Related issue**\n<!-- If this is a bug fix, make sure your description includes \"fixes #xxxx\", or \"clos"
  },
  {
    "path": ".github/SECURITY.md",
    "chars": 1820,
    "preview": "# Security Policy\n\nThe maintainers of Docker Compose take security seriously. If you discover\na security issue, please b"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 1009,
    "preview": "version: 2\nupdates:\n  - package-ecosystem: gomod\n    directory: /\n    schedule:\n      interval: daily\n    ignore:\n      "
  },
  {
    "path": ".github/stale.yml",
    "chars": 2093,
    "preview": "# Configuration for probot-stale - https://github.com/probot/stale\n\n# Number of days of inactivity before an Issue or Pu"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 9739,
    "preview": "name: ci\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\non:\n  push:\n    bra"
  },
  {
    "path": ".github/workflows/docs-upstream.yml",
    "chars": 1241,
    "preview": "# this workflow runs the remote validate bake target from docker/docs\n# to check if yaml reference docs used in this rep"
  },
  {
    "path": ".github/workflows/merge.yml",
    "chars": 3825,
    "preview": "name: merge\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\non:\n  push:\n    "
  },
  {
    "path": ".github/workflows/scorecards.yml",
    "chars": 2102,
    "preview": "name: Scorecards supply-chain security\non:\n  # Only the default branch is supported.\n  branch_protection_rule:\n  schedul"
  },
  {
    "path": ".github/workflows/stale.yml",
    "chars": 1143,
    "preview": "name: 'Close stale issues'\n\n# Default to 'contents: read', which grants actions to read commits.\n#\n# If any permission i"
  },
  {
    "path": ".gitignore",
    "chars": 66,
    "preview": "bin/\n/.vscode/\ncoverage.out\ncovdatafiles/\n.DS_Store\npkg/e2e/*.tar\n"
  },
  {
    "path": ".go-version",
    "chars": 6,
    "preview": "1.25.8"
  },
  {
    "path": ".golangci.yml",
    "chars": 2525,
    "preview": "version: \"2\"\nrun:\n  concurrency: 2\nlinters:\n  default: none\n  enable:\n    - copyloopvar\n    - depguard\n    - errcheck\n  "
  },
  {
    "path": "BUILDING.md",
    "chars": 2206,
    "preview": "\n### Prerequisites\n\n* Windows:\n  * [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/)\n  * "
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 14882,
    "preview": "# Contributing to Docker\n\nWant to hack on Docker? Awesome!  We have a contributor's guide that explains\n[setting up a Do"
  },
  {
    "path": "Dockerfile",
    "chars": 6464,
    "preview": "# syntax=docker/dockerfile:1\n\n\n#   Copyright 2020 Docker Compose CLI authors\n\n#   Licensed under the Apache License, Ver"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "Makefile",
    "chars": 6087,
    "preview": "#   Copyright 2020 Docker Compose CLI authors\n\n#   Licensed under the Apache License, Version 2.0 (the \"License\");\n#   y"
  },
  {
    "path": "NOTICE",
    "chars": 140,
    "preview": "Docker Compose V2\nCopyright 2020 Docker Compose authors\n\nThis product includes software developed at Docker, Inc. (https"
  },
  {
    "path": "README.md",
    "chars": 3693,
    "preview": "# Table of Contents\n- [Docker Compose](#docker-compose)\n- [Where to get Docker Compose](#where-to-get-docker-compose)\n  "
  },
  {
    "path": "cmd/cmdtrace/cmd_span.go",
    "chars": 4521,
    "preview": "/*\n   Copyright 2023 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/cmdtrace/cmd_span_test.go",
    "chars": 2731,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compatibility/convert.go",
    "chars": 2438,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compatibility/convert_test.go",
    "chars": 3511,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/alpha.go",
    "chars": 1205,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   yo"
  },
  {
    "path": "cmd/compose/attach.go",
    "chars": 2603,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/bridge.go",
    "chars": 4975,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/build.go",
    "chars": 6024,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/commit.go",
    "chars": 2852,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/completion.go",
    "chars": 3958,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/compose.go",
    "chars": 23437,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/compose_oci_test.go",
    "chars": 2213,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/compose_test.go",
    "chars": 1285,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/config.go",
    "chars": 15830,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/cp.go",
    "chars": 2883,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/create.go",
    "chars": 6908,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/down.go",
    "chars": 3466,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/events.go",
    "chars": 2667,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/exec.go",
    "chars": 4628,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/export.go",
    "chars": 2257,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/generate.go",
    "chars": 2589,
    "preview": "/*\n   Copyright 2023 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/images.go",
    "chars": 4306,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/kill.go",
    "chars": 2396,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/list.go",
    "chars": 3859,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/logs.go",
    "chars": 4118,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/options.go",
    "chars": 9507,
    "preview": "/*\n   Copyright 2023 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/options_test.go",
    "chars": 10126,
    "preview": "/*\n   Copyright 2023 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/pause.go",
    "chars": 2706,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/port.go",
    "chars": 2448,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/ps.go",
    "chars": 4974,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/publish.go",
    "chars": 3552,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/pull.go",
    "chars": 3985,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/pullOptions_test.go",
    "chars": 1578,
    "preview": "/*\n   Copyright 2023 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/push.go",
    "chars": 2422,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/remove.go",
    "chars": 2680,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/restart.go",
    "chars": 2482,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/run.go",
    "chars": 11798,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/scale.go",
    "chars": 3009,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/start.go",
    "chars": 2256,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/stats.go",
    "chars": 2803,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/stop.go",
    "chars": 2167,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/top.go",
    "chars": 3746,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/top_test.go",
    "chars": 7966,
    "preview": "/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/up.go",
    "chars": 14019,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/up_test.go",
    "chars": 1979,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/version.go",
    "chars": 2086,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/version_test.go",
    "chars": 1786,
    "preview": "/*\n   Copyright 2025 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/viz.go",
    "chars": 3236,
    "preview": "/*\n   Copyright 2023 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/viz_test.go",
    "chars": 2031,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/volumes.go",
    "chars": 2588,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/wait.go",
    "chars": 2161,
    "preview": "/*\n   Copyright 2023 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/compose/watch.go",
    "chars": 4022,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/colors.go",
    "chars": 1270,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/dryrun.go",
    "chars": 667,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/json.go",
    "chars": 1935,
    "preview": "/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/json_test.go",
    "chars": 1421,
    "preview": "/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/mode.go",
    "chars": 1055,
    "preview": "/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/plain.go",
    "chars": 1231,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/quiet.go",
    "chars": 902,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/spinner.go",
    "chars": 1315,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/tty.go",
    "chars": 15628,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/display/tty_test.go",
    "chars": 11827,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/ansi.go",
    "chars": 1876,
    "preview": "/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/colors.go",
    "chars": 3153,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/consts.go",
    "chars": 985,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/container.go",
    "chars": 8045,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/formatter.go",
    "chars": 1911,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/formatter_test.go",
    "chars": 2033,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/json.go",
    "chars": 1206,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/logs.go",
    "chars": 4280,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/pretty.go",
    "chars": 979,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/shortcut.go",
    "chars": 8899,
    "preview": "/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/formatter/shortcut_unix.go",
    "chars": 723,
    "preview": "//go:build !windows\n\n/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 "
  },
  {
    "path": "cmd/formatter/shortcut_windows.go",
    "chars": 850,
    "preview": "//go:build windows\n\n/*\n   Copyright 2024 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "cmd/main.go",
    "chars": 2399,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/prompt/prompt.go",
    "chars": 2528,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "cmd/prompt/prompt_mock.go",
    "chars": 2775,
    "preview": "// Code generated by MockGen. DO NOT EDIT.\n// Source: github.com/docker/compose-cli/pkg/prompt (interfaces: UI)\n\n// Pack"
  },
  {
    "path": "codecov.yml",
    "chars": 296,
    "preview": "coverage:\n  status:\n    project:\n      default:\n        informational: true\n        target: auto\n        threshold: 2%\n "
  },
  {
    "path": "docker-bake.hcl",
    "chars": 3084,
    "preview": "// Copyright 2022 Docker Compose CLI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// yo"
  },
  {
    "path": "docs/examples/provider.go",
    "chars": 4025,
    "preview": "/*\n   Copyright 2020 Docker Compose CLI authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   y"
  },
  {
    "path": "docs/extension.md",
    "chars": 6880,
    "preview": "# About\n\nThe Compose application model defines `service` as an abstraction for a computing unit managing (a subset of)\na"
  },
  {
    "path": "docs/reference/compose.md",
    "chars": 17103,
    "preview": "\n# docker compose\n\n```text\ndocker compose [-f <arg>...] [options] [COMMAND] [ARGS...]\n```\n\n<!---MARKER_GEN_START-->\nDefi"
  },
  {
    "path": "docs/reference/compose_alpha.md",
    "chars": 895,
    "preview": "# docker compose alpha\n\n<!---MARKER_GEN_START-->\nExperimental commands\n\n### Subcommands\n\n| Name                         "
  },
  {
    "path": "docs/reference/compose_alpha_dry-run.md",
    "chars": 153,
    "preview": "# docker compose alpha dry-run\n\n<!---MARKER_GEN_START-->\nDry run command allows you to test a command without applying c"
  },
  {
    "path": "docs/reference/compose_alpha_generate.md",
    "chars": 672,
    "preview": "# docker compose alpha generate\n\n<!---MARKER_GEN_START-->\nEXPERIMENTAL - Generate a Compose file from existing container"
  },
  {
    "path": "docs/reference/compose_alpha_publish.md",
    "chars": 1049,
    "preview": "# docker compose alpha publish\n\n<!---MARKER_GEN_START-->\nPublish compose application\n\n### Options\n\n| Name               "
  },
  {
    "path": "docs/reference/compose_alpha_scale.md",
    "chars": 378,
    "preview": "# docker compose alpha scale\n\n<!---MARKER_GEN_START-->\nScale services\n\n### Options\n\n| Name        | Type | Default | Des"
  },
  {
    "path": "docs/reference/compose_alpha_viz.md",
    "chars": 1317,
    "preview": "# docker compose alpha viz\n\n<!---MARKER_GEN_START-->\nEXPERIMENTAL - Generate a graphviz graph from your compose file\n\n##"
  },
  {
    "path": "docs/reference/compose_alpha_watch.md",
    "chars": 586,
    "preview": "# docker compose alpha watch\n\n<!---MARKER_GEN_START-->\nWatch build context for service and rebuild/refresh containers wh"
  },
  {
    "path": "docs/reference/compose_attach.md",
    "chars": 884,
    "preview": "# docker compose attach\n\n<!---MARKER_GEN_START-->\nAttach local standard input, output, and error streams to a service's "
  },
  {
    "path": "docs/reference/compose_bridge.md",
    "chars": 909,
    "preview": "# docker compose bridge\n\n<!---MARKER_GEN_START-->\nConvert compose files into another model\n\n### Subcommands\n\n| Name     "
  },
  {
    "path": "docs/reference/compose_bridge_convert.md",
    "chars": 1027,
    "preview": "# docker compose bridge convert\n\n<!---MARKER_GEN_START-->\nConvert compose files to Kubernetes manifests, Helm charts, or"
  },
  {
    "path": "docs/reference/compose_bridge_transformations.md",
    "chars": 721,
    "preview": "# docker compose bridge transformations\n\n<!---MARKER_GEN_START-->\nManage transformation images\n\n### Subcommands\n\n| Name "
  },
  {
    "path": "docs/reference/compose_bridge_transformations_create.md",
    "chars": 613,
    "preview": "# docker compose bridge transformations create\n\n<!---MARKER_GEN_START-->\nCreate a new transformation\n\n### Options\n\n| Nam"
  },
  {
    "path": "docs/reference/compose_bridge_transformations_list.md",
    "chars": 675,
    "preview": "# docker compose bridge transformations list\n\n<!---MARKER_GEN_START-->\nList available transformations\n\n### Aliases\n\n`doc"
  },
  {
    "path": "docs/reference/compose_build.md",
    "chars": 3691,
    "preview": "# docker compose build\n\n<!---MARKER_GEN_START-->\nServices are built once and then tagged, by default as `project-service"
  },
  {
    "path": "docs/reference/compose_commit.md",
    "chars": 976,
    "preview": "# docker compose commit\n\n<!---MARKER_GEN_START-->\nCreate a new image from a service container's changes\n\n### Options\n\n| "
  },
  {
    "path": "docs/reference/compose_config.md",
    "chars": 3407,
    "preview": "# docker compose convert\n\n<!---MARKER_GEN_START-->\n`docker compose config` renders the actual data model to be applied o"
  },
  {
    "path": "docs/reference/compose_cp.md",
    "chars": 879,
    "preview": "# docker compose cp\n\n<!---MARKER_GEN_START-->\nCopy files/folders between a service container and the local filesystem\n\n#"
  },
  {
    "path": "docs/reference/compose_create.md",
    "chars": 1875,
    "preview": "# docker compose create\n\n<!---MARKER_GEN_START-->\nCreates containers for a service\n\n### Options\n\n| Name               | "
  },
  {
    "path": "docs/reference/compose_down.md",
    "chars": 2460,
    "preview": "# docker compose down\n\n<!---MARKER_GEN_START-->\nStops containers and removes containers, networks, volumes, and images c"
  },
  {
    "path": "docs/reference/compose_events.md",
    "chars": 1623,
    "preview": "# docker compose events\n\n<!---MARKER_GEN_START-->\nStream container events for every container in the project.\n\nWith the "
  },
  {
    "path": "docs/reference/compose_exec.md",
    "chars": 2912,
    "preview": "# docker compose exec\n\n<!---MARKER_GEN_START-->\nThis is the equivalent of `docker exec` targeting a Compose service.\n\nWi"
  },
  {
    "path": "docs/reference/compose_export.md",
    "chars": 652,
    "preview": "# docker compose export\n\n<!---MARKER_GEN_START-->\nExport a service container's filesystem as a tar archive\n\n### Options\n"
  },
  {
    "path": "docs/reference/compose_images.md",
    "chars": 563,
    "preview": "# docker compose images\n\n<!---MARKER_GEN_START-->\nList images used by the created containers\n\n### Options\n\n| Name       "
  },
  {
    "path": "docs/reference/compose_kill.md",
    "chars": 985,
    "preview": "# docker compose kill\n\n<!---MARKER_GEN_START-->\nForces running containers to stop by sending a `SIGKILL` signal. Optiona"
  },
  {
    "path": "docs/reference/compose_logs.md",
    "chars": 1745,
    "preview": "# docker compose logs\n\n<!---MARKER_GEN_START-->\nDisplays log output from services\n\n### Options\n\n| Name                 |"
  },
  {
    "path": "docs/reference/compose_ls.md",
    "chars": 766,
    "preview": "# docker compose ls\n\n<!---MARKER_GEN_START-->\nLists running Compose projects\n\n### Options\n\n| Name            | Type     "
  },
  {
    "path": "docs/reference/compose_pause.md",
    "chars": 495,
    "preview": "# docker compose pause\n\n<!---MARKER_GEN_START-->\nPauses running containers of a service. They can be unpaused with `dock"
  },
  {
    "path": "docs/reference/compose_port.md",
    "chars": 668,
    "preview": "# docker compose port\n\n<!---MARKER_GEN_START-->\nPrints the public port for a port binding\n\n### Options\n\n| Name         |"
  },
  {
    "path": "docs/reference/compose_ps.md",
    "chars": 10203,
    "preview": "# docker compose ps\n\n<!---MARKER_GEN_START-->\nLists containers for a Compose project, with current status and exposed po"
  },
  {
    "path": "docs/reference/compose_publish.md",
    "chars": 1175,
    "preview": "# docker compose publish\n\n<!---MARKER_GEN_START-->\nPublish compose application\n\n### Options\n\n| Name                     "
  },
  {
    "path": "docs/reference/compose_pull.md",
    "chars": 3218,
    "preview": "# docker compose pull\n\n<!---MARKER_GEN_START-->\nPulls an image associated with a service defined in a `compose.yaml` fil"
  },
  {
    "path": "docs/reference/compose_push.md",
    "chars": 1562,
    "preview": "# docker compose push\n\n<!---MARKER_GEN_START-->\nPushes images for services to their respective registry/repository.\n\nThe"
  },
  {
    "path": "docs/reference/compose_restart.md",
    "chars": 1752,
    "preview": "# docker compose restart\n\n<!---MARKER_GEN_START-->\nRestarts all stopped and running services, or the specified services "
  },
  {
    "path": "docs/reference/compose_rm.md",
    "chars": 1624,
    "preview": "# docker compose rm\n\n<!---MARKER_GEN_START-->\nRemoves stopped service containers.\n\nBy default, anonymous volumes attache"
  },
  {
    "path": "docs/reference/compose_run.md",
    "chars": 8111,
    "preview": "# docker compose run\n\n<!---MARKER_GEN_START-->\nRuns a one-time command against a service.\n\nThe following command starts "
  },
  {
    "path": "docs/reference/compose_scale.md",
    "chars": 381,
    "preview": "# docker compose scale\n\n<!---MARKER_GEN_START-->\nScale services \n\n### Options\n\n| Name        | Type   | Default | Descri"
  },
  {
    "path": "docs/reference/compose_start.md",
    "chars": 772,
    "preview": "# docker compose start\n\n<!---MARKER_GEN_START-->\nStarts existing containers for a service\n\n### Options\n\n| Name          "
  },
  {
    "path": "docs/reference/compose_stats.md",
    "chars": 3443,
    "preview": "# docker compose stats\n\n<!---MARKER_GEN_START-->\nDisplay a live stream of container(s) resource usage statistics\n\n### Op"
  },
  {
    "path": "docs/reference/compose_stop.md",
    "chars": 634,
    "preview": "# docker compose stop\n\n<!---MARKER_GEN_START-->\nStops running containers without removing them. They can be started agai"
  },
  {
    "path": "docs/reference/compose_top.md",
    "chars": 570,
    "preview": "# docker compose top\n\n<!---MARKER_GEN_START-->\nDisplays the running processes\n\n### Options\n\n| Name        | Type   | Def"
  },
  {
    "path": "docs/reference/compose_unpause.md",
    "chars": 394,
    "preview": "# docker compose unpause\n\n<!---MARKER_GEN_START-->\nUnpauses paused containers of a service\n\n### Options\n\n| Name        |"
  },
  {
    "path": "docs/reference/compose_up.md",
    "chars": 9348,
    "preview": "# docker compose up\n\n<!---MARKER_GEN_START-->\nBuilds, (re)creates, starts, and attaches to containers for a service.\n\nUn"
  },
  {
    "path": "docs/reference/compose_version.md",
    "chars": 669,
    "preview": "# docker compose version\n\n<!---MARKER_GEN_START-->\nShow the Docker Compose version information\n\n### Options\n\n| Name     "
  },
  {
    "path": "docs/reference/compose_volumes.md",
    "chars": 2424,
    "preview": "# docker compose volumes\n\n<!---MARKER_GEN_START-->\nList volumes\n\n### Options\n\n| Name            | Type     | Default | D"
  },
  {
    "path": "docs/reference/compose_wait.md",
    "chars": 496,
    "preview": "# docker compose wait\n\n<!---MARKER_GEN_START-->\nBlock until containers of all (or specified) services stop.\n\n### Options"
  },
  {
    "path": "docs/reference/compose_watch.md",
    "chars": 673,
    "preview": "# docker compose watch\n\n<!---MARKER_GEN_START-->\nWatch build context for service and rebuild/refresh containers when fil"
  },
  {
    "path": "docs/reference/docker_compose.yaml",
    "chars": 17776,
    "preview": "command: docker compose\nshort: Docker Compose\nlong: Define and run multi-container applications with Docker\nusage: docke"
  },
  {
    "path": "docs/reference/docker_compose_alpha.yaml",
    "chars": 760,
    "preview": "command: docker compose alpha\nshort: Experimental commands\nlong: Experimental commands\npname: docker compose\nplink: dock"
  },
  {
    "path": "docs/reference/docker_compose_alpha_dry-run.yaml",
    "chars": 436,
    "preview": "command: docker compose alpha dry-run\nshort: |\n    EXPERIMENTAL - Dry run command allow you to test a command without ap"
  },
  {
    "path": "docs/reference/docker_compose_alpha_generate.yaml",
    "chars": 1470,
    "preview": "command: docker compose alpha generate\nshort: EXPERIMENTAL - Generate a Compose file from existing containers\nlong: EXPE"
  },
  {
    "path": "docs/reference/docker_compose_alpha_publish.yaml",
    "chars": 2351,
    "preview": "command: docker compose alpha publish\nshort: Publish compose application\nlong: Publish compose application\nusage: docker"
  },
  {
    "path": "docs/reference/docker_compose_alpha_scale.yaml",
    "chars": 861,
    "preview": "command: docker compose alpha scale\nshort: Scale services\nlong: Scale services\nusage: docker compose alpha scale [SERVIC"
  },
  {
    "path": "docs/reference/docker_compose_alpha_viz.yaml",
    "chars": 2161,
    "preview": "command: docker compose alpha viz\nshort: EXPERIMENTAL - Generate a graphviz graph from your compose file\nlong: EXPERIMEN"
  },
  {
    "path": "docs/reference/docker_compose_alpha_watch.yaml",
    "chars": 1272,
    "preview": "command: docker compose alpha watch\nshort: |\n    Watch build context for service and rebuild/refresh containers when fil"
  },
  {
    "path": "docs/reference/docker_compose_attach.yaml",
    "chars": 1819,
    "preview": "command: docker compose attach\nshort: |\n    Attach local standard input, output, and error streams to a service's runnin"
  },
  {
    "path": "docs/reference/docker_compose_bridge.yaml",
    "chars": 752,
    "preview": "command: docker compose bridge\nshort: Convert compose files into another model\nlong: Convert compose files into another "
  },
  {
    "path": "docs/reference/docker_compose_bridge_convert.yaml",
    "chars": 1637,
    "preview": "command: docker compose bridge convert\nshort: |\n    Convert compose files to Kubernetes manifests, Helm charts, or anoth"
  },
  {
    "path": "docs/reference/docker_compose_bridge_transformations.yaml",
    "chars": 798,
    "preview": "command: docker compose bridge transformations\nshort: Manage transformation images\nlong: Manage transformation images\npn"
  },
  {
    "path": "docs/reference/docker_compose_bridge_transformations_create.yaml",
    "chars": 996,
    "preview": "command: docker compose bridge transformations create\nshort: Create a new transformation\nlong: Create a new transformati"
  },
  {
    "path": "docs/reference/docker_compose_bridge_transformations_list.yaml",
    "chars": 1329,
    "preview": "command: docker compose bridge transformations list\naliases: docker compose bridge transformations list, docker compose "
  },
  {
    "path": "docs/reference/docker_compose_build.yaml",
    "chars": 6036,
    "preview": "command: docker compose build\nshort: Build or rebuild services\nlong: |-\n    Services are built once and then tagged, by "
  },
  {
    "path": "docs/reference/docker_compose_commit.yaml",
    "chars": 2036,
    "preview": "command: docker compose commit\nshort: Create a new image from a service container's changes\nlong: Create a new image fro"
  },
  {
    "path": "docs/reference/docker_compose_config.yaml",
    "chars": 6111,
    "preview": "command: docker compose config\nshort: Parse, resolve and render compose file in canonical format\nlong: |-\n    `docker co"
  },
  {
    "path": "docs/reference/docker_compose_convert.yaml",
    "chars": 4095,
    "preview": "command: docker compose convert\naliases: docker compose convert, docker compose config\nshort: Converts the compose file "
  },
  {
    "path": "docs/reference/docker_compose_cp.yaml",
    "chars": 1923,
    "preview": "command: docker compose cp\nshort: Copy files/folders between a service container and the local filesystem\nlong: Copy fil"
  },
  {
    "path": "docs/reference/docker_compose_create.yaml",
    "chars": 3366,
    "preview": "command: docker compose create\nshort: Creates containers for a service\nlong: Creates containers for a service\nusage: doc"
  },
  {
    "path": "docs/reference/docker_compose_down.yaml",
    "chars": 2508,
    "preview": "command: docker compose down\nshort: Stop and remove containers, networks\nlong: |-\n    Stops containers and removes conta"
  },
  {
    "path": "docs/reference/docker_compose_events.yaml",
    "chars": 1920,
    "preview": "command: docker compose events\nshort: Receive real time events from containers\nlong: |-\n    Stream container events for "
  },
  {
    "path": "docs/reference/docker_compose_exec.yaml",
    "chars": 3951,
    "preview": "command: docker compose exec\nshort: Execute a command in a running container\nlong: |-\n    This is the equivalent of `doc"
  },
  {
    "path": "docs/reference/docker_compose_export.yaml",
    "chars": 1202,
    "preview": "command: docker compose export\nshort: Export a service container's filesystem as a tar archive\nlong: Export a service co"
  },
  {
    "path": "docs/reference/docker_compose_images.yaml",
    "chars": 1180,
    "preview": "command: docker compose images\nshort: List images used by the created containers\nlong: List images used by the created c"
  },
  {
    "path": "docs/reference/docker_compose_kill.yaml",
    "chars": 1347,
    "preview": "command: docker compose kill\nshort: Force stop service containers\nlong: |-\n    Forces running containers to stop by send"
  },
  {
    "path": "docs/reference/docker_compose_logs.yaml",
    "chars": 2911,
    "preview": "command: docker compose logs\nshort: View output from containers\nlong: Displays log output from services\nusage: docker co"
  },
  {
    "path": "docs/reference/docker_compose_ls.yaml",
    "chars": 1678,
    "preview": "command: docker compose ls\nshort: List running compose projects\nlong: Lists running Compose projects\nusage: docker compo"
  },
  {
    "path": "docs/reference/docker_compose_pause.yaml",
    "chars": 639,
    "preview": "command: docker compose pause\nshort: Pause services\nlong: |\n    Pauses running containers of a service. They can be unpa"
  },
  {
    "path": "docs/reference/docker_compose_port.yaml",
    "chars": 1163,
    "preview": "command: docker compose port\nshort: Print the public port for a port binding\nlong: Prints the public port for a port bin"
  },
  {
    "path": "docs/reference/docker_compose_ps.yaml",
    "chars": 7772,
    "preview": "command: docker compose ps\nshort: List containers\nlong: |-\n    Lists containers for a Compose project, with current stat"
  },
  {
    "path": "docs/reference/docker_compose_publish.yaml",
    "chars": 2329,
    "preview": "command: docker compose publish\nshort: Publish compose application\nlong: Publish compose application\nusage: docker compo"
  },
  {
    "path": "docs/reference/docker_compose_pull.yaml",
    "chars": 4805,
    "preview": "command: docker compose pull\nshort: Pull service images\nlong: |\n    Pulls an image associated with a service defined in "
  },
  {
    "path": "docs/reference/docker_compose_push.yaml",
    "chars": 1928,
    "preview": "command: docker compose push\nshort: Push service images\nlong: |-\n    Pushes images for services to their respective regi"
  },
  {
    "path": "docs/reference/docker_compose_restart.yaml",
    "chars": 1786,
    "preview": "command: docker compose restart\nshort: Restart service containers\nlong: |-\n    Restarts all stopped and running services"
  },
  {
    "path": "docs/reference/docker_compose_rm.yaml",
    "chars": 2257,
    "preview": "command: docker compose rm\nshort: Removes stopped service containers\nlong: |-\n    Removes stopped service containers.\n\n "
  },
  {
    "path": "docs/reference/docker_compose_run.yaml",
    "chars": 9870,
    "preview": "command: docker compose run\nshort: Run a one-off command on a service\nlong: |-\n    Runs a one-time command against a ser"
  },
  {
    "path": "docs/reference/docker_compose_scale.yaml",
    "chars": 837,
    "preview": "command: docker compose scale\nshort: Scale services\nlong: Scale services\nusage: docker compose scale [SERVICE=REPLICAS.."
  },
  {
    "path": "docs/reference/docker_compose_start.yaml",
    "chars": 1206,
    "preview": "command: docker compose start\nshort: Start services\nlong: Starts existing containers for a service\nusage: docker compose"
  },
  {
    "path": "docs/reference/docker_compose_stats.yaml",
    "chars": 2192,
    "preview": "command: docker compose stats\nshort: Display a live stream of container(s) resource usage statistics\nlong: Display a liv"
  },
  {
    "path": "docs/reference/docker_compose_stop.yaml",
    "chars": 953,
    "preview": "command: docker compose stop\nshort: Stop services\nlong: |\n    Stops running containers without removing them. They can b"
  },
  {
    "path": "docs/reference/docker_compose_top.yaml",
    "chars": 805,
    "preview": "command: docker compose top\nshort: Display the running processes\nlong: Displays the running processes\nusage: docker comp"
  },
  {
    "path": "docs/reference/docker_compose_unpause.yaml",
    "chars": 587,
    "preview": "command: docker compose unpause\nshort: Unpause services\nlong: Unpauses paused containers of a service\nusage: docker comp"
  },
  {
    "path": "docs/reference/docker_compose_up.yaml",
    "chars": 10792,
    "preview": "command: docker compose up\nshort: Create and start containers\nlong: |-\n    Builds, (re)creates, starts, and attaches to "
  },
  {
    "path": "docs/reference/docker_compose_version.yaml",
    "chars": 1183,
    "preview": "command: docker compose version\nshort: Show the Docker Compose version information\nlong: Show the Docker Compose version"
  },
  {
    "path": "docs/reference/docker_compose_volumes.yaml",
    "chars": 1544,
    "preview": "command: docker compose volumes\nshort: List volumes\nlong: List volumes\nusage: docker compose volumes [OPTIONS] [SERVICE."
  },
  {
    "path": "docs/reference/docker_compose_wait.yaml",
    "chars": 956,
    "preview": "command: docker compose wait\nshort: Block until containers of all (or specified) services stop.\nlong: Block until contai"
  }
]

// ... and 450 more files (download for full content)

About this extraction

This page contains the full source code of the docker/compose GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 650 files (1.8 MB), approximately 509.4k tokens, and a symbol index with 2199 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!