add match

This commit is contained in:
Muzahid 2022-02-22 12:41:10 +05:30
parent d3f4e3574e
commit d354d031d9
Signed by: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA
1 changed files with 2 additions and 2 deletions

View File

@ -75,8 +75,8 @@ def _get_dockerfile_contents(jobname, os_codename):
"""
with open(join(path + jobname), "r") as file:
contents = file.read()
# remove any line containing CMD or ENTRYFILE keywords
re.sub(r"(?m)^(CMD|ENTRYFILE).*$", "", contents)
# remove any line containing FROM or RUN keywords
re.match(r"(?m)^(FROM|RUN).*$", "", contents)
return contents + {
"focal": dockerfile_extra_contents_focal,