You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-import-images.md
+44-14Lines changed: 44 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Import container images
3
3
description: Import container images to an Azure container registry by using Azure APIs, without needing to run Docker commands.
4
4
ms.topic: article
5
-
ms.date: 02/06/2019
5
+
ms.date: 03/16/2020
6
6
---
7
7
8
8
# Import container images to a container registry
@@ -19,14 +19,14 @@ Azure Container Registry handles a number of common scenarios to copy images fro
19
19
20
20
Image import into an Azure container registry has the following benefits over using Docker CLI commands:
21
21
22
-
* Because your client environment doesn’t need a local Docker installation, import any container image, regardless of the supported OS type.
22
+
* Because your client environment doesn't need a local Docker installation, import any container image, regardless of the supported OS type.
23
23
24
24
* When you import multi-architecture images (such as official Docker images), images for all architectures and platforms specified in the manifest list get copied.
25
25
26
26
To import container images, this article requires that you run the Azure CLI in Azure Cloud Shell or locally (version 2.0.55 or later recommended). Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli].
27
27
28
28
> [!NOTE]
29
-
> If you need to distribute identical container images across multiple Azure regions, Azure Container Registry also supports [geo-replication](container-registry-geo-replication.md). By geo-replicating a registry (Premium SKU required), you can serve multiple regions with identical image and tag names from a single registry.
29
+
> If you need to distribute identical container images across multiple Azure regions, Azure Container Registry also supports [geo-replication](container-registry-geo-replication.md). By geo-replicating a registry (Premium service tier required), you can serve multiple regions with identical image and tag names from a single registry.
30
30
>
31
31
32
32
## Prerequisites
@@ -42,27 +42,38 @@ To import an image to an Azure container registry, your identity must have write
42
42
For example, use the [az acr import][az-acr-import] command to import the multi-architecture `hello-world:latest` image from Docker Hub to a registry named *myregistry*. Because `hello-world` is an official image from Docker Hub, this image is in the default `library` repository. Include the repository name and optionally a tag in the value of the `--source` image parameter. (You can optionally identify an image by its manifest digest instead of by tag, which guarantees a particular version of an image.)
43
43
44
44
```azurecli
45
-
az acr import --name myregistry --source docker.io/library/hello-world:latest --image hello-world:latest
45
+
az acr import \
46
+
--name myregistry \
47
+
--source docker.io/library/hello-world:latest \
48
+
--image hello-world:latest
46
49
```
47
50
48
51
You can verify that multiple manifests are associated with this image by running the `az acr repository show-manifests` command:
49
52
50
53
```azurecli
51
-
az acr repository show-manifests --name myregistry --repository hello-world
54
+
az acr repository show-manifests \
55
+
--name myregistry \
56
+
--repository hello-world
52
57
```
53
58
54
59
The following example imports a public image from the `tensorflow` repository in Docker Hub:
55
60
56
61
```azurecli
57
-
az acr import --name myregistry --source docker.io/tensorflow/tensorflow:latest-gpu --image tensorflow:latest-gpu
### Import from a registry in a different subscription
91
107
92
-
In the following example, *mysourceregistry* is in a different subscription from *myregistry* in the same Active Directory tenant. Supply the resource ID of the source registry with the `--registry` parameter. Notice that the `--source` parameter specifies only the source repository and image name, not the registry login server name.
93
-
108
+
In the following example, *mysourceregistry* is in a different subscription from *myregistry* in the same Active Directory tenant. Supply the resource ID of the source registry with the `--registry` parameter. Notice that the `--source` parameter specifies only the source repository and tag, not the registry login server name.
### Import from a registry using service principal credentials
99
119
100
120
To import from a registry that you can't access using Active Directory permissions, you can use service principal credentials (if available). Supply the appID and password of an Active Directory [service principal](container-registry-auth-service-principal.md) that has ACRPull access to the source registry. Using a service principal is useful for build systems and other unattended systems that need to import images to your registry.
## Import from a non-Azure private container registry
107
132
108
133
Import an image from a private registry by specifying credentials that enable pull access to the registry. For example, pull an image from a private Docker registry:
0 commit comments