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/deployment-environments/how-to-configure-extensibility-terraform-container-image.md
+23-11Lines changed: 23 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,24 +19,28 @@ An environment definition comprises at least two files: a template file, like *m
19
19
20
20
The ADE extensibility model enables you to create custom container images to use with your environment definitions. By using the extensibility model, you can create your own custom container images, and store them in a container registry like DockerHub. You can then reference these images in your environment definitions to deploy your environments.
21
21
22
-
The ADE CLI is a tool that allows you to build custom images by using ADE base images. You can use the ADE CLI to customize your deployments and deletions to fit your workflow. The ADE CLI is preinstalled on the sample images. To learn more about the ADE CLI, see the [CLI Custom Runner Image reference](https://aka.ms/deployment-environments/ade-cli-reference).
23
-
24
22
## Prerequisites
25
23
26
24
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
27
25
- Azure Deployment Environments set up in your Azure subscription.
28
26
- To set up ADE, follow the [Quickstart: Configure Azure Deployment Environments](quickstart-create-and-configure-devcenter.md).
29
27
30
-
## Create and build a Docker image by using Terraform
28
+
## Create a custom Terraform container image
29
+
30
+
Creating a custom container image allows you to customize your deployments to fit your requirements.
31
+
32
+
After you complete the image customization, you must build the image and push it to your container registry.
33
+
34
+
## Create and customize a container image with Docker
31
35
32
36
In this example, you learn how to build a Docker image to utilize ADE deployments and access the ADE CLI, basing your image on one of the ADE authored images.
33
37
34
-
To build an image configured for ADE, follow these steps:
38
+
The ADE CLI is a tool that allows you to build custom images by using ADE base images. You can use the ADE CLI to customize your deployments and deletions to fit your workflow. The ADE CLI is preinstalled on the sample images. To learn more about the ADE CLI, see the [CLI Custom Runner Image reference](https://aka.ms/deployment-environments/ade-cli-reference).
39
+
40
+
To create an image configured for ADE, follow these steps:
35
41
1. Base your image on an ADE-authored sample image or the image of your choice by using the FROM statement.
36
42
1. Install any necessary packages for your image by using the RUN statement.
37
43
1. Create a *scripts* folder at the same level as your Dockerfile, store your *deploy.sh* and *delete.sh* files within it, and ensure those scripts are discoverable and executable inside your created container. This step is necessary for your deployment to work using the ADE core image.
38
-
1. Build and push your image to your container registry, and ensure it's accessible to ADE.
39
-
1. Reference your image in the `runner` property of your environment definition.
40
44
41
45
### Select a sample container image by using the FROM statement
42
46
@@ -152,8 +156,13 @@ tfOutputs=$(jq 'walk(if type == "object" then
152
156
153
157
echo"{\"outputs\": $tfOutputs}">$ADE_OUTPUTS
154
158
```
159
+
## Make the custom image accessible to ADE
160
+
161
+
You must build your Docker image and push it to your container registry to make it available for use in ADE. You can build your image using the Docker CLI, or by using a script provided by ADE.
162
+
163
+
Select the appropriate tab to learn more about each approach.
155
164
156
-
### Build the image
165
+
### [Build the image with Docker CLI](#tab/build-the-image-with-docker-cli/)
157
166
158
167
Before you build the image to be pushed to your registry, ensure the [Docker Engine is installed](https://docs.docker.com/desktop/) on your computer. Then, navigate to the directory of your Dockerfile, and run the following command:
159
168
@@ -190,6 +199,12 @@ When you're ready to push your image to your registry, run the following command
## Connect the image to your environment definition
194
209
195
210
When authoring environment definitions to use your custom image in their deployment, edit the `runner` property on the manifest file (environment.yaml or manifest.yaml).
@@ -198,14 +213,11 @@ When authoring environment definitions to use your custom image in their deploym
0 commit comments