Skip to content

Commit c5950f3

Browse files
desktop: add debug gui (#19583)
* add debug gui Signed-off-by: Craig Osterhout <[email protected]> * feedback1 Signed-off-by: Craig Osterhout <[email protected]> * Update content/desktop/use-desktop/container.md Co-authored-by: Stephanie Aurelio <[email protected]> --------- Signed-off-by: Craig Osterhout <[email protected]> Co-authored-by: Stephanie Aurelio <[email protected]>
1 parent 478765f commit c5950f3

File tree

5 files changed

+86
-21
lines changed

5 files changed

+86
-21
lines changed

content/desktop/settings/linux.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ On the **General** tab, you can configure when to start Docker and specify other
2929
- **Choose container terminal**. Determines which terminal is launched when opening the terminal from a container.
3030
If you choose the integrated terminal, you can run commands in a running container straight from the Docker Dashboard. For more information, see [Explore containers](../use-desktop/container.md).
3131

32+
- **Enable Docker Debug by default**. Check this option to use Docker Debug by default when accessing the integrated terminal. For more information, see [Explore containers](../use-desktop/container.md#integrated-terminal).
33+
3234
- **Use containerd for pulling and storing images**.
3335
Turns on the containerd image store.
3436
This brings new features like faster container startup performance by lazy-pulling images,

content/desktop/settings/mac.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ On the **General** tab, you can configure when to start Docker and specify other
3434
- **Choose container terminal**. Determines which terminal is launched when opening the terminal from a container.
3535
If you choose the integrated terminal, you can run commands in a running container straight from the Docker Dashboard. For more information, see [Explore containers](../use-desktop/container.md).
3636

37+
- **Enable Docker Debug by default**. Check this option to use Docker Debug by default when accessing the integrated terminal. For more information, see [Explore containers](../use-desktop/container.md#integrated-terminal).
38+
3739
- **Include VM in Time Machine backups**. Select to back up the Docker Desktop
3840
virtual machine. This option is turned off by default.
3941

content/desktop/settings/windows.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ On the **General** tab, you can configure when to start Docker and specify other
2929
- **Choose container terminal**. Determines which terminal is launched when opening the terminal from a container.
3030
If you choose the integrated terminal, you can run commands in a running container straight from the Docker Dashboard. For more information, see [Explore containers](../use-desktop/container.md).
3131

32+
- **Enable Docker Debug by default**. Check this option to use Docker Debug by default when accessing the integrated terminal. For more information, see [Explore containers](../use-desktop/container.md#integrated-terminal).
33+
3234
- **Expose daemon on tcp://localhost:2375 without TLS**. Check this option to
3335
enable legacy clients to connect to the Docker daemon. You must use this option
3436
with caution as exposing the daemon without TLS can result in remote code

content/desktop/use-desktop/container.md

Lines changed: 77 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,46 +29,102 @@ When you [inspect a container](#inspect-a-container), the **Stats** tab displays
2929

3030
You can obtain detailed information about the container when you select it.
3131

32-
From here, you can use the quick action buttons to perform various actions such as pause, resume, start or stop, or explore the **Logs**, **Inspect**, **Bind mounts**, **Terminal**, **Files**, and **Stats** tabs.
32+
From here, you can use the quick action buttons to perform various actions such as pause, resume, start or stop, or explore the **Logs**, **Inspect**, **Bind mounts**, **Exec**, **Files**, and **Stats** tabs.
3333

3434
### Logs
3535

36-
- Select **Logs** to see logs from the container. You can also:
37-
- Use `Cmd + f`/`Ctrl + f` to open the search bar and find specific entries. Search matches are highlighted in yellow.
38-
- Press `Enter` or `Shift + Enter` to jump to the next or previous search match respectively.
39-
- Use the **Copy** icon in the top right-hand corner to copy all the logs to your clipboard.
40-
- Automatically copy any logs content by highlighting a few lines or a section of the logs.
41-
- Use the **Clear terminal** icon in the top right-hand corner to clear the logs terminal.
42-
- Select and view external links that may be in your logs.
36+
Select **Logs** to see logs from the container. You can also:
37+
38+
- Use `Cmd + f`/`Ctrl + f` to open the search bar and find specific entries.
39+
Search matches are highlighted in yellow.
40+
- Press `Enter` or `Shift + Enter` to jump to the next or previous search match
41+
respectively.
42+
- Use the **Copy** icon in the top right-hand corner to copy all the logs to
43+
your clipboard.
44+
- Automatically copy any logs content by highlighting a few lines or a section
45+
of the logs.
46+
- Use the **Clear terminal** icon in the top right-hand corner to clear the
47+
logs terminal.
48+
- Select and view external links that may be in your logs.
4349

4450
### Inspect
4551

4652
Select **Inspect** to view low-level information about the container. It displays the local path, version number of the image, SHA-256, port mapping, and other details.
4753

4854
### Integrated terminal
4955

50-
From the **Exec** tab, lets you use the integrated terminal, on a running container, directly within Docker Desktop. You are able to quickly run commands within your container so you can understand its current state or debug when something goes wrong.
56+
From the **Exec** tab, you can use the integrated terminal, on a running
57+
container, directly within Docker Desktop. You are able to quickly run commands
58+
within your container so you can understand its current state or debug when
59+
something goes wrong.
60+
61+
Using the integrated terminal is the same as running one of the following commands:
5162

52-
Using the integrated terminal is the same as running `docker exec -it <container-id> /bin/sh`, or `docker exec -it <container-id> cmd.exe` if you are using Windows containers, in your external terminal. It also:
63+
- `docker exec -it <container-id> /bin/sh`
64+
- `docker exec -it <container-id> cmd.exe` when accessing Windows containers
65+
- `docker debug <container-id>` when using debug mode
5366

54-
- Automatically detects the default user for a running container from the image's Dockerfile. If no user is specified it defaults to `root`.
55-
- Persists your session if you navigate to another part of the Docker Dashboard and then return.
67+
The integrated terminal:
68+
69+
- Persists your session and **Debug mode** setting if you navigate to another
70+
part of the Docker Dashboard and then return.
5671
- Supports copy, paste, search, and clearing your session.
72+
- When not using debug mode, it automatically detects the default user for a
73+
running container from the image's Dockerfile. If no user is specified, or
74+
you're using debug mode, it defaults to `root`.
75+
76+
#### Open the integrated terminal
5777

5878
To open the integrated terminal, either:
59-
- Hover over your running container and select the **Show container actions** menu. From the drop-down menu, select **Open in terminal**.
60-
- Select the container and then select the **Exec** tab.
6179

62-
To use your external terminal, navigate to the **General** tab in **Settings** and select the **System default** option under **Choose your terminal**.
80+
- Hover over your running container and select the **Show container actions**
81+
menu. From the drop-down menu, select **Open in terminal**.
82+
- Or, select the container and then select the **Exec** tab.
83+
84+
To use your external terminal, navigate to the **General** tab in **Settings**
85+
and select the **System default** option under **Choose your terminal**.
86+
87+
#### Open the integrated terminal in debug mode
88+
89+
> **Beta**
90+
>
91+
> The debug mode feature is in [Beta](../../release-lifecycle.md/#beta). Docker
92+
> recommends that you don't use this feature in production environments.
93+
{ .experimental }
94+
95+
Debug mode requires a [Pro, Team, or Business subcription](/subscription/details/). Debug mode has several advantages, such as:
96+
97+
- A customizable toolbox. The toolbox comes with many standard Linux tools
98+
pre-installed, such as `vim`, `nano`, `htop`, and `curl`. For more details, see the [`docker debug` CLI reference](/reference/cli/docker/debug/).
99+
- The ability to access containers that don't have a shell, for example, slim or
100+
distroless containers.
101+
102+
To open the integrated terminal in debug mode:
103+
104+
1. Sign in to Docker Desktop with an account that has a Pro, Team, or Business
105+
subscription.
106+
2. After you're signed in, either:
107+
108+
- Hover over your running container and select the **Show container actions**
109+
menu. From the drop-down menu, select **Use Docker Debug**.
110+
- Or, select the container and then select the **Debug** tab. If the
111+
**Debug** tab isn't visible, select the **Exec** tab and then enable the
112+
**Debug mode** setting.
113+
114+
To use debug mode by default when accessing the integrated terminal, navigate to
115+
the **General** tab in **Settings** and select the **Enable Docker Debug by
116+
default** option.
63117

64118
### Files
65119

66-
- Select **Files** to explore the filesystem of running or stopped containers. You can also:
67-
- See which files have been recently added, modified, or deleted
68-
- Edit a file straight from the built-in editor
69-
- Drag and drop files and folders between the host and the container
70-
- Delete unnecessary files when you right-click on a file
71-
- Download file and folders from the container straight to the host
120+
Select **Files** to explore the filesystem of running or stopped containers. You
121+
can also:
122+
123+
- See which files have been recently added, modified, or deleted
124+
- Edit a file straight from the built-in editor
125+
- Drag and drop files and folders between the host and the container
126+
- Delete unnecessary files when you right-click on a file
127+
- Download files and folders from the container straight to the host
72128

73129
## Additional resources
74130
- [What is a container](../../guides/walkthroughs/what-is-a-container.md)

data/redirects.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,5 +694,8 @@
694694
"/get-started/04_sharing_app":
695695
- /go/get-started-sharing/
696696

697+
## Docker Debug
697698
"/reference/cli/docker/debug/":
698699
- /go/debug-cli/
700+
"/desktop/use-desktop/container/#integrated-terminal":
701+
- /go/debug-gui/

0 commit comments

Comments
 (0)