diff --git a/src/main/java/org/jenkinsci/plugins/docker/workflow/Dockerfile.java b/src/main/java/org/jenkinsci/plugins/docker/workflow/Dockerfile.java index 685930c03..6ee5b5f4b 100644 --- a/src/main/java/org/jenkinsci/plugins/docker/workflow/Dockerfile.java +++ b/src/main/java/org/jenkinsci/plugins/docker/workflow/Dockerfile.java @@ -65,18 +65,11 @@ private void parse() throws IOException, InterruptedException { String line; while ((line = r.readLine()) != null) { line = line.trim(); - if (line.startsWith("#")) { - continue; - } if (line.startsWith(ARG)) { String[] keyVal = parseDockerfileArg(line.substring(4)); args.put(keyVal[0], keyVal[1]); - continue; - } - - if (line.startsWith(FROM)) { + } else if (line.startsWith(FROM)) { froms.add(line.substring(5)); - continue; } } }