Azure Devops Pipeline Caching for docker images returns error
I created an Azure Pipeline to build a docker container for arm64 architecture (so it's a cross build).
It works.
Then I tried to create a Pipeline Caching as explained here but the last step "Docker save" fails with error
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/7d13b438-9bad-4bf5-8087-df27d21fd4f1.sh
Error response from daemon: invalid reference format
##[error]Bash exited with code '1'.
Finishing: Docker save
I don't understand what is the reason, because after "Error response from daemon: invalid reference format" I cannot see a reason for the invalid format.
I add that I use a Docker@2 task of 'buildAndPush' (not only build) and the image has been pushed to a private Azure Container Registry.
The pipeline itself has access through a Service Connection specified in the docker buildAndPush as conatinerRegistry parameter.
Should I specify in some way the access to ACR in the "docker save" too?
How?
Can someone help?