-
Notifications
You must be signed in to change notification settings - Fork 8.2k
gordon: revise gordon docs for gordon v2/ga #24074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dvdksn
wants to merge
1
commit into
docker:main
Choose a base branch
from
dvdksn:gordon-ga
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+796
−654
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,267 +1,117 @@ | ||
| --- | ||
| title: Ask Gordon | ||
| description: Streamline your workflow with Docker's AI-powered assistant in Docker Desktop and CLI. | ||
| weight: 40 | ||
| title: Gordon | ||
| description: AI agent for Docker workflows - execute tasks, debug issues, and | ||
| manage containers with intelligent assistance | ||
| weight: 1 | ||
| params: | ||
| sidebar: | ||
| badge: | ||
| color: blue | ||
| text: Beta | ||
| group: AI | ||
| aliases: | ||
| - /desktop/features/gordon/ | ||
| - /desktop/features/gordon/ | ||
| --- | ||
|
|
||
| {{< summary-bar feature_name="Ask Gordon" >}} | ||
| {{< summary-bar feature_name="Gordon" >}} | ||
|
|
||
| Ask Gordon is your personal AI assistant embedded in Docker Desktop and the | ||
| Docker CLI. It's designed to streamline your workflow and help you make the most | ||
| of the Docker ecosystem. | ||
| Gordon is an AI agent that takes action on your Docker workflows. It analyzes | ||
| your environment, proposes solutions, and executes commands with your | ||
| permission. Available in Docker Desktop and via the `docker ai` CLI command. | ||
|
|
||
| ## Key features | ||
| ## What Gordon does | ||
|
|
||
| Ask Gordon provides AI-powered assistance in Docker tools. It can: | ||
| Gordon takes action to help you with Docker tasks: | ||
|
|
||
| - Improve Dockerfiles | ||
| - Run and troubleshoot containers | ||
| - Interact with your images and code | ||
| - Find vulnerabilities or configuration issues | ||
| - Migrate a Dockerfile to use [Docker Hardened Images](/manuals/dhi/_index.md) | ||
| - Explains Docker concepts and commands | ||
| - Searches Docker documentation and web resources for solutions | ||
| - Writes and modifies Dockerfiles following best practices | ||
| - Debugs container failures by reading logs and proposing fixes | ||
| - Manages containers, images, volumes, and networks | ||
|
|
||
| It understands your local environment, including source code, Dockerfiles, and | ||
| images, to provide personalized and actionable guidance. | ||
| Gordon proposes every action before executing. You approve what it does. | ||
|
|
||
| Ask Gordon remembers conversations, allowing you to switch topics more easily. | ||
| ## Get started | ||
|
|
||
| Ask Gordon is not enabled by default, and is not | ||
| production-ready. You may also encounter the term "Docker AI" as a broader | ||
| reference to this technology. | ||
| ### Prerequisites | ||
|
|
||
| > [!NOTE] | ||
| > | ||
| > Ask Gordon is powered by Large Language Models (LLMs). Like all | ||
| > LLM-based tools, its responses may sometimes be inaccurate. Always verify the | ||
| > information provided. | ||
|
|
||
| ### What data does Gordon access? | ||
|
|
||
| When you use Ask Gordon, the data it accesses depends on your query: | ||
| Before you begin: | ||
|
|
||
| - Local files: If you use the `docker ai` command, Ask Gordon can access files | ||
| and directories in the current working directory where the command is | ||
| executed. In Docker Desktop, if you ask about a specific file or directory in | ||
| the **Ask Gordon** view, you'll be prompted to select the relevant context. | ||
| - Local images: Gordon integrates with Docker Desktop and can view all images in | ||
| your local image store. This includes images you've built or pulled from a | ||
| registry. | ||
| - Docker Desktop 4.61 or later | ||
| - Signed in to your Docker account | ||
|
|
||
| To provide accurate responses, Ask Gordon may send relevant files, directories, | ||
| or image metadata to the Gordon backend with your query. This data transfer | ||
| occurs over the network but is never stored persistently or shared with third | ||
| parties. It is used only to process your request and formulate a response. For | ||
| details about privacy terms and conditions for Docker AI, review [Gordon's | ||
| Supplemental Terms](https://www.docker.com/legal/docker-ai-supplemental-terms/). | ||
|
|
||
| All data transferred is encrypted in transit. | ||
|
|
||
| ### How your data is collected and used | ||
| > [!NOTE] | ||
| > Gordon is enabled by default for Personal, Pro, and Team subscriptions. For | ||
| > Business subscriptions, an administrator must enable Gordon for the | ||
| > organization before users can access it. | ||
|
|
||
| Docker collects anonymized data from your interactions with Ask Gordon to | ||
| improve the service. This includes: | ||
| ### Quick start | ||
|
|
||
| - Your queries: Questions you ask Gordon. | ||
| - Responses: Answers provided by Gordon. | ||
| - Feedback: Thumbs-up and thumbs-down ratings. | ||
| {{< tabs >}} | ||
| {{< tab name="Docker Desktop" >}} | ||
|
|
||
| To ensure privacy and security: | ||
| 1. Open Docker Desktop. | ||
| 2. Select **Ask Gordon** in the sidebar. | ||
| 3. Select your project directory. | ||
| 4. Type a question: "What containers are running?" | ||
|
|
||
| - Data is anonymized and cannot be traced back to you or your account. | ||
| - Docker does not use this data to train AI models or share it with third | ||
| parties. | ||
|  | ||
|
|
||
| By using Ask Gordon, you help improve Docker AI's reliability and accuracy for | ||
| everyone. | ||
| 5. Review Gordon's proposed actions and approve. | ||
|
|
||
| If you have concerns about data collection or usage, you can | ||
| [disable](#disable-ask-gordon) the feature at any time. | ||
| {{< /tab >}} | ||
| {{< tab name="CLI" >}} | ||
|
|
||
| ## Enable Ask Gordon | ||
| 1. Open your terminal and run: | ||
|
|
||
| 1. Sign in to your Docker account. | ||
| 1. Go to the **Beta features** tab in settings. | ||
| 1. Check the **Enable Docker AI** checkbox. | ||
| ```console | ||
| $ docker ai | ||
| ``` | ||
|
|
||
| The Docker AI terms of service agreement appears. You must agree to the terms | ||
| before you can enable the feature. Review the terms and select **Accept and | ||
| enable** to continue. | ||
| This opens the Terminal User Interface (TUI) for Gordon. | ||
|
|
||
| 1. Select **Apply**. | ||
| 2. Type a question: "what containers are running?" and press <kbd>Enter</kbd>. | ||
|
|
||
| > [!IMPORTANT] | ||
| > | ||
| > For Docker Desktop versions 4.41 and earlier, this setting is under the | ||
| > **Experimental features** tab on the **Features in development** page. | ||
|  | ||
|
|
||
| ## Using Ask Gordon | ||
| 3. Review Gordon's proposed actions and approve by typing `y`. | ||
|
|
||
| You can access Gordon: | ||
| {{< /tab >}} | ||
| {{< /tabs >}} | ||
|
|
||
| - In Docker Desktop, in the **Ask Gordon** view. | ||
| - In the Docker CLI, with the `docker ai` command. | ||
| ### Permissions | ||
|
|
||
| After you enable Docker AI features, you will also see **Ask Gordon** in other | ||
| places in Docker Desktop. Whenever you see a button with the **Sparkles** (✨) | ||
| icon, you can use it to get contextual support from Ask Gordon. | ||
| By default, Gordon asks for approval before executing actions. You can approve | ||
| individual actions or allow all actions for the current session. | ||
|
|
||
| ## Example workflows | ||
|  | ||
|
|
||
| Ask Gordon is a general-purpose AI assistant for Docker tasks and workflows. Here | ||
| are some things you can try: | ||
| Permissions reset for each session. To configure default permissions or enable | ||
| auto-approve mode, see [Permissions](./how-to/permissions.md). | ||
|
|
||
| - [Troubleshoot a crashed container](#troubleshoot-a-crashed-container) | ||
| - [Get help with running a container](#get-help-with-running-a-container) | ||
| - [Improve a Dockerfile](#improve-a-dockerfile) | ||
| - [Migrate a Dockerfile to DHI](#migrate-a-dockerfile-to-dhi) | ||
| ### Try these examples | ||
|
|
||
| For more examples, try asking Gordon directly. For example: | ||
| Container inspection: | ||
|
|
||
| ```console | ||
| $ docker ai "What can you do?" | ||
| $ docker ai "show me logs from my nginx container" | ||
| ``` | ||
|
|
||
| ### Troubleshoot a crashed container | ||
|
|
||
| If you start a container with an invalid configuration or command, use Ask Gordon | ||
| to troubleshoot the error. For example, try starting a Postgres container without | ||
| a database password: | ||
| Dockerfile review: | ||
|
|
||
| ```console | ||
| $ docker run postgres | ||
| Error: Database is uninitialized and superuser password is not specified. | ||
| You must specify POSTGRES_PASSWORD to a non-empty value for the | ||
| superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". | ||
|
|
||
| You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all | ||
| connections without a password. This is *not* recommended. | ||
|
|
||
| See PostgreSQL documentation about "trust": | ||
| https://www.postgresql.org/docs/current/auth-trust.html | ||
| ``` | ||
|
|
||
| In the **Containers** view in Docker Desktop, select the ✨ icon next to the | ||
| container's name, or inspect the container and open the **Ask Gordon** tab. | ||
|
|
||
| ### Get help with running a container | ||
|
|
||
| If you want to run a specific image but are not sure how, Gordon can help you get | ||
| set up: | ||
|
|
||
| 1. Pull an image from Docker Hub (for example, `postgres`). | ||
| 1. Open the **Images** view in Docker Desktop and select the image. | ||
| 1. Select the **Run** button. | ||
|
|
||
| In the **Run a new container** dialog, you see a message about **Ask Gordon**. | ||
|
|
||
|  | ||
|
|
||
| The linked text in the hint is a suggested prompt to start a conversation with | ||
| Ask Gordon. | ||
|
|
||
| ### Improve a Dockerfile | ||
|
|
||
| Gordon can analyze your Dockerfile and suggest improvements. To have Gordon | ||
| evaluate your Dockerfile using the `docker ai` command: | ||
|
|
||
| 1. Go to your project directory: | ||
|
|
||
| ```console | ||
| $ cd <path-to-your-project> | ||
| ``` | ||
|
|
||
| 1. Use the `docker ai` command to rate your Dockerfile: | ||
|
|
||
| ```console | ||
| $ docker ai rate my Dockerfile | ||
| ``` | ||
|
|
||
| Gordon will analyze your Dockerfile and identify opportunities for improvement | ||
| across several dimensions: | ||
|
|
||
| - Build cache optimization | ||
| - Security | ||
| - Image size efficiency | ||
| - Best practices compliance | ||
| - Maintainability | ||
| - Reproducibility | ||
| - Portability | ||
| - Resource efficiency | ||
|
|
||
| ### Migrate a Dockerfile to DHI | ||
|
|
||
| Migrating your Dockerfile to use [Docker Hardened Images](/manuals/dhi/_index.md) | ||
| helps you build more secure, minimal, and production-ready containers. DHIs | ||
| reduce vulnerabilities, enforce best practices, and simplify compliance, making | ||
| them a strong foundation for secure software supply chains. | ||
|
|
||
| To request Gordon's help for the migration: | ||
|
|
||
| {{% include "gordondhi.md" %}} | ||
|
|
||
| ## Disable Ask Gordon | ||
|
|
||
| ### For individual users | ||
|
|
||
| If you've enabled Ask Gordon and you want to disable it again: | ||
|
|
||
| 1. Open the **Settings** view in Docker Desktop. | ||
| 1. Go to **Beta features**. | ||
| 1. Clear the **Enable Docker AI** checkbox. | ||
| 1. Select **Apply**. | ||
|
|
||
| ### For organizations | ||
|
|
||
| To disable Ask Gordon for your entire Docker organization, use [Settings | ||
| Management](/manuals/enterprise/security/hardened-desktop/settings-management/_index.md) | ||
| and add this property to your `admin-settings.json` file: | ||
|
|
||
| ```json | ||
| { | ||
| "enableDockerAI": { | ||
| "value": false, | ||
| "locked": true | ||
| } | ||
| } | ||
| $ docker ai "review my Dockerfile for best practices" | ||
| ``` | ||
|
|
||
| Or disable all Beta features by setting `allowBetaFeatures` to false: | ||
| Image management: | ||
|
|
||
| ```json | ||
| { | ||
| "allowBetaFeatures": { | ||
| "value": false, | ||
| "locked": true | ||
| } | ||
| } | ||
| ```console | ||
| $ docker ai "list my local images and their sizes" | ||
| ``` | ||
|
|
||
| ## Feedback | ||
|
|
||
| <!-- vale Docker.We = NO --> | ||
|
|
||
| We value your input on Ask Gordon and encourage you to share your experience. | ||
| Your feedback helps us improve and refine Ask Gordon for all users. If you | ||
| encounter issues, have suggestions, or simply want to share what you like, | ||
| here's how you can get in touch: | ||
|
|
||
| - Thumbs-up and thumbs-down buttons | ||
|
|
||
| Rate Ask Gordon's responses using the thumbs-up or thumbs-down buttons in the | ||
| response. | ||
|
|
||
| - Feedback survey | ||
| ## Usage and availability | ||
|
|
||
| You can access the Ask Gordon survey by following the _Give feedback_ link in | ||
| the **Ask Gordon** view in Docker Desktop, or from the CLI by running the | ||
| `docker ai feedback` command. | ||
| Gordon is available with all Docker subscriptions. Usage limits vary by tier: | ||
|
|
||
| - Personal: Baseline usage | ||
| - Pro and Team: 3x more usage than Personal | ||
| - Business: 6x more usage than Personal | ||
|
|
||
| For details, see [Usage and limits](./usage-and-limits/). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| build: | ||
| render: never | ||
| title: Concepts | ||
| weight: 20 | ||
| --- |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent image formatting
This image reference lacks the
?border=trueparameter that's used for the terminal screenshot at line 72. The permissions image at line 84 also lacks it.For consistency, consider either:
?border=trueto all screenshots