import subprocess def download_docker_image(image_name=, tag='latest', destination='/tmp/hello-world'): try: command = [ 'skopeo', 'copy', f'docker://docker.io/{image_name}:{tag}', f'dir:{destination}' ] subprocess.run(command, check=True) print(f"Image '{image_name}:{tag}' downloaded successfully to {destination}.") except subprocess.CalledProcessError as e: print(f"Error downloading image: {str(e)}") # Example usage image_name = 'mintplexlabs/anythingllm' # Use 'library' for official images tag = 'latest' destination = '/tmp/mintplexlabs_anythingllm' download_docker_image(image_name, tag, destination)