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-apps/containerapp-up.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,15 @@ ms.author: cshoe
14
14
15
15
# Deploy Azure Container Apps with the az containerapp up command
16
16
17
-
The `az containerapp up` (or `up`) command is the fastest way to deploy an app in Azure Container Apps from an existing image, local source code or a GitHub repo. With this single command, you can have your container app up and running in minutes.
17
+
The `az containerapp up` (or `up`) command is the fastest way to deploy an app in Azure Container Apps from an existing image, local source code, or a GitHub repo. With this single command, you can have your container app up and running in minutes.
18
18
19
-
The `az containerapp up` command is a streamlined way to create and deploy container apps that primarily use default settings. However, you'll need to run other CLI commands to configure more advanced settings:
19
+
The `az containerapp up` command is a streamlined way to create and deploy container apps that primarily use default settings. However, you need to run other CLI commands to configure more advanced settings:
- Transport protocols: [`az containerapp ingress update`](/cli/azure/containerapp/ingress#az-containerapp-ingress-update)
24
24
25
-
To customize your container app's resource or scaling settings, you can use the `up` command and then the `az containerapp update` command to change these settings. Note that the `az containerapp up` command isn't an abbreviation of the `az containerapp update` command.
25
+
To customize your container app's resource or scaling settings, you can use the `up` command and then the `az containerapp update` command to change these settings. The `az containerapp up` command isn't an abbreviation of the `az containerapp update` command.
26
26
27
27
The `up` command can create or use existing resources including:
28
28
@@ -31,25 +31,25 @@ The `up` command can create or use existing resources including:
31
31
- Container Apps environment and Log Analytics workspace
32
32
- Your container app
33
33
34
-
The command can build and push a container image to an Azure Container Registry (ACR) when you provide local source code or a GitHub repo. When you're working from a GitHub repo, it creates a GitHub Actions workflow that automatically builds and pushes a new container image when you commit changes to your GitHub repo.
34
+
The command can build and push a container image to an Azure Container Registry (ACR) when you provide local source code or a GitHub repo. When you're working from a GitHub repo, it creates a GitHub Actions workflow that automatically builds and pushes a new container image when you commit changes to your GitHub repo.
35
35
36
-
If you need to customize the Container Apps environment, first create the environment using the `az containerapp env create` command. If you don't provide an existing environment, the `up` command looks for one in your resource group and, if found, uses that environment. If not found, it creates an environment with a Log Analytics workspace.
36
+
If you need to customize the Container Apps environment, first create the environment using the `az containerapp env create` command. If you don't provide an existing environment, the `up` command looks for one in your resource group and, if found, uses that environment. If not found, it creates an environment with a Log Analytics workspace.
37
37
38
38
To learn more about the `az containerapp up` command and its options, see [`az containerapp up`](/cli/azure/containerapp#az-containerapp-up).
39
39
40
40
## Prerequisites
41
41
42
-
| Requirement | Instructions |
42
+
| Requirement | Instructions |
43
43
|--|--|
44
44
| Azure account | If you don't have one, [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). You need the *Contributor* or *Owner* permission on the Azure subscription to proceed. Refer to [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.yml?tabs=current) for details. |
45
45
| GitHub Account | If you use a GitHub repo, sign up for [free](https://github.com/join). |
46
46
| Azure CLI | Install the [Azure CLI](/cli/azure/install-azure-cli).|
47
47
|Local source code | You need to have a local source code directory if you use local source code. |
48
-
| Existing Image | If you use an existing image, you'll need your registry server, image name, and tag. If you're using a private registry, you'll need your credentials. |
48
+
| Existing Image | If you use an existing image, you need your registry server, image name, and tag. If you're using a private registry, you need your credentials. |
49
49
50
50
## Set up
51
51
52
-
1.Log in to Azure with the Azure CLI.
52
+
1.Sign in to Azure with the Azure CLI.
53
53
54
54
```azurecli
55
55
az login
@@ -74,7 +74,7 @@ To learn more about the `az containerapp up` command and its options, see [`az c
74
74
75
75
## Deploy from an existing image
76
76
77
-
You can deploy a container app that uses an existing image in a public or private container registry. If you are deploying from a private registry, you'll need to provide your credentials using the `--registry-server`, `--registry-username`, and `--registry-password` options.
77
+
You can deploy a container app that uses an existing image in a public or private container registry. If you're deploying from a private registry, you need to provide your credentials using the `--registry-server`, `--registry-username`, and `--registry-password` options.
78
78
79
79
In this example, the `az containerapp up` command performs the following actions:
80
80
@@ -83,7 +83,7 @@ In this example, the `az containerapp up` command performs the following actions
83
83
1. Creates and deploys a container app that pulls the image from a public registry.
84
84
1. Sets the container app's ingress to external with a target port set to the specified value.
85
85
86
-
Run the following command to deploy a container app from an existing image. Replace the \<Placeholders\> with your values.
86
+
Run the following command to deploy a container app from an existing image. Replace the \<PLACEHOLDERS\> with your values.
87
87
88
88
```azurecli
89
89
az containerapp up \
@@ -93,7 +93,7 @@ az containerapp up \
93
93
--target-port <PORT_NUMBER>
94
94
```
95
95
96
-
You can use the `up` command to redeploy a container app. If you want to redeploy with a new image, use the `--image` option to specify a new image. Ensure that the `--resource-group` and `environment` options are set to the same values as the original deployment.
96
+
You can use the `up` command to redeploy a container app. If you want to redeploy with a new image, use the `--image` option to specify a new image. Ensure that the `--resource-group` and `environment` options are set to the same values as the original deployment.
97
97
98
98
```azurecli
99
99
az containerapp up \
@@ -107,16 +107,16 @@ az containerapp up \
107
107
108
108
## Deploy from local source code
109
109
110
-
When you use the `up` command to deploy from a local source, it builds the container image, pushes it to a registry, and deploys the container app. It creates the registry in Azure Container Registry if you don't provide one.
110
+
When you use the `up` command to deploy from a local source, it builds the container image, pushes it to a registry, and deploys the container app. It creates the registry in Azure Container Registry if you don't provide one.
111
111
112
-
The command can build the image with or without a Dockerfile. If building without a Dockerfile the following languages are supported:
112
+
The command can build the image with or without a Dockerfile. If building without a Dockerfile the following languages are supported:
113
113
114
114
- .NET
115
115
- Node.js
116
116
- PHP
117
117
- Python
118
118
119
-
The following example shows how to deploy a container app from local source code.
119
+
The following example shows how to deploy a container app from local source code.
120
120
121
121
In the example, the `az containerapp up` command performs the following actions:
122
122
@@ -136,15 +136,15 @@ Run the following command to deploy a container app from local source code:
136
136
--ingress external
137
137
```
138
138
139
-
When the Dockerfile includes the EXPOSE instruction, the `up` command configures the container app's ingress and target port using the information in the Dockerfile.
139
+
When the Dockerfile includes the EXPOSE instruction, the `up` command configures the container app's ingress and target port using the information in the Dockerfile.
140
140
141
141
If you've configured ingress through your Dockerfile or your app doesn't require ingress, you can omit the `ingress` option.
142
142
143
143
The output of the command includes the URL for the container app.
144
144
145
145
If there's a failure, you can run the command again with the `--debug` option to get more information about the failure. If the build fails without a Dockerfile, you can try adding a Dockerfile and running the command again.
146
146
147
-
To use the `az containerapp up` command to redeploy your container app with an updated image, include the `--resource-group` and `--environment` arguments. The following example shows how to redeploy a container app from local source code.
147
+
To use the `az containerapp up` command to redeploy your container app with an updated image, include the `--resource-group` and `--environment` arguments. The following example shows how to redeploy a container app from local source code.
148
148
149
149
1. Make changes to the source code.
150
150
1. Run the following command:
@@ -159,11 +159,11 @@ To use the `az containerapp up` command to redeploy your container app with an u
159
159
160
160
## Deploy from a GitHub repository
161
161
162
-
When you use the `az containerapp up` command to deploy from a GitHub repository, it generates a GitHub Actions workflow that builds the container image, pushes it to a registry, and deploys the container app. The command creates the registry in Azure Container Registry if you don't provide one.
162
+
When you use the `az containerapp up` command to deploy from a GitHub repository, it generates a GitHub Actions workflow that builds the container image, pushes it to a registry, and deploys the container app. The command creates the registry in Azure Container Registry if you don't provide one.
163
163
164
-
A Dockerfile is required to build the image. When the Dockerfile includes the EXPOSE instruction, the command configures the container app's ingress and target port using the information in the Dockerfile.
164
+
A Dockerfile is required to build the image. When the Dockerfile includes the EXPOSE instruction, the command configures the container app's ingress and target port using the information in the Dockerfile.
165
165
166
-
The following example shows how to deploy a container app from a GitHub repository.
166
+
The following example shows how to deploy a container app from a GitHub repository.
167
167
168
168
In the example, the `az containerapp up` command performs the following actions:
169
169
@@ -186,7 +186,7 @@ az containerapp up \
186
186
187
187
If you've configured ingress through your Dockerfile or your app doesn't require ingress, you can omit the `ingress` option.
188
188
189
-
Because the `up` command creates a GitHub Actions workflow, rerunning it to deploy changes to your app's image will have the unwanted effect of creating multiple workflows. Instead, push changes to your GitHub repository, and the GitHub workflow will automatically build and deploy your app. To change the workflow, edit the workflow file in GitHub.
189
+
Because the `up` command creates a GitHub Actions workflow, rerunning it to deploy changes to your app's image has the unwanted effect of creating multiple workflows. Instead, push changes to your GitHub repository, and the GitHub workflow automatically builds and deploys your app. To change the workflow, edit the workflow file in GitHub.
0 commit comments