#NEWLINE# def execute_in_docker( self , command ) : #NEWLINE# #INDENT# 'Executes command inside the running docker image' #NEWLINE# logger . debug ( "Executing '%s'" , command ) #NEWLINE# exec_id = self . _docker_client . exec_create ( self . _container_id , command ) #NEWLINE# output = self . _docker_client . exec_start ( exec_id ) #NEWLINE# returncode = self . _docker_client . exec_inspect ( exec_id ) [ 'ExitCode' ] #NEWLINE# return ( returncode , output )