| 10 | |
| 11 | |
| 12 | def find_all_dockerfiles(path, recursive=False): |
| 13 | dockerfile_regex = re.compile(r"^Dockerfile\..*$") |
| 14 | if not recursive: |
| 15 | dockerfiles = [os.path.join(path, x) for x in os.listdir(path) if dockerfile_regex.fullmatch(x)] |
| 16 | dockerfiles = [x for x in dockerfiles if os.path.isfile(x)] |
| 17 | return dockerfiles |
| 18 | dockerfiles = [] |
| 19 | for address, dirs, files in os.walk(path, topdown=True): |
| 20 | dockerfiles.extend([os.path.join(address, x) for x in files if dockerfile_regex.fullmatch(x)]) |
| 21 | return dockerfiles |
| 22 | |
| 23 | |
| 24 | def find_table(readme): |