Im trying to login to an azure registry container on Azure Kubernetes Service, I get the error message below when i type the below azure CLI login command
az acr login --name myacrname
You may want to use 'az acr login -n myacrname --expose-token' to get an access token, which does not require Docker to be installed.
2022-09-01 12:26:43.255314 An error occurred: DOCKER_COMMAND_ERROR
error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json": open //./pipe/docker_engine: The system cannot find the file specified.
2
Answers
Error was caused by the Docker Desktop Service not running due to WSL (Windows Sub-system for Linux) Update wsl_update_x64.msi. After installing, the error did not occur again when using the az acr login --name myacrname.
You need to substitute the Azure Service Principal ID in the below command instead of ‘XXXX’ and use the appropriate Client secret instead of ‘YYYY’ to login to ACR,