DEV Community

Cover image for ๐Ÿš€ Exploring Docker Ask Gordon: Your AI-Powered Dev Companion!
Raveendiran RR
Raveendiran RR

Posted on

๐Ÿš€ Exploring Docker Ask Gordon: Your AI-Powered Dev Companion!

Ai revolution with Docker

As developers, we love automation, efficiency, and innovation. With Docker Ask Gordon, Docker has stepped into the AI-powered assistant space, making it easier than ever to interact with and optimize containerized workflows. Letโ€™s dive into what it is, how it works, and how you can start using it today!

๐Ÿ”น

What is Docker and Why Use It?

Docker is a platform that enables developers to build, ship, and run applications in containers, ensuring consistency across different environments. It simplifies deployment, enhances scalability, and boosts productivity.

๐ŸŒ

Generative AI & Model Context Protocol: The Evolution of Intelligent Development

Generative AI is revolutionizing how we interact with technology, from code generation to debugging. The Model Context Protocol (MCP) enables AI models to retain and utilize contextual understanding across different interactions, making AI assistants smarter and more efficient for developers.

๐Ÿ”„

Model Context Protocol: How It Powers Smart AI Assistants

MCP allows AI models to understand project-specific requirements, retain knowledge across sessions, and provide accurate recommendations, making tools like Ask Gordon more intuitive and responsive.

The MCP adds more context to your ask. It chooses the right MCP servers and the tools available in the server to complete the task you ask it

Imagine chatting with anything and getting things done. Like create a new file and write content into it by chatting with client IDE.Or query any DB and get insigths without writing a single line of code. The possibilities are limitless. Learn more on Model Context Protocol

MCP Architecture

๐Ÿ› 

Setting Up Docker Desktop

Download Docker Desktop from Dockerโ€™s official site.

Install it following platform-specific instructions.

Launch Docker Desktop and sign in to your Docker Hub account.

๐ŸŽ›

Activating Beta Features in Docker and Docker AI

Open Docker Desktop and navigate to Settings.

Docker setting menu

Under the Features in Development tab, enable Beta Features.

Enable development features

Restart Docker Desktop to apply changes.

Accept Terms| Enable features

restart Docker Desktop

Ask Gordon Activated

Ask Gordon Activated

You can now ask any question to Ask Gordon and with the help of Docker AI, the questions are answered just like ChatGPT.

Ask Gordon answering questions

Ask gordon command prompt
Notice that you have a coy button from where you can copy commands

showing commands

๐Ÿ”

How to get MCP working on Ask Gordon

Using MCP with Docker Desktop and Gordon

Create a .yml file called gordon-mcp.yaml in your working
directory from the terminal in docker desktop

touch gordon-mcp.yml
Enter fullscreen mode Exit fullscreen mode

gordon file created

Add the MCP servers you want to activate for Docker AI. In this example, we have only listed the servers for file system and fetch ( webscraping)

services:
  fetch:
    image: mcp/fetch
  fs:
    image: mcp/filesystem
    command:
      - /rootfs
    volumes:
      - .:/rootfs
Enter fullscreen mode Exit fullscreen mode

update the gordon file

Now run this command to get the contents of the directory

$ docker ai list the contents of this file 
$ docker ai show me the content of https://docs.docker.com/desktop/features/gordon/mcp/
Enter fullscreen mode Exit fullscreen mode

you can run either in the docker terminal or your system terminal . The ouput remains the same
get contents of website

Docker would create MCP server containers when it executes the MCP actions. Later these containers are stopped

๐ŸŽฏ

Use Cases for Ask Gordon

Debugging Containers: Quickly diagnose and fix container-related issues.
Optimizing Dockerfiles: Get AI-driven suggestions to enhance performance.
Understanding Configurations: Learn how to set up volumes, networking, and security best practices.
CI/CD Integration: Ensure best practices in building efficient pipelines.

๐Ÿ“š

References & Further Reading

Docker Desktop
Ask Gordon Overview
Model Context Protocol

Docker Ask Gordon is more than just an AI assistantโ€”itโ€™s a context-aware development companion. Try it out and supercharge your container workflows today! ๐Ÿš€

I'm excited to share this information with you. Please Like | Share |Comment | follow me if this post has helped you

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where youโ€™ll build it, break it, debug it, and fix it. Youโ€™ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good olโ€™ AI to find and fix issues fast.

RSVP here โ†’

Top comments (0)

Sentry image

See why 4M developers consider Sentry, โ€œnot bad.โ€

Fixing code doesnโ€™t have to be the worst part of your day. Learn how Sentry can help.

Learn more

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay