Skip to content

Commit 59bb29e

Browse files
authored
Merge pull request #190536 from dksimpson/azure-docs-pr-20220126-validation-8
Validation bulk update: Fix code tags for Azure CLI code blocks - batch 8
2 parents 2d82c03 + 551a283 commit 59bb29e

10 files changed

+33
-27
lines changed

articles/container-registry/container-registry-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Output displays the access token, abbreviated here:
7171
```
7272
For registry authentication, we recommend that you store the token credential in a safe location and follow recommended practices to manage [docker login](https://docs.docker.com/engine/reference/commandline/login/) credentials. For example, store the token value in an environment variable:
7373

74-
```bash
74+
```azurecli
7575
TOKEN=$(az acr login --name <acrName> --expose-token --output tsv --query accessToken)
7676
```
7777

articles/container-registry/container-registry-check-health.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ az acr check-health --ignore-errors
5858
5959
# Check environment and target registry; skip confirmation to pull image
6060
az acr check-health --name myregistry --ignore-errors --yes
61-
```
61+
```
6262

6363
Sample output:
6464

65-
```console
66-
$ az acr check-health --name myregistry --ignore-errors --yes
65+
```azurecli
66+
az acr check-health --name myregistry --ignore-errors --yes
67+
```
6768

69+
```output
6870
Docker daemon status: available
6971
Docker version: Docker version 18.09.2, build 6247962
7072
Docker pull of 'mcr.microsoft.com/mcr/hello-world:latest' : OK

articles/container-registry/container-registry-customer-managed-keys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ az keyvault set-policy \
131131

