def build_docker_image(image, base_image, distribution):
if '<STR_LIT>' in distribution:<EOL><INDENT>contents = [<EOL>'<STR_LIT>' + base_image,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',  <EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>]<EOL><DEDENT>if '<STR_LIT>' in distribution:<EOL><INDENT>contents = [<EOL>'<STR_LIT>' + base_image,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',  <EOL>'<STR_LIT>',  <EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>]<EOL><DEDENT>contents = contents + [<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',  <EOL>'<STR_LIT>',  <EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>]<EOL>dockerfile = '<STR_LIT>' + distribution<EOL>with open(dockerfile, '<STR_LIT:w>') as f:<EOL><INDENT>f.write('<STR_LIT:\n>'.join(contents))<EOL><DEDENT>local('<STR_LIT>' % (dockerfile, image),<EOL>capture=False)<EOL>
Builds a docker image that will be used in the different TestCases

params:
    string image: tag of the new docker image to produce
    string base_image: name of the base docker image (centos, ...)
    string distribution: which distribution to build (centos/ubuntu)