@@ -7,112 +7,130 @@ weight: 10
77
88{{< summary-bar feature_name="Gordon" >}}
99
10- Gordon handles Docker workflows through natural conversation. This page shows
11- example prompts for the most common use cases.
10+ Gordon handles Docker workflows through natural conversation. Start a session
11+ in the Gordon sidebar in Docker Desktop or run ` docker ai ` in your terminal,
12+ then describe what you need.
1213
1314## Debug and troubleshoot
1415
1516Fix broken containers, diagnose build failures, and resolve issues.
1617
17- ``` console
18- # Diagnose container crashes
19- $ docker ai " why did my postgres container crash?"
18+ In the Gordon sidebar:
2019
21- # Debug build failures
22- $ docker ai " my build is failing at the pip install step, what's wrong?"
20+ - "Why is my container exiting immediately?"
21+ - "Fix this Docker build error"
22+ - "My app can't connect to the database"
23+ - "My container is using too much memory, help me investigate"
2324
24- # Fix networking issues
25- $ docker ai " my web container can't reach my database container"
25+ Via CLI:
2626
27- # Investigate performance problems
28- $ docker ai " my container is using too much memory, help me investigate"
27+ ``` console
28+ $ docker ai " why is my container exiting immediately?"
29+ $ docker ai " my build is failing at the pip install step, what's wrong?"
30+ $ docker ai " my web container can't reach my database container"
2931```
3032
3133## Build and containerize
3234
3335Create Docker assets for applications and migrate to hardened images.
3436
37+ In the Gordon sidebar:
38+
39+ - "Containerize my Node.js app"
40+ - "Create a docker-compose for my stack"
41+ - "Set up a dev environment with Postgres and Redis"
42+
43+ Via CLI:
44+
3545``` console
36- # Create Dockerfile from scratch
3746$ docker ai " create a Dockerfile for my Node.js application"
38-
39- # Generate compose file
4047$ docker ai " create a docker-compose.yml for my application stack"
41-
42- # Migrate to Docker Hardened Images
4348$ docker ai " migrate my Dockerfile to use Docker Hardened Images"
4449```
4550
4651## Execute operations
4752
4853Run Docker commands to manage containers, images, and resources.
4954
55+ In the Gordon sidebar:
56+
57+ - "Stop all running containers"
58+ - "Clean up unused images"
59+ - "Pull and run nginx"
60+
61+ Via CLI:
62+
5063``` console
51- # Start containers with configuration
5264$ docker ai " run a redis container with persistence"
53-
54- # Build and tag images
5565$ docker ai " build my Dockerfile and tag it for production"
56-
57- # Clean up resources
5866$ docker ai " clean up all unused Docker resources"
5967```
6068
6169## Develop and optimize
6270
6371Improve Dockerfiles and configure secure, efficient development environments.
6472
73+ In the Gordon sidebar:
74+
75+ - "Optimize this Dockerfile"
76+ - "Add a health check to my service"
77+ - "Make my Dockerfile more secure"
78+
79+ Via CLI:
80+
6581``` console
66- # Optimize existing Dockerfile
6782$ docker ai " rate my Dockerfile and suggest improvements"
68-
69- # Add security improvements
7083$ docker ai " make my Dockerfile more secure"
71-
72- # Configure development workflow
7384$ docker ai " set up my container for development with hot reload"
7485```
7586
7687## Manage resources
7788
7889Inspect containers, images, and resource usage.
7990
91+ In the Gordon sidebar:
92+
93+ - "Show me running containers"
94+ - "How much disk space is Docker using?"
95+ - "List my images"
96+
97+ Via CLI:
98+
8099``` console
81- # Check container status
82100$ docker ai " show me all my containers and their status"
83-
84- # Analyze disk usage
85101$ docker ai " how much disk space is Docker using?"
86-
87- # Review image details
88102$ docker ai " list my images sorted by size"
89103```
90104
91105## Learn Docker
92106
93107Understand concepts and commands in the context of your projects.
94108
95- ``` console
96- # Explain Docker concepts
97- $ docker ai " explain how Docker networking works"
109+ In the Gordon sidebar:
110+
111+ - "What is a Docker volume?"
112+ - "Explain multi-stage builds"
113+ - "How does networking work in Docker?"
98114
99- # Understand commands
100- $ docker ai " what's the difference between COPY and ADD in Dockerfile?"
115+ Via CLI:
101116
102- # Get troubleshooting guidance
117+ ``` console
118+ $ docker ai " explain how Docker networking works"
119+ $ docker ai " what's the difference between COPY and ADD in a Dockerfile?"
103120$ docker ai " how do I debug a container that exits immediately?"
104121```
105122
106-
107123## Writing effective prompts
108124
109125Be specific:
126+
110127- Include relevant context: "my postgres container" not "the database"
111128- State your goal: "make my build faster" not "optimize"
112129- Include error messages when debugging
113130
114131Gordon works best when you describe what you want to achieve rather than how to
115- do it.
132+ do it. Gordon maintains context across a conversation, so you can follow up with
133+ clarifications or ask related questions without repeating yourself.
116134
117135### Working directory context
118136
0 commit comments