create_aci {AzureContainers}R Documentation

Create Azure Container Instance (ACI)

Description

Method for the AzureRMR::az_resource_group class.

Usage

create_aci(name, location = self$location,
           container = name, image,
           registry_creds = list(),
           cores = 1, memory = 8,
           os = c("Linux", "Windows"),
           command = list(), env_vars = list(),
           ports = aci_ports(), dns_name = name, public_ip = TRUE,
           restart = c("Always", "OnFailure", "Never"), managed_identity = TRUE,
           ...)

Arguments

Details

An ACI resource is a running container hosted in Azure. See the documentation for the resource for more information. Currently ACI only supports a single image in an instance.

To supply the registry authentication credentials, the registry_creds argument should contain either an ACR object, a docker_registry object, or the result of a call to the aci_creds function.

The ports to open should be obtained by calling the aci_ports function. This takes a vector of port numbers as well as the protocol (TCP or UDP) for each port.

Value

An object of class az_container_instance representing the instance.

See Also

get_aci, delete_aci, list_acis

az_container_instance

ACI documentation and API reference

Docker commandline reference

Examples

## Not run: 

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

# get the ACR resource that contains the image
myacr <- rg$get_acr("myregistry", as_admin=TRUE)

rg$create_aci("mycontainer",
    image="myregistry.azurecr.io/myimage:latest",
    registry_creds=myacr)


## End(Not run)

[Package AzureContainers version 1.3.2 Index]