Skip to content

Commit 684718a

Browse files
committed
update
1 parent 06e0f30 commit 684718a

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

articles/container-apps/container-debug-console.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,18 @@ ms.author: fangjimmy
1515

1616
Azure Container Apps platform offers debug console to help you troubleshoot your application under the following circumstances:
1717

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.
2121

2222
You can connect to debug console using the Azure CLI.
2323

24-
2524
> [!NOTE]
2625
> 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.
2726
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-
3127
## Azure CLI
3228

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**.
3430

3531
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.
3632

@@ -134,7 +130,7 @@ az containerapp debug `
134130

135131
## Built-in tools in Debug Console
136132

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.
138134

139135
- [ip-utils](https://github.com/iputils/iputils)
140136
- [net-tools](https://github.com/ecki/net-tools)
@@ -159,15 +155,14 @@ tdnf install -y msopenjdk-17
159155

160156
---
161157

162-
## Scenarios to use Debug Console
163-
164-
- Accessing container's file system
158+
## Scenario - Accessing container's file system via Debug Console
165159

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.
167161

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.
169163

170164
```bash
165+
tdnf install -y shadow-utils
171166
app_gid=$(ps -ax --sort pid -o 'group' --no-headers | head -1)
172167

173168
if [ "$app_uid" != "$(whoami)" ]; then

0 commit comments

Comments
 (0)