def export_docker_container_to_directory(client, container, path):
<EOL>check_docker_command_works()<EOL>export_p = subprocess.Popen(<EOL>["<STR_LIT>", "<STR_LIT>", container.get_id()],<EOL>stderr=subprocess.PIPE,<EOL>stdout=subprocess.PIPE<EOL>)<EOL>try:<EOL><INDENT>os.mkdir(path, <NUM_LIT>)<EOL><DEDENT>except OSError as ex:<EOL><INDENT>if ex.errno == errno.EEXIST:<EOL><INDENT>logger.debug("<STR_LIT>", path)<EOL><DEDENT>else:<EOL><INDENT>logger.error("<STR_LIT>", path, ex)<EOL>raise<EOL><DEDENT><DEDENT>logger.debug("<STR_LIT>")<EOL>p = subprocess.Popen(<EOL>["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", path, "<STR_LIT>"],<EOL>stdin=subprocess.PIPE,<EOL>stderr=subprocess.PIPE,<EOL>)<EOL>while True:<EOL><INDENT>data = export_p.stdout.read(<NUM_LIT>)<EOL>if not data:<EOL><INDENT>break<EOL><DEDENT>p.stdin.write(data)<EOL><DEDENT>p.stdin.close()<EOL>p.wait()<EOL>export_p.wait()<EOL>if export_p.returncode:<EOL><INDENT>logger.error(export_p.stderr.read())<EOL>raise ConuException("<STR_LIT>" % container)<EOL><DEDENT>if p.returncode:<EOL><INDENT>logger.error(p.stderr.read())<EOL>raise ConuException("<STR_LIT>")<EOL><DEDENT>logger.debug("<STR_LIT>")<EOL>
take selected docker container, create an archive out of it and
unpack it to a selected location

:param client: instance of docker.APIClient
:param container: instance of DockerContainer
:param path: str, path to a directory, doesn't need to exist
:return: None