Share via


az acr pack

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Azure Container Registry Tasks that use Cloud Native Buildpacks.

Commands

Name Description Type Status
az acr pack build

Queues a quick build task that builds an app and pushes it into an Azure Container Registry.

Core Preview

az acr pack build

Preview

Command group 'acr pack' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Queues a quick build task that builds an app and pushes it into an Azure Container Registry.

az acr pack build --builder
                  --image
                  --registry
                  [--agent-pool]
                  [--auth-mode {Default, None}]
                  [--no-format]
                  [--no-logs]
                  [--no-wait]
                  [--pack-image-tag]
                  [--platform]
                  [--pull]
                  [--resource-group]
                  [--timeout]
                  [<SOURCE_LOCATION>]

Examples

Queue a build for the current directory with the CloudFoundry builder.

az acr pack build -r myregistry -t {{.Run.Registry}}/node-app:{{.Run.ID}} --builder cloudfoundry/cnb:bionic .

Queue a build for the given GitHub repository with the Heroku builder.

az acr pack build -r myregistry -t {{.Run.Registry}}/node-app:{{.Run.ID}} --pull --builder heroku/buildpacks:18 https://github.com/Azure-Samples/nodejs-docs-hello-world.git

Required Parameters

--builder -b

The name and tag of a Buildpack builder image.

--image -t

The name and tag of the image using the format: '-t repo/image:tag'.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--agent-pool
Preview

The name of the agent pool.

--auth-mode

Auth mode of the source registry.

Accepted values: Default, None
--no-format

Indicates whether the logs should be displayed in raw format.

Default value: False
--no-logs

Do not show logs after successfully queuing the build.

Default value: False
--no-wait

Do not wait for the run to complete and return immediately after queuing the run.

Default value: False
--pack-image-tag
Preview

The tag of the 'pack' runner image ('mcr.microsoft.com/oryx/pack').

Default value: stable
--platform

The platform where build/task is run, Eg, 'windows' and 'linux'. When it's used in build commands, it also can be specified in 'os/arch/variant' format for the resulting image. Eg, linux/arm/v7. The 'arch' and 'variant' parts are optional.

--pull

Pull the latest builder and run images before use.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--timeout

The timeout in seconds.

<SOURCE_LOCATION>

The local source code directory path (e.g., './src'), or the URL to a git repository (e.g., 'https://github.com/Azure-Samples/acr-build-helloworld-node.git') or a remote tarball (e.g., 'http://server/context.tar.gz'), or the repository of an OCI artifact in an Azure container registry (e.g., 'oci://myregistry.azurecr.io/myartifact:mytag').

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.