def restore_image_options(cli, image, options):
dockerfile = io.StringIO()<EOL>dockerfile.write(u'<STR_LIT>'.format(<EOL>image=image, cmd=json.dumps(options['<STR_LIT>'])))<EOL>if options['<STR_LIT>']:<EOL><INDENT>dockerfile.write(<EOL>'<STR_LIT>'.format(json.dumps(options['<STR_LIT>'])))<EOL><DEDENT>cli.build(tag=image, fileobj=dockerfile)<EOL>
Restores CMD and ENTRYPOINT values of the image

    This is needed because we force the overwrite of ENTRYPOINT and CMD in the
    `run_code_in_container` function, to be able to run the code in the
    container, through /bin/bash.