def write_dockerfile(self, output_dir):
if not os.path.exists(output_dir):<EOL><INDENT>os.makedirs(output_dir)<EOL><DEDENT>lines = []<EOL>for istep, step in enumerate(self.steps):<EOL><INDENT>if istep == <NUM_LIT:0>:<EOL><INDENT>lines.extend(step.dockerfile_lines)<EOL><DEDENT>else:<EOL><INDENT>lines.extend(step.dockerfile_lines[<NUM_LIT:1>:])<EOL><DEDENT><DEDENT>path = os.path.join(output_dir, '<STR_LIT>' % self.imagename)<EOL>with open(path, '<STR_LIT:w>') as outfile:<EOL><INDENT>outfile.write('<STR_LIT:\n>'.join(lines))<EOL><DEDENT>print('<STR_LIT>' % path)<EOL>
Used only to write a Dockerfile that will NOT be built by docker-make