code: def docker(ctx, src, dry_run):
      """
      Interact with docker-compose based builds.
      """
      ctx.ensure_object(dict)
  
      config_path = src.path / "docker-compose.yml"
      if not config_path.exists():
          raise click.ClickException(
              "Docker compose configuration cannot be found in directory {}, "
              "try to pass the arrow source directory explicitly.".format(
                  src
              )
          )
  
      # take the docker-compose parameters like PYTHON, PANDAS, UBUNTU from the
      # environment variables to keep the usage similar to docker-compose
      compose = DockerCompose(config_path, params=os.environ)
      if dry_run:
          _mock_compose_calls(compose)
      ctx.obj["compose"] = compose
  
file_path: arrow/dev/archery/archery/docker/cli.py
imports: import os
  import sys
  import click
  from ..utils.cli import validate_arrow_sources
  from .core import DockerCompose, UndefinedImage
label_desc: Use image node_id 2 for calling a global function with example usage: docker(ctx, src, dry_run) without return types