Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Import-AzContainerRegistryImage
- Module:
- Az.ContainerRegistry Module
Copies an image to this container registry from the specified container registry.
Syntax
ImportExpanded (Default)
Import-AzContainerRegistryImage
-RegistryName <String>
-ResourceGroupName <String>
-SourceImage <String>
[-SubscriptionId <String>]
[-Mode <String>]
[-Password <String>]
[-SourceRegistryUri <String>]
[-SourceResourceId <String>]
[-TargetTag <String[]>]
[-UntaggedTargetRepository <String[]>]
[-Username <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ImportViaJsonFilePath
Import-AzContainerRegistryImage
-RegistryName <String>
-ResourceGroupName <String>
-JsonFilePath <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ImportViaJsonString
Import-AzContainerRegistryImage
-RegistryName <String>
-ResourceGroupName <String>
-JsonString <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Copies an image to this container registry from the specified container registry.
Examples
Example 1: Import image from a public/azure registry to an azure container registry.
Import-AzContainerRegistryImage -SourceImage library/busybox:latest -ResourceGroupName YourResourceGroupName -RegistryName YourRegistryName -SourceRegistryUri docker.io -TargetTag busybox:latest
Import busybox to ACR. Note: "library/" need to be add before source image. "busybox:latest" => "library/busybox:latest" Credential needed if source registry is not publicly available SourceRegistryResourceId or SourceRegistryUri is required for this cmdlet
Parameters
-AsJob
Run the command as a job
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
| Type: | PSObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzureRMContext, AzureCredential |
Parameter sets
-JsonFilePath
Path of Json file supplied to the Import operation
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-JsonString
Json string supplied to the Import operation
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Mode
When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation before any copying begins.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-NoWait
Run the command asynchronously
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PassThru
Returns true when the command succeeds
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Password
The password used to authenticate with the source registry.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-RegistryName
The name of the container registry.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
The name of the resource group. The name is case insensitive.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SourceImage
Repository name of the source image.Specify an image by repository ('hello-world'). This will use the 'latest' tag.Specify an image by tag ('hello-world:latest').Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SourceRegistryUri
The address of the source registry (e.g. 'mcr.microsoft.com').
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SourceResourceId
The resource identifier of the source Azure Container Registry.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | SourceRegistryResourceId |
Parameter sets
-SubscriptionId
The ID of the target subscription. The value must be an UUID.
Parameter properties
| Type: | String |
| Default value: | (Get-AzContext).Subscription.Id |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-TargetTag
List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted).
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-UntaggedTargetRepository
List of strings of repository names to do a manifest only copy. No tag will be created.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Username
The username to authenticate with the source registry.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
Boolean
Azure PowerShell
Feedback
Was this page helpful?
