Copying images between projects

In incus-compose I use the default project as a cache for images, this works cause it requires a HTTPS remote it seems.

I tried to simulate the same behaviour with the incus cli:

❯ incus remote list | grep unix
| local (current)     | unix://                            | incus         | file access | NO     | YES    | NO     |

❯ INCUS_PROJECT=default incus image copy fad5dfa91840 local: --target-project=test --alias ghcr-registry.jochum.dev/lxc/incus-compose/ic-healthd
Error: The source server isn't listening on the network

Is this a bug? Should incus detect that the copy is on the same server but different projects?

Thanks,
René

Not really a bug so much as a missing feature. There is no API to do cross-project copies, so the only way to do it right now is by having the Incus server talk to itself as if it was another remote server (which is what happens when using an HTTPS remote).

It would make sense to introduce a server-side image copy API though, feel free to file a feature request on the Incus repo.