You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-tasks-pack-build.md
+7-10Lines changed: 7 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,10 @@ title: Build an Azure Container Registry image from an app
3
3
description: Use the az acr pack build command to build a container image from an app and push to Azure Container Registry, without using a Dockerfile.
4
4
services: container-registry
5
5
author: dlepow
6
+
manager: gwallace
6
7
ms.service: container-registry
7
8
ms.topic: article
8
-
ms.date: 10/10/2019
9
+
ms.date: 10/24/2019
9
10
ms.author: danlep
10
11
---
11
12
@@ -27,25 +28,23 @@ At a minimum, specify the following when you run `az acr pack build`:
27
28
* An Azure container registry where you run the command
28
29
* An image name and tag for the resulting image
29
30
* One of the [supported context locations](container-registry-tasks-overview.md#context-locations) for ACR Tasks, such as a local directory, a GitHub repo, or a remote tarball
30
-
* The name of a Buildpack builder image, such as `cloudfoundry/cnb:0.0.12-bionic`.
31
+
* The name of a Buildpack builder image suitable for your application. Azure Container Registry caches builder images such as `cloudfoundry/cnb:0.0.34-cflinuxfs3` for faster builds.
31
32
32
33
`az acr pack build` supports other features of ACR Tasks commands including [run variables](container-registry-tasks-reference-yaml.md#run-variables) and [task run logs](container-registry-tasks-overview.md#view-task-logs) that are streamed and also saved for later retrieval.
33
34
34
35
## Example: Build Node.js image with Cloud Foundry builder
35
36
36
-
The following example builds a container image from the Node.js app in the [Azure-Samples/nodejs-docs-hello-world](https://github.com/Azure-Samples/nodejs-docs-hello-world) repo, using the `cloudfoundry/cnb:0.0.12-bionic` builder:
37
+
The following example builds a container image from a Node.js app in the [Azure-Samples/nodejs-docs-hello-world](https://github.com/Azure-Samples/nodejs-docs-hello-world) repo, using the `cloudfoundry/cnb:0.0.34-cflinuxfs3` builder. This builder is cached by Azure Container Registry, so a `--pull` parameter isn't required:
This example builds the `node-app` image with the `1.0` tag and pushes it to the *myregistry* container registry. Here, the target registry name is explicitly prepended to the image name. If not specified, the registry URL is automatically prepended to the image name.
47
-
48
-
The `--pull` parameter specifies that the command pulls the latest builder image.
47
+
This example builds the `node-app` image with the `1.0` tag and pushes it to the *myregistry* container registry. In this example, the target registry name is explicitly prepended to the image name. If not specified, the registry login server name is automatically prepended to the image name.
49
48
50
49
Command output shows the progress of building and pushing the image.
51
50
@@ -65,7 +64,7 @@ Browse to `localhost:1337` in your favorite browser to see the sample web app. P
65
64
66
65
## Example: Build Java image with Heroku builder
67
66
68
-
The following example builds a container image from the Java app in the [buildpack/sample-java-app](https://github.com/buildpack/sample-java-app) repo, using the `heroku/buildpacks:18` builder:
67
+
The following example builds a container image from the Java app in the [buildpack/sample-java-app](https://github.com/buildpack/sample-java-app) repo, using the `heroku/buildpacks:18` builder. The `--pull` parameter specifies that the command should pull the latest builder image.
69
68
70
69
```azurecli
71
70
az acr pack build \
@@ -77,8 +76,6 @@ az acr pack build \
77
76
78
77
This example builds the `java-app` image tagged with the run ID of the command and pushes it to the *myregistry* container registry.
79
78
80
-
The `--pull` parameter specifies that the command pulls the latest builder image.
81
-
82
79
Command output shows the progress of building and pushing the image.
83
80
84
81
After the image is successfully built, you can run it with Docker, if you have it installed. First sign into your registry:
0 commit comments