def copy(self, repository=None, tag=None,<EOL>source_transport=None,<EOL>target_transport=SkopeoTransport.DOCKER,<EOL>source_path=None, target_path=None,<EOL>logs=True):
if not repository:<EOL><INDENT>repository = self.name<EOL><DEDENT>if not tag:<EOL><INDENT>tag = self.tag if self.tag else "<STR_LIT>"<EOL><DEDENT>if target_transport == SkopeoTransport.OSTREE and tag and logs:<EOL><INDENT>logging.warning("<STR_LIT>")<EOL><DEDENT>target = (DockerImage(repository, tag, pull_policy=DockerImagePullPolicy.NEVER)<EOL>.using_transport(target_transport, target_path))<EOL>self.using_transport(source_transport, source_path)<EOL>try:<EOL><INDENT>run_cmd(["<STR_LIT>", "<STR_LIT>",<EOL>transport_param(self),<EOL>transport_param(target)])<EOL><DEDENT>except subprocess.CalledProcessError:<EOL><INDENT>raise ConuException("<STR_LIT>", self.name)<EOL><DEDENT>return target<EOL>
Copy this image

        :param repository to be copied to
        :param tag
        :param source_transport Transport
        :param target_transport Transport
        :param source_path needed to specify for dir, docker-archive or oci transport
        :param target_path needed to specify for dir, docker-archive or oci transport
        :param logs enable/disable logs
        :return: the new DockerImage