/go-acr-importer

Small CLI Application to Import Docker Images from other registries

Primary LanguageGo

go-acr-importer

A Go CLI app to help import images into Azure Container Registry

This app will import public container images specified into your private ACR instance.

Prequisites

  • Azure Container Registry Instance
  • Service Principal or User with Contributor permissions on the Container Registry Instance

Usage

Build the application

$ go build .

Run the application

Using azure-cli authenticated session:

go-acr-importer --ResourceGroupName "MyResourceGroup" \
                --DestinationRegistryName "MyAcrName" \
                --ImageNames "docker.mycompany.io/example/app:v1, docker.mycompany.io/example/app:latest"

Using MSI:

go-acr-importer --ResourceGroupName "MyResourceGroup" \
                --DestinationRegistryName "MyAcrName" \
                --ImageNames "docker.mycompany.io/example/app:v1, docker.mycompany.io/example/app:latest"
                --MSIAuthentication

Using Explicit Service Principal Credentials:

go-acr-importer --ResourceGroupName "MyResourceGroup" \
                --DestinationRegistryName "MyAcrName" \
                --ImageNames "docker.mycompany.io/example/app:v1, docker.mycompany.io/example/app:latest" \
                --SubscriptionId "00000000-0000-0000-0000-000000000000" \
                --TenantId "00000000-0000-0000-0000-000000000000" \
                --ClientId "00000000-0000-0000-0000-000000000000" \
                --ClientSecret "SecretSauce"

Help:

go-acr-importer --help