change to docker read

This commit is contained in:
Muzahid 2022-02-23 15:31:32 +05:30
parent ca943c6864
commit a40d498533
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='bionic'):
"""
with open(join(path + jobname), "r") as file:
contents = file.read()
# remove any line containing FROM or RUN keywords
re.match(r"(?m)^(FROM|RUN).*$", "", contents)
# accept any line containing FROM or RUN keywords
re.match(r"(?m)^(FROM|RUN).*$", contents)
return contents + dockerfile_extra_contents[os_codename]