(self, container_id, container_name)
return dest_container_id
Clone/duplicate an existing container creating a complete
        copy including metadata, control files, and rootfs, The copy
        will have a new id.
Clone/duplicate an existing container creating a complete
        copy including metadata, control files, and rootfs, The copy
        will have a new id.
Clone / duplicate an existing container creating a complete copy including metadata control files and rootfs The copy will have a new id .
def clone_container(self, container_id, container_name):
        """Clone/duplicate an existing container creating a complete
        copy including metadata, control files, and rootfs, The copy
        will have a new id.
        """
        if container_name:
            if self.localrepo.get_container_id(container_name):
                Msg().err("Error: container name already exists:",
                          container_name)
                return False
        dest_container_id = ContainerStructure(self.localrepo,
                                               container_id).clone()
        if container_name:
            self.localrepo.set_container_name(dest_container_id,
                                              container_name)
        exec_mode = ExecutionMode(self.localrepo, dest_container_id)
        xmode = exec_mode.get_mode()
        if xmode.startswith('F'):
            exec_mode.set_mode(xmode, True)
        return dest_container_id
def clone_container ( self , container_id , container_name ) : if container_name : if self . localrepo . get_container_id ( container_name ) : Msg ( ) . err ( "Error: container name already exists:" , container_name ) return False dest_container_id = ContainerStructure ( self . localrepo , container_id ) . clone ( ) if container_name : self . localrepo . set_container_name ( dest_container_id , container_name ) exec_mode = ExecutionMode ( self . localrepo , dest_container_id ) xmode = exec_mode . get_mode ( ) if xmode . startswith ( 'F' ) : exec_mode . set_mode ( xmode , True ) return dest_container_id