From d354d031d9fa3ff70a07ffb44cef0cdadd32be0c Mon Sep 17 00:00:00 2001 From: Muzahid Date: Tue, 22 Feb 2022 12:41:10 +0530 Subject: [PATCH] add match --- lib/worker_multibuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/worker_multibuild.py b/lib/worker_multibuild.py index ff05eaf..9f48875 100644 --- a/lib/worker_multibuild.py +++ b/lib/worker_multibuild.py @@ -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,