Skip to content

Commit 9c26dee

Browse files
committed
desktop: add ask gordon page
Signed-off-by: David Karlsson <[email protected]>
1 parent be0a076 commit 9c26dee

File tree

2 files changed

+274
-0
lines changed

2 files changed

+274
-0
lines changed
Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
---
2+
title: Ask Gordon
3+
description: Learn how to streamline your workflow with Docker's AI-powered assistant.
4+
weight: 10
5+
params:
6+
sidebar:
7+
badge:
8+
color: blue
9+
text: Beta
10+
---
11+
12+
{{% restricted title=Beta %}}
13+
Ask Gordon is a Beta feature. Features, user interface, and behavior are
14+
subject to change in future releases.
15+
{{% /restricted %}}
16+
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
19+
most of the Docker ecosystem.
20+
21+
### What is Ask Gordon?
22+
23+
Ask Gordon is a suite of AI-powered capabilities integrated into Docker's
24+
tools. These features, currently in Beta, are not enabled by default, and are
25+
not production-ready. You may also encounter the term "Docker AI" as a broader
26+
reference to this technology.
27+
28+
The goal of Ask Gordon is to make Docker's tools for managing images and
29+
containers more intuitive and accessible. It provides contextual assistance
30+
tailored to your local environment, including Dockerfiles, containers, and
31+
applications.
32+
33+
Ask Gordon integrates directly with Docker's tools to help you perform specific
34+
tasks. It understands your local setup, such as your local source code and
35+
images. For example, you can ask Gordon to help you identify vulnerabilities in
36+
your project or how to optimize a Dockerfile in your local repository. This
37+
tight integration ensures responses are practical and actionable.
38+
39+
> [!NOTE]
40+
> Ask Gordon is powered by Large Language Models (LLMs). Like all LLM-based
41+
> tools, its responses may sometimes be inaccurate. Always verify the
42+
> information provided.
43+
44+
### What data can Gordon access?
45+
46+
When you use Ask Gordon, you can ask questions about files on your local
47+
computer, such as local Dockerfiles or Compose files. If you use Ask Gordon
48+
through the `docker ai` command, Gordon can access the files and directories in
49+
the current working directory where you executed the command. If you ask a
50+
question about a specific file or directory in the **Ask Gordon** view in
51+
Docker Desktop, Gordon will prompt you to select a context for the question.
52+
53+
Because Ask Gordon integrates directly with Docker Desktop, it can also see all
54+
of the images you have in your local image store. That is, images you have
55+
built, or pulled from a registry.
56+
57+
Local files and images are sent to the Gordon backend over the network,
58+
together with your query, if needed for Gordon to answer your question. This
59+
information is never persistently stored or shared with anyone. It is only used
60+
by Gordon to formulate a response.
61+
62+
All data is encrypted in transit.
63+
64+
### How your data is used
65+
66+
Docker anonymizes your interactions with Ask Gordon to improve the service.
67+
This includes your questions, Gordon's responses, and your feedback (for
68+
example, thumbs-up or thumbs-down ratings). Docker collects this data with the
69+
following safeguards:
70+
71+
- Data is anonymized and cannot be linked back to you.
72+
- Human reviewers analyze interactions to refine responses for similar queries.
73+
- Docker does not use your data to train AI models or share it with others.
74+
75+
By using Ask Gordon, you help improve Docker AI's accuracy and reliability,
76+
contributing to a better experience for all users.
77+
78+
## Setup
79+
80+
Ask Gordon is not enabled by Default for your Docker Desktop installation.
81+
Before you can use Ask Gordon, you must:
82+
83+
- Sign in to your Docker account.
84+
- Enable the feature in the Docker Desktop settings.
85+
- Accept the terms of service.
86+
87+
### Sign in
88+
89+
1. Open Docker Desktop.
90+
2. Select the **Sign in** button.
91+
3. Complete the sign-in process in your web browser.
92+
93+
### Enable the feature
94+
95+
After signing in to your Docker Account, enable the Docker AI feature:
96+
97+
1. Open the **Settings** view in Docker Desktop.
98+
2. Navigate to **Features in development**.
99+
3. Check the **Enable Docker AI** checkbox.
100+
4. Select **Apply & restart**.
101+
102+
### Accept the terms of service
103+
104+
To start using Docker AI, you need to accept the terms of service. You can do
105+
this in one of two ways:
106+
107+
- Open the **Ask Gordon** view in Docker Desktop and ask a question.
108+
- Use the `docker ai` CLI command to issue a query.
109+
110+
The first time you interact with Docker AI, you'll see a prompt to accept the
111+
terms of service. For example:
112+
113+
```console
114+
$ docker ai what can you do?
115+
116+
Before using Gordon, please accept the terms of service
117+
```
118+
119+
After accepting the terms, you can begin using Ask Gordon.
120+
121+
## Using Ask Gordon
122+
123+
The primary interfaces to Docker's AI capabilities are through the **Ask
124+
Gordon** view in Docker Desktop, or if you prefer to use the CLI: the `docker
125+
ai` CLI command.
126+
127+
If you've used an AI chatbot before, these interfaces will be pretty familiar
128+
to you. You can chat with the Docker AI to get help with your Docker tasks.
129+
130+
### Contextual help
131+
132+
Once you've enabled the Docker AI features, you'll also find references to
133+
**Ask Gordon** in various other places throughout the Docker Desktop user
134+
interface. Whenever you encounter a button with the "sparkles" (✨) icon in the
135+
user interface, you can use the button to get contextual support from Ask
136+
Gordon.
137+
138+
## Example workflows
139+
140+
Ask Gordon is a general-purpose AI assistant created to help you with all your
141+
Docker-related tasks and workflows. If you need some inspiration, here are a
142+
few ways things you can try:
143+
144+
- [Troubleshoot a crashed container](#troubleshoot-a-crashed-container)
145+
- [Get help with running a container](#get-help-with-running-a-container)
146+
- [Improve a Dockerfile](#improve-a-dockerfile)
147+
148+
For more examples, try asking Gordon directly. For example:
149+
150+
```console
151+
$ docker ai "What can you do?"
152+
```
153+
154+
### Troubleshoot a crashed container
155+
156+
If you try to start a container with an invalid configuration or command, you
157+
can use Ask Gordon to troubleshoot the error. For example, try starting a
158+
Postgres container without specifying a database password:
159+
160+
```console
161+
$ docker run postgres
162+
Error: Database is uninitialized and superuser password is not specified.
163+
You must specify POSTGRES_PASSWORD to a non-empty value for the
164+
superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
165+
166+
You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
167+
connections without a password. This is *not* recommended.
168+
169+
See PostgreSQL documentation about "trust":
170+
https://www.postgresql.org/docs/current/auth-trust.html
171+
```
172+
173+
In the **Containers** view in Docker Desktop, select the ✨ icon next to the
174+
container's name, or inspect the container and open the **Ask Gordon** tab.
175+
176+
### Get help with running a container
177+
178+
If you want to run a specific image but you're not sure how, Gordon might be
179+
able to help you get set up:
180+
181+
1. Pull an image from Docker Hub (for example, `postgres`).
182+
2. Open the **Images** view in Docker Desktop and select the image.
183+
3. Select the **Run** button
184+
185+
In the _Run a new container_ dialog that opens, you should see a message about
186+
**Ask Gordon**.
187+
188+
![Ask Gordon hint in Docker Desktop](../images/gordon-run-ctr.png)
189+
190+
The linked text in the hint is a suggested prompt to start a conversation with
191+
Ask Gordon.
192+
193+
### Improve a Dockerfile
194+
195+
Gordon can analyze your Dockerfile and suggest improvements. To have Gordon
196+
evaluate your Dockerfile using the `docker ai` command:
197+
198+
1. Navigate to your project directory:
199+
200+
```console
201+
$ cd path/to/my/project
202+
```
203+
204+
2. Use the `docker ai` command to rate your Dockerfile:
205+
206+
```console
207+
$ docker ai rate my Dockerfile
208+
```
209+
210+
Gordon will analyze your Dockerfile and identify opportunities for improvement
211+
across several dimensions:
212+
213+
- Build cache optimization
214+
- Security
215+
- Image size efficiency
216+
- Best practices compliance
217+
- Maintainability
218+
- Reproducibility
219+
- Portability
220+
- Resource efficiency
221+
222+
## Disable Ask Gordon
223+
224+
If you've enabled Ask Gordon and you want to disable it again:
225+
226+
1. Open the **Settings** view in Docker Desktop.
227+
2. Navigate to **Features in development**.
228+
3. Clear the **Enable Docker AI** checkbox.
229+
4. Select **Apply & restart**.
230+
231+
If you want to disable Ask Gordon for your entire Docker organization, using
232+
[Settings Management](/manuals/security/for-admins/hardened-desktop/settings-management/_index.md),
233+
add the following property to your `admin-settings.json` file:
234+
235+
```json
236+
{
237+
"enableDockerAI": {
238+
"value": false,
239+
"locked": true
240+
}
241+
}
242+
```
243+
244+
Alternatively, you can disable all Beta features by setting `allowBetaFeatures` to false:
245+
246+
```json
247+
{
248+
"allowBetaFeatures": {
249+
"value": false,
250+
"locked": true
251+
}
252+
}
253+
```
254+
255+
## Feedback
256+
257+
<!-- vale Docker.We = NO -->
258+
259+
We value your input on Ask Gordon and encourage you to share your experience.
260+
Your feedback helps us improve and refine Ask Gordon for all users. If you
261+
encounter issues, have suggestions, or simply want to share what you like,
262+
here's how you can get in touch:
263+
264+
- Thumbs-up and thumbs-down buttons
265+
266+
Rate Ask Gordon's responses using the thumbs-up or thumbs-down buttons in the
267+
response.
268+
269+
- Feedback survey
270+
271+
You can access the Ask Gordon survey by following the _Give feedback_ link in
272+
the **Ask Gordon** view in Docker Desktop.
273+
274+
Thank you for helping us improve Ask Gordon.
16.6 KB
Loading

0 commit comments

Comments
 (0)