Esempio n. 1
0
def cli_extract_image(
    click_ctx,
    image,
    timeout=None,
    no_pretty=False,
    output=None,
    registry_credentials=None,
    no_tls_verify=False,
):
    """Extract installed packages from an image."""
    start_time = time.monotonic()
    result = extract_image(
        image,
        timeout,
        registry_credentials=registry_credentials,
        tls_verify=not no_tls_verify,
    )
    print_command_result(
        click_ctx,
        result,
        analyzer=analyzer,
        analyzer_version=analyzer_version,
        output=output or "-",
        duration=time.monotonic() - start_time,
        pretty=not no_pretty,
    )
Esempio n. 2
0
def cli_extract_image(click_ctx,
                      image,
                      timeout=None,
                      no_pretty=False,
                      output=None,
                      registry_credentials=None,
                      no_tls_verify=False):
    """Extract installed packages from an image."""
    result = extract_image(image,
                           timeout,
                           registry_credentials=registry_credentials,
                           tls_verify=not no_tls_verify)
    print_command_result(click_ctx,
                         result,
                         analyzer=analyzer,
                         analyzer_version=analyzer_version,
                         output=output or '-',
                         pretty=not no_pretty)