Luuk
03/10/2022, 12:28 PMaz acr login --name acrname
logs out after a couple hours and requires me to do it again.
I also run the command within the docker image as well (for the docker agent)
It's all working, but after a while I get logged out from the ACR and my flow starts to crash.
Error message:
500 Server Error for http+docker://localhost/v1.41/images/create?tag=latest&fromImage=acrname.azurecr.io%2Fimage: Internal Server Error ("Head https://acrname.azurecr.io/v2/image/manifests/latest: unauthorized: authentication required")
version: "3.7"
services:
agent:
build:
context: ./
dockerfile: Dockerfile
entrypoint: ["/bin/sh", "-c"]
command:
- |
az acr login --name acrname
prefect agent docker start --env PREFECT__CLOUD_USE_LOCAL_SECRETS=false
volumes:
- ${HOME}/.azure:/root/.azure
- ${HOME}/.prefect:/root/.prefect
- /var/run/docker.sock:/var/run/docker.sock
Anna Geller
03/10/2022, 1:14 PMaz acr login
, you need to use:
docker login <http://yourregistry.azurecr.io|yourregistry.azurecr.io> -u $USER_NAME -p $PASSWORD
Luuk
03/10/2022, 1:33 PM