vagd.detect
Attributes
Functions
|
Return the base image of the final stage of a Dockerfile. |
|
Guess the distribution image from the compiler string in .comment. |
|
Detect the container image for a binary. |
Module Contents
- vagd.detect._FROM
- vagd.detect._ARG
- vagd.detect._VAR
- vagd.detect._UBUNTU_RELEASE
- vagd.detect._COMPILER
- vagd.detect._UBUNTU_GCC
- vagd.detect._DEBIAN_GCC
- vagd.detect.image_from_dockerfile(path: str) str | None
Return the base image of the final stage of a Dockerfile.
- vagd.detect.image_from_comment(binary: str) str | None
Guess the distribution image from the compiler string in .comment.
- vagd.detect.detect_image(binary: str) Tuple[str, str]
Detect the container image for a binary.
Checks a Dockerfile next to the binary (then in the working directory) and falls back to the compiler string in the binary’s .comment section.
- Returns:
tuple of image and the source it was detected from
- Raises:
ValueError – if no image could be detected