Share via

AZ AKS Training | Registry Login

Nolan Lemuel Augustine 260 Reputation points
2023-12-04T16:29:02.99+00:00

Hi All,

Refer to screenGrab:

This exercise says Login should work directly from my local machine CLI, but the CLI says I need to have docker installed, please advise?

User's image

Azure | Azure Training
0 comments No comments

Answer accepted by question author
  1. TP 155.7K Reputation points Volunteer Moderator
    2023-12-04T21:57:27.3033333+00:00

    Hi,

    You need Docker to complete the exercises. Please download and install Docker Desktop (it's free for Personal use):

    Install Docker Desktop on Windows

    https://docs.docker.com/desktop/install/windows-install/

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AmaranS 7,285 Reputation points Microsoft External Staff
    2023-12-05T02:06:40.6766667+00:00

    Hi @Nolan Lemuel Augustine  

    It seems like the exercise you're working on requires Docker to be installed on your local machine, likely because it involves deploying with containerized applications, possibly within an Azure Kubernetes Service (AKS) environment.

    "az acr login -n <registry-name>" required Docker CLI and Docker daemon to be installed (and running). This is documented in the public documentation here: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication?tabs=azure-cli#individual-login-with-azure-ad

    "When you log in with az acr login, the CLI uses the token created when you executed az login to seamlessly authenticate your session with your registry. To complete the authentication flow, the Docker CLI and Docker daemon must be installed and running in your environment. az acr login uses the Docker client to set an Azure Active Directory token in the docker.config file. Once you've logged in this way, your credentials are cached, and subsequent docker commands in your session do not require a username or password."

    To successfully run "az acr login -n <registry-name>" you can:

    1.Install Docker CLI and Docker daemon. Select the OS used from here: https://docs.docker.com/engine/install/ Most probably, if you're using WSL2, you will need,

    https://docs.docker.com/desktop/install/windows-install/

    if it's already installed, make sure to run it.

    2.Add "--expose-token" parameter, which doesn't require Docker daemon, but with this, you won't be able to run commands that require the Docker daemon, like "docker pull" or "docker push". The most use case for "az acr login -n <registry-name> --expose-token" is to run scripts that require to be logged in to ACR but doesn't require operations for which the Docker daemon is mandatory. More details here: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication?tabs=azure-cli#az-acr-login-with---expose-token.

    If you encounter any specific error messages during this process, please provide more details so that I can offer more targeted assistance. Additionally, if the exercise documentation provides any specific guidance on Docker usage, make sure to follow those instructions closely.

    If the issue persists, please let us know we will help you further.

    Thank you.

    2 people found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.