find some-folder/ -type f -exec dockmoor contains --any {} \; -print
stdout:
some-folder/Dockerfile-nginx-latest some-folder/subfolder/Dockerfile-nginx-latest
stderr is empty
exit code: 0
The contains
command returns with exit code 0 when an image reference was found that matches. Using the --any
predicate allows to match any file with a supported format that contains at least one image reference.
dockmoor contains --any some-folder/Dockerfile-nginx-latest
stdout is empty
stderr is empty
exit code: 0
dockmoor contains --any some-folder/NotADockerfile
stdout is empty
stderr is empty
exit code: 4
dockmoor [OPTIONS] <contains> [command-OPTIONS]
-l, --log-level Sets the log-level (one of NONE
, ERROR
, WARN
, INFO
, DEBUG
)
--version Show version and exit
--manpage Show man page and exit
--markdown Show usage as markdown and exit
--asciidoc-usage Show usage as asciidoc and exit
-h, --help Show this help message
Specify which kind of image references should be selected. Exactly one must be specified
--any Matches all images