az acr repository

管理 Azure Container Registries 的存放庫(映射名稱)。

命令

名稱 Description 類型 狀態
az acr repository delete

刪除 Azure Container Registry 中的存放庫或映射。

核心 GA
az acr repository list

列出 Azure Container Registry 中的存放庫。

核心 GA
az acr repository list-deleted

列出 Azure Container Registry 中的虛刪除存放庫。

核心 預覽版
az acr repository show

取得 Azure Container Registry 中存放庫或映射的屬性。

核心 GA
az acr repository show-manifests

在 Azure Container Registry 中顯示存放庫的資訊清單。

核心 已取代
az acr repository show-tags

在 Azure Container Registry 中顯示存放庫的標籤。

核心 GA
az acr repository untag

在 Azure Container Registry 中解除標記映射。

核心 GA
az acr repository update

更新 Azure Container Registry 中存放庫或映射的屬性。

核心 GA

az acr repository delete

刪除 Azure Container Registry 中的存放庫或映射。

此命令會刪除容器登錄中任何其他資訊清單未參考的所有相關聯圖層資料。

az acr repository delete --name
                         [--image]
                         [--password]
                         [--repository]
                         [--suffix]
                         [--username]
                         [--yes]

範例

依標記刪除映射資訊清單。 這會刪除 'hello-world:latest' 所參考的資訊清單,以及參考相同資訊清單的所有其他標籤。

az acr repository delete -n myregistry --image hello-world:latest

依 sha256 型資訊清單摘要刪除映射資訊清單。 這會刪除 'hello-world@sha256:abc123' 所識別的資訊清單,以及參考資訊清單的所有標記。

az acr repository delete -n myregistry --image hello-world@sha256:abc123

從 Azure Container Registry 刪除存放庫。 這會刪除 'hello-world' 底下的所有資訊清單和標籤。

az acr repository delete -n myregistry --repository hello-world

必要參數

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--image -t

影像的名稱。 可以包含格式為 'name:tag' 的標記,或格式為 'name@digest' 的摘要。

--password -p

用來登入容器登錄的密碼。

--repository

存放庫的名稱。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--username -u

用來登入容器登錄的使用者名稱。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az acr repository list

列出 Azure Container Registry 中的存放庫。

az acr repository list --name
                       [--password]
                       [--suffix]
                       [--top]
                       [--username]

範例

列出指定 Azure Container Registry 中的存放庫。

az acr repository list -n myregistry

必要參數

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--password -p

用來登入容器登錄的密碼。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--top

限制結果中的專案數目。

--username -u

用來登入容器登錄的使用者名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az acr repository list-deleted

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出 Azure Container Registry 中的虛刪除存放庫。

az acr repository list-deleted --name
                               [--password]
                               [--suffix]
                               [--username]

範例

列出指定 Azure Container Registry 中的虛刪除存放庫。

az acr repository list-deleted -n myregistry

必要參數

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--password -p

用來登入容器登錄的密碼。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--username -u

用來登入容器登錄的使用者名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az acr repository show

取得 Azure Container Registry 中存放庫或映射的屬性。

az acr repository show --name
                       [--image]
                       [--password]
                       [--repository]
                       [--suffix]
                       [--username]

範例

取得存放庫 'hello-world' 的屬性。

az acr repository show -n myregistry --repository hello-world

取得標記 'hello-world:latest' 所參考影像的屬性。

az acr repository show -n myregistry --image hello-world:latest

取得摘要 'hello-world@sha256:abc123' 所參考影像的屬性。

az acr repository show -n myregistry --image hello-world@sha256:abc123

必要參數

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--image -t

影像的名稱。 可以包含格式為 'name:tag' 的標記,或格式為 'name@digest' 的摘要。

--password -p

用來登入容器登錄的密碼。

--repository

存放庫的名稱。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--username -u

用來登入容器登錄的使用者名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az acr repository show-manifests

已被取代

此命令已被取代,並將在未來版本中移除。 請改用 'acr manifest list-metadata'。

在 Azure Container Registry 中顯示存放庫的資訊清單。

az acr repository show-manifests --name
                                 --repository
                                 [--detail]
                                 [--orderby {time_asc, time_desc}]
                                 [--password]
                                 [--suffix]
                                 [--top]
                                 [--username]

範例

在 Azure Container Registry 中顯示存放庫的資訊清單。

