az acr pack

Manage Azure Container Registry Tasks that use Cloud Native Buildpacks.

Commands

az acr pack build

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

az acr pack build

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]
                  [--subscription]
                  [--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. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--agent-pool

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.

--no-logs

Do not show logs after successfully queuing the build.

--no-wait

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

--pack-image-tag

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.

--resource-group -g

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

--subscription

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

--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').