def docker_run(image, privileged=False):
flags = '<STR_LIT>'<EOL>if privileged:<EOL><INDENT>flags = '<STR_LIT>'<EOL><DEDENT>container = local(<EOL>'<STR_LIT>' % (flags, image), capture=True)<EOL>return container<EOL>
runs a docker container

params:
    string image: name of the docker image
    bool privileged: use docker --privileged flag
returns:
    string: stdout of the docker run