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/container-debug-console.md
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,22 +15,18 @@ ms.author: fangjimmy
15
15
16
16
Azure Container Apps platform offers debug console to help you troubleshoot your application under the following circumstances:
17
17
18
-
- You can not connect to the target container when you use distroless image.
19
-
- If you only install JRE in the runtime image, there are no JDK troubleshooting tools like jcmd, jstack pre-installed in the image.
20
-
- When encounter networking issues, your image do not have debugging utilities to investigate them.
18
+
- You cannot connect to the target container when you use distroless image.
19
+
- If you only install JRE in the runtime image, there are no JDK troubleshooting tools like jcmd, jstack preinstalled in the image.
20
+
- When encounter networking issues, your images do not have debugging utilities to investigate them.
21
21
22
22
You can connect to debug console using the Azure CLI.
23
23
24
-
25
24
> [!NOTE]
26
25
> Debug Console will create a separate container, which will share underlying resources with the container your app is running on. If a debug container already exists, Debug Console will reuse the existing one instead of creating a new one. There will be at most 1 running debug container per Container App replica. If you do not need to keep a debug container running any more, please type **exit** or press **Ctrl + D** in Debug Console session.
27
26
28
-
> [!NOTE]
29
-
> If you encounter input missing in debug console, you can try to use **Ctrl-D** to exit and re-connect to debug console again.
30
-
31
27
## Azure CLI
32
28
33
-
To connect to a container debug console, Use the `az containerapp debug` command. To exit the console, enter **exit** or use**Ctrl-D**.
29
+
To connect to a container debug console, Use the `az containerapp debug` command. To exit the console, enter **exit** or press**Ctrl + D**.
34
30
35
31
For example, connect to a container debug console in a container app with a single container using the following command. Replace the \<PLACEHOLDERS\> with your container app's values.
36
32
@@ -134,7 +130,7 @@ az containerapp debug `
134
130
135
131
## Built-in tools in Debug Console
136
132
137
-
We pre-installed below diagnostic tools to help you troubleshoot issues more easily in debug console.
133
+
We preinstalled below diagnostic tools to help you troubleshoot issues more easily in debug console.
## Scenario - Accessing container's file system via Debug Console
165
159
166
-
You can access /proc/1 to access container's file system if you use **root** user to run your container.
160
+
By default, you will use **root** user when you connect to debug console.
167
161
168
-
If you use a non-root user, please run below command before accessing /proc/1 directory, or you will get permission denied error.
162
+
You can access /proc/1 to access container's file system if you use **root** user to run your application. If you use a nonroot user to run your application, run below command to switch user before accessing /proc/1 directory, or you'll get permission denied error.
169
163
170
164
```bash
165
+
tdnf install -y shadow-utils
171
166
app_gid=$(ps -ax --sort pid -o 'group' --no-headers | head -1)
0 commit comments