acr {AzureContainers}R Documentation

Azure Container Registry class

Description

Class representing an Azure Container Registry (ACR) resource. For working with the registry endpoint itself, including uploading and downloading images etc, see docker_registry.

Methods

The following methods are available, in addition to those provided by the AzureRMR::az_resource class:

Details

Initializing a new object of this class can either retrieve an existing registry resource, or create a new registry on the host. Generally, the best way to initialize an object is via the get_acr, create_acr or list_acrs methods of the az_resource_group class, which handle the details automatically.

Note that this class is separate from the Docker registry itself. This class exposes methods for working with the Azure resource: listing credentials, updating resource tags, updating and deleting the resource, and so on.

For working with the registry, including uploading and downloading images, updating tags, deleting layers and images etc, use the endpoint object generated with get_docker_registry. This method takes two optional arguments:

By default, these arguments will be retrieved from the ACR resource. They will only exist if the resource was created with admin_user_enabled=TRUE. Currently AzureContainers does not support authentication methods other than a username/password combination.

See Also

create_acr, get_acr, delete_acr, list_acrs

docker_registry for interacting with the Docker registry endpoint

Azure Container Registry and API reference

Examples

## Not run: 

rg <- AzureRMR::get_azure_login()$
    get_subscription("subscription_id")$
    get_resource_group("rgname")

myacr <- rg$get_acr("myregistry")

myacr$list_credentials()
myacr$list_policies()

# see who has push and pull access
myacr$list_role_assignments()

# grant a Kubernetes cluster pull access
myaks <- rg$get_aks("myaks")
myacr$add_role_assignment(myaks, "Acrpull")

# get the registry endpoint (for interactive use)
myacr$get_docker_registry()

# get the registry endpoint (admin user account)
myacr$get_docker_registry(as_admin=TRUE)


## End(Not run)

[Package AzureContainers version 1.3.2 Index]