def start_supporting_containers(sitedir, srcdir, passwords,<EOL>get_container_name, extra_containers, log_syslog=False):
if docker.is_boot2docker():<EOL><INDENT>docker.data_only_container(get_container_name('<STR_LIT>'),<EOL>['<STR_LIT>'])<EOL>rw = {}<EOL>volumes_from = get_container_name('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>rw = {sitedir + '<STR_LIT>': '<STR_LIT>'}<EOL>volumes_from = None<EOL><DEDENT>running = set(containers_running(get_container_name))<EOL>needed = set(extra_containers).union({'<STR_LIT>', '<STR_LIT>'})<EOL>if not needed.issubset(running):<EOL><INDENT>stop_supporting_containers(get_container_name, extra_containers)<EOL>docker.run_container(<EOL>name=get_container_name('<STR_LIT>'),<EOL>image='<STR_LIT>',<EOL>environment=passwords,<EOL>rw=rw,<EOL>volumes_from=volumes_from,<EOL>log_syslog=log_syslog)<EOL>docker.run_container(<EOL>name=get_container_name('<STR_LIT>'),<EOL>image='<STR_LIT>',<EOL>rw={sitedir + '<STR_LIT>': '<STR_LIT>'},<EOL>ro={srcdir + '<STR_LIT>': '<STR_LIT>'},<EOL>log_syslog=log_syslog)<EOL>for container in extra_containers:<EOL><INDENT>docker.run_container(<EOL>name=get_container_name(container),<EOL>image=EXTRA_IMAGE_MAPPING[container],<EOL>ro={<EOL>sitedir: '<STR_LIT>',<EOL>srcdir: '<STR_LIT>'<EOL>},<EOL>log_syslog=log_syslog<EOL>)<EOL><DEDENT><DEDENT>
Start all supporting containers (containers required for CKAN to
operate) if they aren't already running, along with some extra
containers specified by the user