|
1 | 1 | --- |
2 | | -title: Ask Gordon |
3 | | -description: Streamline your workflow with Docker's AI-powered assistant in Docker Desktop and CLI. |
4 | | -weight: 40 |
| 2 | +title: Gordon |
| 3 | +description: AI agent for Docker workflows - execute tasks, debug issues, and |
| 4 | + manage containers with intelligent assistance |
| 5 | +weight: 1 |
5 | 6 | params: |
6 | 7 | sidebar: |
7 | | - badge: |
8 | | - color: blue |
9 | | - text: Beta |
10 | 8 | group: AI |
11 | 9 | aliases: |
12 | | - - /desktop/features/gordon/ |
| 10 | + - /desktop/features/gordon/ |
13 | 11 | --- |
14 | 12 |
|
15 | | -{{< summary-bar feature_name="Ask Gordon" >}} |
| 13 | +{{< summary-bar feature_name="Gordon" >}} |
16 | 14 |
|
17 | | -Ask Gordon is your personal AI assistant embedded in Docker Desktop and the |
18 | | -Docker CLI. It's designed to streamline your workflow and help you make the most |
19 | | -of the Docker ecosystem. |
| 15 | +Gordon is an AI agent that takes action on your Docker workflows. It analyzes |
| 16 | +your environment, proposes solutions, and executes commands with your |
| 17 | +permission. Available in Docker Desktop and via the `docker ai` CLI command. |
20 | 18 |
|
21 | | -## Key features |
| 19 | +## What Gordon does |
22 | 20 |
|
23 | | -Ask Gordon provides AI-powered assistance in Docker tools. It can: |
| 21 | +Gordon takes action to help you with Docker tasks: |
24 | 22 |
|
25 | | -- Improve Dockerfiles |
26 | | -- Run and troubleshoot containers |
27 | | -- Interact with your images and code |
28 | | -- Find vulnerabilities or configuration issues |
29 | | -- Migrate a Dockerfile to use [Docker Hardened Images](/manuals/dhi/_index.md) |
| 23 | +- Explains Docker concepts and commands |
| 24 | +- Searches Docker documentation and web resources for solutions |
| 25 | +- Writes and modifies Dockerfiles following best practices |
| 26 | +- Debugs container failures by reading logs and proposing fixes |
| 27 | +- Manages containers, images, volumes, and networks |
30 | 28 |
|
31 | | -It understands your local environment, including source code, Dockerfiles, and |
32 | | -images, to provide personalized and actionable guidance. |
| 29 | +Gordon proposes every action before executing. You approve what it does. |
33 | 30 |
|
34 | | -Ask Gordon remembers conversations, allowing you to switch topics more easily. |
| 31 | +## Get started |
35 | 32 |
|
36 | | -Ask Gordon is not enabled by default, and is not |
37 | | -production-ready. You may also encounter the term "Docker AI" as a broader |
38 | | -reference to this technology. |
| 33 | +### Prerequisites |
39 | 34 |
|
40 | | -> [!NOTE] |
41 | | -> |
42 | | -> Ask Gordon is powered by Large Language Models (LLMs). Like all |
43 | | -> LLM-based tools, its responses may sometimes be inaccurate. Always verify the |
44 | | -> information provided. |
45 | | -
|
46 | | -### What data does Gordon access? |
47 | | - |
48 | | -When you use Ask Gordon, the data it accesses depends on your query: |
| 35 | +Before you begin: |
49 | 36 |
|
50 | | -- Local files: If you use the `docker ai` command, Ask Gordon can access files |
51 | | - and directories in the current working directory where the command is |
52 | | - executed. In Docker Desktop, if you ask about a specific file or directory in |
53 | | - the **Ask Gordon** view, you'll be prompted to select the relevant context. |
54 | | -- Local images: Gordon integrates with Docker Desktop and can view all images in |
55 | | - your local image store. This includes images you've built or pulled from a |
56 | | - registry. |
| 37 | +- Docker Desktop 4.61 or later |
| 38 | +- Signed in to your Docker account |
57 | 39 |
|
58 | | -To provide accurate responses, Ask Gordon may send relevant files, directories, |
59 | | -or image metadata to the Gordon backend with your query. This data transfer |
60 | | -occurs over the network but is never stored persistently or shared with third |
61 | | -parties. It is used only to process your request and formulate a response. For |
62 | | -details about privacy terms and conditions for Docker AI, review [Gordon's |
63 | | -Supplemental Terms](https://www.docker.com/legal/docker-ai-supplemental-terms/). |
64 | | - |
65 | | -All data transferred is encrypted in transit. |
66 | | - |
67 | | -### How your data is collected and used |
| 40 | +> [!NOTE] |
| 41 | +> Gordon is enabled by default for Personal, Pro, and Team subscriptions. For |
| 42 | +> Business subscriptions, an administrator must enable Gordon for the |
| 43 | +> organization before users can access it. |
68 | 44 |
|
69 | | -Docker collects anonymized data from your interactions with Ask Gordon to |
70 | | -improve the service. This includes: |
| 45 | +### Quick start |
71 | 46 |
|
72 | | -- Your queries: Questions you ask Gordon. |
73 | | -- Responses: Answers provided by Gordon. |
74 | | -- Feedback: Thumbs-up and thumbs-down ratings. |
| 47 | +{{< tabs >}} |
| 48 | +{{< tab name="Docker Desktop" >}} |
75 | 49 |
|
76 | | -To ensure privacy and security: |
| 50 | +1. Open Docker Desktop. |
| 51 | +2. Select **Ask Gordon** in the sidebar. |
| 52 | +3. Select your project directory. |
| 53 | +4. Type a question: "What containers are running?" |
77 | 54 |
|
78 | | -- Data is anonymized and cannot be traced back to you or your account. |
79 | | -- Docker does not use this data to train AI models or share it with third |
80 | | - parties. |
| 55 | +  |
81 | 56 |
|
82 | | -By using Ask Gordon, you help improve Docker AI's reliability and accuracy for |
83 | | -everyone. |
| 57 | +5. Review Gordon's proposed actions and approve. |
84 | 58 |
|
85 | | -If you have concerns about data collection or usage, you can |
86 | | -[disable](#disable-ask-gordon) the feature at any time. |
| 59 | +{{< /tab >}} |
| 60 | +{{< tab name="CLI" >}} |
87 | 61 |
|
88 | | -## Enable Ask Gordon |
| 62 | +1. Open your terminal and run: |
89 | 63 |
|
90 | | -1. Sign in to your Docker account. |
91 | | -1. Go to the **Beta features** tab in settings. |
92 | | -1. Check the **Enable Docker AI** checkbox. |
| 64 | + ```console |
| 65 | + $ docker ai |
| 66 | + ``` |
93 | 67 |
|
94 | | - The Docker AI terms of service agreement appears. You must agree to the terms |
95 | | - before you can enable the feature. Review the terms and select **Accept and |
96 | | - enable** to continue. |
| 68 | + This opens the Terminal User Interface (TUI) for Gordon. |
97 | 69 |
|
98 | | -1. Select **Apply**. |
| 70 | +2. Type a question: "what containers are running?" and press <kbd>Enter</kbd>. |
99 | 71 |
|
100 | | -> [!IMPORTANT] |
101 | | -> |
102 | | -> For Docker Desktop versions 4.41 and earlier, this setting is under the |
103 | | -> **Experimental features** tab on the **Features in development** page. |
| 72 | +  |
104 | 73 |
|
105 | | -## Using Ask Gordon |
| 74 | +3. Review Gordon's proposed actions and approve by typing `y`. |
106 | 75 |
|
107 | | -You can access Gordon: |
| 76 | +{{< /tab >}} |
| 77 | +{{< /tabs >}} |
108 | 78 |
|
109 | | -- In Docker Desktop, in the **Ask Gordon** view. |
110 | | -- In the Docker CLI, with the `docker ai` command. |
| 79 | +### Permissions |
111 | 80 |
|
112 | | -After you enable Docker AI features, you will also see **Ask Gordon** in other |
113 | | -places in Docker Desktop. Whenever you see a button with the **Sparkles** (✨) |
114 | | -icon, you can use it to get contextual support from Ask Gordon. |
| 81 | +By default, Gordon asks for approval before executing actions. You can approve |
| 82 | +individual actions or allow all actions for the current session. |
115 | 83 |
|
116 | | -## Example workflows |
| 84 | + |
117 | 85 |
|
118 | | -Ask Gordon is a general-purpose AI assistant for Docker tasks and workflows. Here |
119 | | -are some things you can try: |
| 86 | +Permissions reset for each session. To configure default permissions or enable |
| 87 | +auto-approve mode, see [Permissions](./how-to/permissions.md). |
120 | 88 |
|
121 | | -- [Troubleshoot a crashed container](#troubleshoot-a-crashed-container) |
122 | | -- [Get help with running a container](#get-help-with-running-a-container) |
123 | | -- [Improve a Dockerfile](#improve-a-dockerfile) |
124 | | -- [Migrate a Dockerfile to DHI](#migrate-a-dockerfile-to-dhi) |
| 89 | +### Try these examples |
125 | 90 |
|
126 | | -For more examples, try asking Gordon directly. For example: |
| 91 | +Container inspection: |
127 | 92 |
|
128 | 93 | ```console |
129 | | -$ docker ai "What can you do?" |
| 94 | +$ docker ai "show me logs from my nginx container" |
130 | 95 | ``` |
131 | 96 |
|
132 | | -### Troubleshoot a crashed container |
133 | | - |
134 | | -If you start a container with an invalid configuration or command, use Ask Gordon |
135 | | -to troubleshoot the error. For example, try starting a Postgres container without |
136 | | -a database password: |
| 97 | +Dockerfile review: |
137 | 98 |
|
138 | 99 | ```console |
139 | | -$ docker run postgres |
140 | | -Error: Database is uninitialized and superuser password is not specified. |
141 | | - You must specify POSTGRES_PASSWORD to a non-empty value for the |
142 | | - superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". |
143 | | - |
144 | | - You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all |
145 | | - connections without a password. This is *not* recommended. |
146 | | - |
147 | | - See PostgreSQL documentation about "trust": |
148 | | - https://www.postgresql.org/docs/current/auth-trust.html |
149 | | -``` |
150 | | - |
151 | | -In the **Containers** view in Docker Desktop, select the ✨ icon next to the |
152 | | -container's name, or inspect the container and open the **Ask Gordon** tab. |
153 | | - |
154 | | -### Get help with running a container |
155 | | - |
156 | | -If you want to run a specific image but are not sure how, Gordon can help you get |
157 | | -set up: |
158 | | - |
159 | | -1. Pull an image from Docker Hub (for example, `postgres`). |
160 | | -1. Open the **Images** view in Docker Desktop and select the image. |
161 | | -1. Select the **Run** button. |
162 | | - |
163 | | -In the **Run a new container** dialog, you see a message about **Ask Gordon**. |
164 | | - |
165 | | - |
166 | | - |
167 | | -The linked text in the hint is a suggested prompt to start a conversation with |
168 | | -Ask Gordon. |
169 | | - |
170 | | -### Improve a Dockerfile |
171 | | - |
172 | | -Gordon can analyze your Dockerfile and suggest improvements. To have Gordon |
173 | | -evaluate your Dockerfile using the `docker ai` command: |
174 | | - |
175 | | -1. Go to your project directory: |
176 | | - |
177 | | - ```console |
178 | | - $ cd <path-to-your-project> |
179 | | - ``` |
180 | | - |
181 | | -1. Use the `docker ai` command to rate your Dockerfile: |
182 | | - |
183 | | - ```console |
184 | | - $ docker ai rate my Dockerfile |
185 | | - ``` |
186 | | - |
187 | | -Gordon will analyze your Dockerfile and identify opportunities for improvement |
188 | | -across several dimensions: |
189 | | - |
190 | | -- Build cache optimization |
191 | | -- Security |
192 | | -- Image size efficiency |
193 | | -- Best practices compliance |
194 | | -- Maintainability |
195 | | -- Reproducibility |
196 | | -- Portability |
197 | | -- Resource efficiency |
198 | | - |
199 | | -### Migrate a Dockerfile to DHI |
200 | | - |
201 | | -Migrating your Dockerfile to use [Docker Hardened Images](/manuals/dhi/_index.md) |
202 | | -helps you build more secure, minimal, and production-ready containers. DHIs |
203 | | -reduce vulnerabilities, enforce best practices, and simplify compliance, making |
204 | | -them a strong foundation for secure software supply chains. |
205 | | - |
206 | | -To request Gordon's help for the migration: |
207 | | - |
208 | | -{{% include "gordondhi.md" %}} |
209 | | - |
210 | | -## Disable Ask Gordon |
211 | | - |
212 | | -### For individual users |
213 | | - |
214 | | -If you've enabled Ask Gordon and you want to disable it again: |
215 | | - |
216 | | -1. Open the **Settings** view in Docker Desktop. |
217 | | -1. Go to **Beta features**. |
218 | | -1. Clear the **Enable Docker AI** checkbox. |
219 | | -1. Select **Apply**. |
220 | | - |
221 | | -### For organizations |
222 | | - |
223 | | -To disable Ask Gordon for your entire Docker organization, use [Settings |
224 | | -Management](/manuals/enterprise/security/hardened-desktop/settings-management/_index.md) |
225 | | -and add this property to your `admin-settings.json` file: |
226 | | - |
227 | | -```json |
228 | | -{ |
229 | | - "enableDockerAI": { |
230 | | - "value": false, |
231 | | - "locked": true |
232 | | - } |
233 | | -} |
| 100 | +$ docker ai "review my Dockerfile for best practices" |
234 | 101 | ``` |
235 | 102 |
|
236 | | -Or disable all Beta features by setting `allowBetaFeatures` to false: |
| 103 | +Image management: |
237 | 104 |
|
238 | | -```json |
239 | | -{ |
240 | | - "allowBetaFeatures": { |
241 | | - "value": false, |
242 | | - "locked": true |
243 | | - } |
244 | | -} |
| 105 | +```console |
| 106 | +$ docker ai "list my local images and their sizes" |
245 | 107 | ``` |
246 | 108 |
|
247 | | -## Feedback |
248 | | - |
249 | | -<!-- vale Docker.We = NO --> |
250 | | - |
251 | | -We value your input on Ask Gordon and encourage you to share your experience. |
252 | | -Your feedback helps us improve and refine Ask Gordon for all users. If you |
253 | | -encounter issues, have suggestions, or simply want to share what you like, |
254 | | -here's how you can get in touch: |
255 | | - |
256 | | -- Thumbs-up and thumbs-down buttons |
257 | | - |
258 | | - Rate Ask Gordon's responses using the thumbs-up or thumbs-down buttons in the |
259 | | - response. |
260 | | - |
261 | | -- Feedback survey |
| 109 | +## Usage and availability |
262 | 110 |
|
263 | | - You can access the Ask Gordon survey by following the _Give feedback_ link in |
264 | | - the **Ask Gordon** view in Docker Desktop, or from the CLI by running the |
265 | | - `docker ai feedback` command. |
| 111 | +Gordon is available with all Docker subscriptions. Usage limits vary by tier: |
266 | 112 |
|
| 113 | +- Personal: Baseline usage |
| 114 | +- Pro and Team: 3x more usage than Personal |
| 115 | +- Business: 6x more usage than Personal |
267 | 116 |
|
| 117 | +For details, see [Usage and limits](./usage-and-limits/). |
0 commit comments