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-bicep-container-image.md
+23-12Lines changed: 23 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,6 @@ The ADE team provides a selection of images to get you started, including a core
27
27
- Azure Deployment Environments set up in your Azure subscription.
28
28
- To set up ADE, follow the [Quickstart: Configure Azure Deployment Environments](quickstart-create-and-configure-devcenter.md).
29
29
30
-
31
30
## Use container images with ADE
32
31
33
32
You can take one of the following approaches to use container images with ADE:
@@ -36,14 +35,12 @@ You can take one of the following approaches to use container images with ADE:
36
35
- Customize a container image
37
36
- Build a custom container image using the script provided by ADE
38
37
39
-
Select the appropriate tab to learn more about each approach.
38
+
For simple scenarios, you can use the standard Bicep container image provided by ADE. For more complex scenarios, you can customize a container image or build a custom container image using the script provided by ADE.
40
39
41
-
## [Use the standard Bicep container image](#tab/use-the-standard-bicep-container-image/)
40
+
## Use the standard Bicep container image
42
41
43
42
ADE supports Bicep natively, so you can configure an environment definition that deploys Azure resources for a deployment environment by adding the template files (azuredeploy.json and environment.yaml) to your catalog. ADE then uses the standard Bicep container image to create the deployment environment.
44
43
45
-
### Specify the standard Bicep container image
46
-
47
44
In the environment.yaml file, the runner property specifies the location of the container image you want to use. To use the sample image published on the Microsoft Artifact Registry, use the respective identifiers runner, as listed in the following table.
48
45
49
46
The following example shows a runner that references the sample Bicep container image:
@@ -57,7 +54,9 @@ The following example shows a runner that references the sample Bicep container
57
54
```
58
55
You can see the standard Bicep container image in the ADE sample repository under the [Runner-Images folder for the ARM-Bicep](https://github.com/Azure/deployment-environments/tree/main/Runner-Images/ARM-Bicep) image.
59
56
60
-
## [Create a custom bicep container image](#tab/create-a-custom-bicep-container-image/)
57
+
## Create a custom bicep container image
58
+
59
+
Creating a custom container image allows you to customize your deployments and deletions to fit your workflow. You can create custom images based on the ADE standard container images.
61
60
62
61
### Create and build a Docker image
63
62
@@ -72,7 +71,7 @@ To build an image configured for ADE, follow these steps:
72
71
1. Build and push your image to your container registry, and ensure it's accessible to ADE.
73
72
1. Reference your image in the `runner` property of your environment definition.
74
73
75
-
#### Select a sample container image by using the FROM statement
74
+
### Select a sample container image by using the FROM statement
76
75
77
76
Include a FROM statement within a created DockerFile for your new image pointing to a sample image hosted on Microsoft Artifact Registry.
78
77
@@ -84,7 +83,7 @@ FROM mcr.microsoft.com/deployment-environments/runners/core:latest
84
83
85
84
This statement pulls the most recently published core image, and makes it a basis for your custom image.
86
85
87
-
#### Install Bicep in a Dockerfile
86
+
### Install Bicep in a Dockerfile
88
87
89
88
You can install the Bicep package with the Azure CLI by using the RUN statement, as shown in the following example:
90
89
@@ -96,7 +95,7 @@ The ADE sample images are based on the Azure CLI image, and have the ADE CLI and
96
95
97
96
To install any more packages you need within your image, use the RUN statement.
98
97
99
-
#### Execute operation shell scripts
98
+
### Execute operation shell scripts
100
99
101
100
Within the sample images, operations are determined and executed based on the operation name. Currently, the two operation names supported are *deploy* and *delete*.
102
101
@@ -110,7 +109,7 @@ RUN find /scripts/ -type f -iname "*.sh" -exec dos2unix '{}' '+'
110
109
RUN find /scripts/ -type f -iname "*.sh" -exec chmod +x {} \;
111
110
```
112
111
113
-
#### Author operation shell scripts to deploy ARM or Bicep templates
112
+
### Author operation shell scripts to deploy ARM or Bicep templates
114
113
To ensure you can successfully deploy ARM or Bicep infrastructure through ADE, you must:
115
114
- Convert ADE parameters to ARM-acceptable parameters
116
115
- Resolve linked templates if they're used in the deployment
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.
218
+
219
+
Select the appropriate tab to learn more about each approach.
220
+
221
+
### [Build the image with Docker CLI](#tab/build-the-image-with-docker-cli/)
217
222
218
223
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:
219
224
@@ -250,7 +255,7 @@ When you're ready to push your image to your registry, run the following command
### Connect the image to your environment definition
258
+
## Connect the image to your environment definition
254
259
255
260
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).
## Connect the image to your environment definition
271
+
272
+
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).
0 commit comments