def local_common_options()

in samcli/commands/local/cli_common/options.py [0:0]


def local_common_options(f):
    """
    Common CLI options shared by "local invoke", "local start-api", and "local start-lambda" commands

    :param f: Callback passed by Click
    """
    local_options = [
        click.option(
            "--shutdown",
            is_flag=True,
            default=False,
            help="If set, will emulate a shutdown event after the invoke completes, "
            "in order to test extension handling of shutdown behavior.",
        ),
        click.option(
            "--container-host",
            default="localhost",
            show_default=True,
            help="Host of locally emulated Lambda container. "
            "This option is useful when the container runs on a different host than SAM CLI. "
            "For example, if you want to run SAM CLI in a Docker container on macOS, "
            "use this option with host.docker.internal",
        ),
        click.option(
            "--container-host-interface",
            default="127.0.0.1",
            show_default=True,
            help="IP address of the host network interface that container ports should bind to. "
            "Use 0.0.0.0 to bind to all interfaces.",
        ),
        click.option(
            "--invoke-image",
            "-ii",
            default=None,
            required=False,
            multiple=True,
            help="Container image URIs for invoking functions or starting api and function. "
            "You can specify the image URI used for the local function invocation "
            "(--invoke-image public.ecr.aws/sam/build-nodejs14.x:latest). "
            "You can specify for each individual function with "
            "(--invoke-image Function1=public.ecr.aws/sam/build-nodejs14.x:latest). "
            "If a function does not have invoke image specified, the default SAM CLI "
            "emulation image will be used.",
        ),
    ]

    # Reverse the list to maintain ordering of options in help text printed with --help
    for option in reversed(local_options):
        option(f)

    return f