132132
Alternatively, use [Azure RBAC for Key Vault](../key-vault/general/rbac-guide.md) to assign permissions to the identity to access the key vault. For example, assign the Key Vault Crypto Service Encryption role to the identity using the [az role assignment create](/cli/azure/role/assignment#az_role_assignment_create) command:
133133

134-
```azurecli
134+
```azurecli
135135
az role assignment create --assignee $identityPrincipalID \
136136
--role "Key Vault Crypto Service Encryption User" \
137137
--scope $keyvaultID
@@ -149,7 +149,7 @@ az keyvault key create \
149149

150150
In the command output, take note of the key's ID, `kid`. You use this ID in the next step:
151151

152-
```JSON
152+
```output
153153
[...]
154154
"key": {
155155
"crv": null,
@@ -315,7 +315,7 @@ You can also use a Resource Manager template to create a registry and enable enc
315315

316316
The following template creates a new container registry and a user-assigned managed identity. Copy the following contents to a new file and save it using a filename such as `CMKtemplate.json`.
317317

318-
```JSON
318+
```json
319319
{
320320
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
321321
"contentVersion": "1.0.0.0",
@@ -425,7 +425,7 @@ Follow the steps in the previous sections to create the following resources:
425425

426426
Run the following [az deployment group create][az-deployment-group-create] command to create the registry using the preceding template file. Where indicated, provide a new registry name and managed identity name, as well as the key vault name and key ID you created.
427427

428-
```bash
428+
```azurecli
429429
az deployment group create \
430430
--resource-group <resource-group-name> \
431431
--template-file CMKtemplate.json \

articles/container-registry/container-registry-delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ After identifying stale manifest digests, you can run the following Bash script
115115
> [!WARNING]
116116
> Use the following sample script with caution--deleted image data is UNRECOVERABLE. If you have systems that pull images by manifest digest (as opposed to image name), you should not run these scripts. Deleting the manifest digests will prevent those systems from pulling the images from your registry. Instead of pulling by manifest, consider adopting a *unique tagging* scheme, a [recommended best practice](container-registry-image-tag-version.md).
117117
118-
```bash
118+
```azurecli
119119
#!/bin/bash
120120
121121
# WARNING! This script deletes data!

articles/container-registry/container-registry-helm-repos.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Successfully packaged chart and saved it to: /my/path/hello-world-0.1.0.tgz
140140
Run `helm registry login` to authenticate with the registry. You may pass [registry credentials](container-registry-authentication.md) appropriate for your scenario, such as service principal credentials, user identity, or a repository-scoped token.
141141

142142
- Authenticate with an Azure Active Directory [service principal with pull and push permissions](container-registry-auth-service-principal.md#create-a-service-principal) (AcrPush role) to the registry.
143-
```bash
143+
```azurecli
144144
SERVICE_PRINCIPAL_NAME=<acr-helm-sp>
145145
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
146146
PASSWORD=$(az ad sp create-for-rbac --name $SERVICE_PRINCIPAL_NAME \
@@ -150,12 +150,12 @@ Run `helm registry login` to authenticate with the registry. You may pass [regi
150150
USER_NAME=$(az ad sp list --display-name $SERVICE_PRINCIPAL_NAME --query "[].appId" --output tsv)
151151
```
152152
- Authenticate with your [individual Azure AD identity](container-registry-authentication.md?tabs=azure-cli#individual-login-with-azure-ad) to push and pull Helm charts using an AD token.
153-
```bash
153+
```azurecli
154154
USER_NAME="00000000-0000-0000-0000-000000000000"
155155
PASSWORD=$(az acr login --name $ACR_NAME --expose-token --output tsv --query accessToken)
156156
```
157157
- Authenticate with a [repository scoped token](container-registry-repository-scoped-permissions.md) (Preview).
158-
```bash
158+
```azurecli
159159
USER_NAME="helm-token"
160160
PASSWORD=$(az acr token create -n $USER_NAME \
161161
-r $ACR_NAME \

articles/container-registry/container-registry-java-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Finally, you'll update your project configuration and use the command prompt to
134134

135135
1. Navigate to the complete project directory for your Spring Boot application and run the following command to build the image and push the image to the registry:
136136

137-
```bash
137+
```azurecli
138138
az acr login && mvn compile jib:build
139139
```
140140

articles/container-registry/container-registry-oras-artifacts.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ az acr create \
6969

7070
In the command output, note the `zoneRedundancy` property for the registry. When enabled, the registry is zone redundant, and ORAS Artifact enabled:
7171

72-
```JSON
72+
```output
7373
{
7474
[...]
7575
"zoneRedundancy": "Enabled",
@@ -98,14 +98,14 @@ Run `oras login` to authenticate with the registry. You may pass [registry cred
9898

9999
- Authenticate with your [individual Azure AD identity](container-registry-authentication.md?tabs=azure-cli#individual-login-with-azure-ad) to use an AD token.
100100

101-
```bash
101+
```azurecli
102102
USER_NAME="00000000-0000-0000-0000-000000000000"
103103
PASSWORD=$(az acr login --name $ACR_NAME --expose-token --output tsv --query accessToken)
104104
```
105105

106106
- Authenticate with a [repository scoped token](container-registry-repository-scoped-permissions.md) (Preview) to use non-AD based tokens.
107107

108-
```bash
108+
```azurecli
109109
USER_NAME="oras-token"
110110
PASSWORD=$(az acr token create -n $USER_NAME \
111111
-r $ACR_NAME \
@@ -116,7 +116,7 @@ Run `oras login` to authenticate with the registry. You may pass [registry cred
116116

117117
- Authenticate with an Azure Active Directory [service principal with pull and push permissions](container-registry-auth-service-principal.md#create-a-service-principal) (AcrPush role) to the registry.
118118

119-
```bash
119+
```azurecli
120120
SERVICE_PRINCIPAL_NAME="oras-sp"
121121
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
122122
PASSWORD=$(az ad sp create-for-rbac --name $SERVICE_PRINCIPAL_NAME \
@@ -364,7 +364,7 @@ The signature is untagged, but tracked as a `oras.artifact.manifest` reference t
364364

365365
Support for the ORAS Artifacts specification enables deleting the graph of artifacts associated with the root artifact. Use the [az acr repository delete][az-acr-repository-delete] command to delete the signature, SBoM and the signature of the SBoM.
366366

367-
```bash
367+
```azurecli
368368
az acr repository delete \
369369
-n $ACR_NAME \
370370
-t ${REPO}:$TAG -y

articles/container-registry/container-registry-private-link.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ xxxx.westeurope.cloudapp.azure.com. 10 IN A 20.45.122.144
376376

377377
Also verify that you can perform registry operations from the virtual machine in the network. Make an SSH connection to your virtual machine, and run [az acr login][az-acr-login] to login to your registry. Depending on your VM configuration, you might need to prefix the following commands with `sudo`.
378378

379-
```bash
379+
```azurecli
380380
az acr login --name $REGISTRY_NAME
381381
```
382382

articles/container-registry/container-registry-tutorial-private-base-image-update.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ az acr task list-runs --registry $ACR_NAME --output table
179179

180180
If you completed the previous tutorial (and didn't delete the registry), you should see output similar to the following. Take note of the number of task runs, and the latest RUN ID, so you can compare the output after you update the base image in the next section.
181181

182-
```console
183-
$ az acr task list-runs --registry $ACR_NAME --output table
182+
```azurecli
183+
az acr task list-runs --registry $ACR_NAME --output table
184+
```
184185

186+
```output
185187
UN ID TASK PLATFORM STATUS TRIGGER STARTED DURATION
186188
-------- -------------- ---------- --------- ------------ -------------------- ----------
187189
ca12 baseexample2 linux Succeeded Manual 2020-11-21T00:00:56Z 00:00:36
@@ -218,9 +220,11 @@ az acr task list-runs --registry $ACR_NAME --output table
218220

219221
Output is similar to the following. The TRIGGER for the last-executed build should be "Image Update", indicating that the task was kicked off by your quick task of the base image.
220222

221-
```console
222-
$ az acr task list-runs --registry $ACR_NAME --output table
223+
```azurecli
224+
az acr task list-runs --registry $ACR_NAME --output table
225+
```
223226

227+
```output
224228
PLATFORM STATUS TRIGGER STARTED DURATION
225229
-------- -------------- ---------- --------- ------------ -------------------- ----------
226230
ca13 baseexample2 linux Succeeded Image Update 2020-11-21T00:06:00Z 00:00:43

articles/container-registry/container-registry-vnet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ az network vnet list \
5959

6060
Output:
6161

62-
```console
62+
```output
6363
[
6464
{
6565
"Name": "myDockerVMVNET",
@@ -91,7 +91,7 @@ az network vnet subnet show \
9191

9292
Output:
9393

94-
```
94+
```output
9595
/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myDockerVMVNET/subnets/myDockerVMSubnet
9696
```
9797

@@ -117,7 +117,7 @@ az acr network-rule add \
117117

118118
After waiting a few minutes for the configuration to update, verify that the VM can access the container registry. Make an SSH connection to your VM, and run the [az acr login][az-acr-login] command to login to your registry.
119119

120-
```bash
120+
```azurecli
121121
az acr login --name mycontainerregistry
122122
```
123123

@@ -131,7 +131,7 @@ Docker successfully pulls the image to the VM.
131131

132132
This example demonstrates that you can access the private container registry through the network access rule. However, the registry can't be accessed from a login host that doesn't have a network access rule configured. If you attempt to login from another host using the `az acr login` command or `docker login` command, output is similar to the following:
133133

134-
```Console
134+
```output
135135
Error response from daemon: login attempt to https://xxxxxxx.azurecr.io/v2/ failed with status: 403 Forbidden
136136
```
137137

0 commit comments

Comments
 (0)