I had this issue (re)installing portainer every time there was an update to docker on OMV6. For me, it was a DNS issue, even though terminal displayed "DNS OK." Yes, DNS was ok, but my ad blocker is at the DNS level (nextdns), and the logs showed it was blocking "api.ipify.org." I added it to the allowlist, and portainer installed with no issues.