module_utils/ca_common.py
def container_exec(binary, container_image, interactive=False):
    '''
    Build the docker CLI to run a command inside a container
    '''

    container_binary = os.getenv('CEPH_CONTAINER_BINARY')
    command_exec = [container_binary, 'run']

    if interactive:
        command_exec.extend(['--interactive'])

    command_exec.extend(['--rm',
                         '--net=host',
                         '-v', '/etc/ceph:/etc/ceph:z',
                         '-v', '/var/lib/ceph/:/var/lib/ceph/:z',
                         '-v', '/var/log/ceph/:/var/log/ceph/:z',
                         '--entrypoint=' + binary, container_image])
    return command_exec

    Build the docker CLI to run a command inside a container
    
Build the docker CLI to run a command inside a container
Build the docker CLI to run a command inside a container
def container_exec(binary, container_image, interactive=False):
    container_binary = os.getenv('CEPH_CONTAINER_BINARY')
    command_exec = [container_binary, 'run']
    if interactive:
        command_exec.extend(['--interactive'])
    command_exec.extend(['--rm',
                         '--net=host',
                         '-v', '/etc/ceph:/etc/ceph:z',
                         '-v', '/var/lib/ceph/:/var/lib/ceph/:z',
                         '-v', '/var/log/ceph/:/var/log/ceph/:z',
                         '--entrypoint=' + binary, container_image])
    return command_exec
def container_exec ( binary , container_image , interactive = False ) : container_binary = os . getenv ( 'CEPH_CONTAINER_BINARY' ) command_exec = [ container_binary , 'run' ] if interactive : command_exec . extend ( [ '--interactive' ] ) command_exec . extend ( [ '--rm' , '--net=host' , '-v' , '/etc/ceph:/etc/ceph:z' , '-v' , '/var/lib/ceph/:/var/lib/ceph/:z' , '-v' , '/var/log/ceph/:/var/log/ceph/:z' , '--entrypoint=' + binary , container_image ] ) return command_exec
Build the docker CLI to run a command inside a container
Build the docker CLI to run a command inside a container
'''
    Build the docker CLI to run a command inside a container
    '''
binary
container_image
interactive