Soru

Zorluk: OrtaManage Container Images in Azure Container Registry

You are a developer managing container images in Azure. You need to copy a container image named application:v1 from a development Azure Container Registry named devreg to a production Azure Container Registry named prodreg. Both registries are in the same Azure subscription. To save network bandwidth and time, you want to perform this copy directly from registry to registry, without downloading the image to your local workspace or requiring a local Docker installation. Which Azure CLI command should you run?

  1. A
    docker pull devreg.azurecr.io/application:v1 followed by tagging and pushing the image to prodreg.azurecr.io
  2. B
    az acr build --registry prodreg --image application:v1 https://devreg.azurecr.io/application:v1
  3. az acr import --name prodreg --source devreg.azurecr.io/application:v1 --image application:v1Cevap
  4. D
    Enable a system-assigned managed identity on devreg and grant it push access to prodreg, then run az acr login --name prodreg --identity

Cevap

Run the command: az acr import --name prodreg --source devreg.azurecr.io/application:v1 --image application:v1
The correct command is the one starting with 'az acr import', as it enables registry-to-registry import directly in the cloud without downloading the image or requiring a local Docker installation.

Adım Adım Çözüm

1
Identify the target registry name and the fully qualified source image path.
Target registry is 'prodreg', source image path is 'devreg.azurecr.io/application:v1'.
The import command requires the destination registry name and the source image identifier.
2
Select the correct Azure CLI command for registry-to-registry image copying.
The correct command is 'az acr import'.
This command performs a registry-to-registry import entirely in the cloud without downloading image layers locally.
3
Construct and execute the command specifying the target registry, source registry/image, and target image name/tag.
The final command is: az acr import --name prodreg --source devreg.azurecr.io/application:v1 --image application:v1
This provides all required parameters to copy the image directly on the Azure backend.

Anahtar Kavram

Direct registry-to-registry container image importing in Azure Container Registry
Bu soruyu puanla