az acr repository show-manifests -n myregistry --repository MyRepository

顯示依 Azure Container Registry 中存放庫時間戳記排序的最新 10 個資訊清單。

az acr repository show-manifests -n myregistry --repository MyRepository --top 10 --orderby time_desc

顯示最新 10 個資訊清單的詳細資訊,這些資訊清單會依 Azure Container Registry 中存放庫的時間戳記排序。

az acr repository show-manifests -n myregistry --repository MyRepository --top 10 --orderby time_desc --detail

必要參數

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

--repository

存放庫的名稱。

選擇性參數

--detail

顯示詳細資訊。

預設值: False
--orderby

排序結果中的專案。 預設為名稱的字母順序。

接受的值: time_asc, time_desc
--password -p

用來登入容器登錄的密碼。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--top

限制結果中的專案數目。

--username -u

用來登入容器登錄的使用者名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az acr repository show-tags

在 Azure Container Registry 中顯示存放庫的標籤。

az acr repository show-tags --name
                            --repository
                            [--detail]
                            [--orderby {time_asc, time_desc}]
                            [--password]
                            [--suffix]
                            [--top]
                            [--username]

範例

在 Azure Container Registry 中顯示存放庫的標記。

az acr repository show-tags -n myregistry --repository MyRepository

在 Azure Container Registry 中顯示存放庫標記的詳細資訊。

az acr repository show-tags -n myregistry --repository MyRepository --detail

顯示 Azure Container Registry 中存放庫時間戳記所排序的最新 10 個標記詳細資訊。

az acr repository show-tags -n myregistry --repository MyRepository --top 10 --orderby time_desc --detail

必要參數

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

--repository

存放庫的名稱。

選擇性參數

--detail

顯示詳細資訊。

預設值: False
--orderby

排序結果中的專案。 預設為名稱的字母順序。

接受的值: time_asc, time_desc
--password -p

用來登入容器登錄的密碼。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--top

限制結果中的專案數目。

--username -u

用來登入容器登錄的使用者名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az acr repository untag

在 Azure Container Registry 中解除標記映射。

此命令不會刪除標記或任何相關聯圖層資料所參考的資訊清單。

az acr repository untag --image
                        --name
                        [--password]
                        [--suffix]
                        [--username]

範例

從存放庫解除標記映射。

az acr repository untag -n myregistry --image hello-world:latest

必要參數

--image -t

影像的名稱。 可包含格式為 'name:tag' 的標記。

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--password -p

用來登入容器登錄的密碼。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--username -u

用來登入容器登錄的使用者名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az acr repository update

更新 Azure Container Registry 中存放庫或映射的屬性。

az acr repository update --name
                         [--delete-enabled {false, true}]
                         [--image]
                         [--list-enabled {false, true}]
                         [--password]
                         [--read-enabled {false, true}]
                         [--repository]
                         [--suffix]
                         [--username]
                         [--write-enabled {false, true}]

範例

更新存放庫 'hello-world' 的屬性,以停用寫入作業。

az acr repository update -n myregistry --repository hello-world --write-enabled false

更新標記 'hello-world:latest' 所參考影像的屬性,以停用寫入作業。

az acr repository update -n myregistry --image hello-world:latest --write-enabled false

更新摘要 'hello-world@sha256:abc123' 所參考之映射的屬性,以停用寫入作業。

az acr repository update -n myregistry --image hello-world@sha256:abc123 --write-enabled false

必要參數

--name -n

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--delete-enabled

指出是否允許刪除作業。

接受的值: false, true
--image -t

影像的名稱。 可以包含格式為 'name:tag' 的標記,或格式為 'name@digest' 的摘要。

--list-enabled

指出此專案是否顯示在清單作業結果中。

接受的值: false, true
--password -p

用來登入容器登錄的密碼。

--read-enabled

指出是否允許讀取作業。

接受的值: false, true
--repository

存放庫的名稱。

--suffix

登錄登入伺服器中的租使用者尾碼。 如果您的登錄登入伺服器格式為 'registry-tenant.azurecr.io',您可以指定 '--suffix tenant'。 適用于您從不同的訂用帳戶存取登錄,或您有權存取映射,但無權管理登錄資源。

--username -u

用來登入容器登錄的使用者名稱。

--write-enabled

指出是否允許寫入或刪除作業。

接受的值: false, true
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。