Skip to content

Commit a36644a

Browse files
authored
Merge pull request #2944 from madeline-underwood/dockermcp
Dockermcp_reviewed
2 parents f86c340 + 0534e30 commit a36644a

6 files changed

Lines changed: 107 additions & 86 deletions

File tree

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Simplify Arm migration with the Docker MCP ToolKit and Arm MCP Server
2+
title: Simplify Arm migration with the Docker MCP Toolkit and Arm MCP Server
33
weight: 2
44

55
### FIXED, DO NOT MODIFY
@@ -28,8 +28,8 @@ When architecture-specific optimizations are present, migration may involve:
2828
- Identifying x86-specific intrinsics or assembly
2929
- Updating compiler flags and build configurations
3030
- Mapping AVX2 operations to appropriate NEON equivalents
31-
- Rewriting vectorized code and adjusting loop structures.
32-
- Updating Dockerfiles, base images, and compiler flags.
31+
- Rewriting vectorized code and adjusting loop structures
32+
- Updating Dockerfiles, base images, and compiler flags
3333
- Validating correctness and performance on Arm systems
3434

3535
These steps are well understood, but they can require careful review across code, build scripts, and container configurations.
@@ -38,42 +38,51 @@ These steps are well understood, but they can require careful review across code
3838

3939
The Docker MCP Toolkit is a management interface in Docker Desktop that lets you discover, configure, and run containerized MCP (Model Context Protocol) servers. It connects these servers to AI coding assistants through a unified gateway.
4040

41-
For Arm migration, three MCP servers work together:
41+
## MCP servers for Arm migration
42+
43+
Three MCP servers work together to support the migration workflow:
44+
45+
**Arm MCP Server**
46+
47+
Provides migration-focused tools:
48+
- `migrate_ease_scan` detects x86-specific code and compiler flags
49+
- `check_image` and `skopeo` verify container architecture support
50+
- `knowledge_base_search` accesses learning resources, Arm intrinsics, and software version compatibility
51+
- `mca` performs microarchitectural performance analysis
52+
53+
**GitHub MCP Server**
54+
55+
Enables Git repository operations including creating pull requests, managing branches, and committing changes.
56+
57+
**Sequential Thinking MCP Server**
58+
59+
Helps the AI assistant break down complex migration decisions into logical steps.
4260

43-
- **Arm MCP Server**:
44-
Provides migration-focused tools, including:
45-
- `migrate_ease_scan` for detecting x86-specific code and compiler flags
46-
- `check_image` and `skopeo` for verifying container architecture support
47-
- `knowledge_base_search` for a knowledge base of learning resources, Arm intrinsics, and software version compatibility
48-
- `mca` for microarchitectural performance analysis
49-
50-
- **GitHub MCP Server**: Enables Git repository operations including creating pull requests, managing branches, and committing changes.
51-
-
52-
- **Sequential Thinking MCP Server**: Helps the AI assistant break down complex migration decisions into logical steps.
5361

5462
## How AI-assisted migration works
5563

5664
When connected to the Docker MCP Toolkit, an AI coding assistant like GitHub Copilot can coordinate a structured migration workflow:
5765

58-
1. Verify whether container base images support `linux/arm64` using `check_image` or `skopeo`.
59-
2. Scan the codebase with `migrate_ease_scan` to identify AVX2 intrinsics, x86-specific flags, and other portability considerations.
60-
3. Use `knowledge_base_search` to find appropriate Arm SIMD equivalents for every x86 intrinsic.
61-
4. Refactor the code with architecture-specific accuracy.
62-
5. Update Dockerfiles and build configurations for Arm comptibility.
63-
6. Create a pull request with the proposed changes using the GitHub MCP Server.
66+
- Verify whether container base images support `linux/arm64` using `check_image` or `skopeo`
67+
- Scan the codebase with `migrate_ease_scan` to identify AVX2 intrinsics, x86-specific flags, and other portability considerations
68+
- Use `knowledge_base_search` to find appropriate Arm SIMD equivalents for every x86 intrinsic
69+
- Refactor the code with architecture-specific accuracy
70+
- Update Dockerfiles and build configurations for Arm compatibility
71+
- Create a pull request with the proposed changes using the GitHub MCP Server
6472

65-
## What you will build in this Learning Path
73+
## The demo application
6674

67-
In this Learning Path, you will migrate a real-world legacy application - a matrix multiplication benchmark written with AVX2 intrinsics for x86 - to Arm64 using GitHub Copilot and Docker MCP Toolkit.
75+
This Learning Path uses a real-world example: a matrix multiplication benchmark written in C++ with AVX2 intrinsics for x86. You'll migrate it to Arm64 using the AI-assisted workflow described above.
6876

6977
The demo repository is available at [github.com/JoeStech/docker-blog-arm-migration](https://github.com/JoeStech/docker-blog-arm-migration).
7078

71-
You will:
79+
By the end of this Learning Path, you'll have a working Arm64 container with NEON-optimized code and an automated pull request containing all migration changes.
80+
81+
## What you've learned and what's next
7282

73-
1. Set up Docker MCP Toolkit with the Arm, GitHub, and Sequential Thinking MCP servers.
74-
2. Connect VS Code with GitHub Copilot to the MCP Gateway.
75-
3. Analyze the x86-specific portions of the codebase.
76-
4. Use AI-assisted MCP workflows to update intrinsics and container configuration.
77-
5. Review and validate the pull request generated by the AI agent.
83+
You now understand:
84+
- Why Arm migration requires more than rebuilding containers when architecture-specific code is present
85+
- How the Docker MCP Toolkit connects AI assistants to specialized migration tools
86+
- The structured workflow that GitHub Copilot uses to automate migration tasks
7887

79-
In the next section, you will install and configure the Docker MCP Toolkit.
88+
Next, you'll install and configure the Docker MCP Toolkit with the three required MCP servers.

content/learning-paths/servers-and-cloud-computing/docker-mcp-toolkit/2-setup.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ layout: learningpathall
1010

1111
Make sure the following tools are installed:
1212

13-
- Docker Desktop 4.59 or later.
14-
- VS Code with the GitHub Copilot extension.
15-
- A GitHub account with a Personal Access Token(PAT) that allows repository access.
16-
- A machine with at least 8 GB RAM (16 GB recommended).
13+
- Docker Desktop 4.59 or later
14+
- VS Code with the GitHub Copilot extension
15+
- A GitHub account with a Personal Access Token (PAT) that allows repository access
16+
- A machine with at least 8 GB RAM (16 GB recommended)
1717

18-
You will use Docker Desktop to host MCP servers locally, and VS Code with GitHub Copilot to invoke those servers through the MCP Gateway.
18+
You'll use Docker Desktop to host MCP servers locally, and VS Code with GitHub Copilot to invoke those servers through the MCP Gateway.
1919

2020
## Enable the Docker MCP Toolkit
2121

2222
The MCP Toolkit allows Docker Desktop to run and manage MCP (Model Context Protocol) servers, which expose structured tools that AI assistants can call.
2323

24-
1. Open Docker Desktop.
25-
2. Go to **Settings** > **Beta features**.
26-
3. Toggle **Enable Docker MCP Toolkit** on.
27-
4. Click **Apply**.
24+
- Open Docker Desktop
25+
- Go to **Settings** > **Beta features**
26+
- Toggle **Enable Docker MCP Toolkit** on
27+
- Select **Apply**
2828

29-
After a few seconds, the **MCP Toolkit** tab appears in the left sidebar.
29+
The **MCP Toolkit** tab appears in the left sidebar.
3030

3131
## Add the required MCP servers
3232

@@ -55,9 +55,9 @@ Search for **GitHub Official** in the catalog and add the [GitHub MCP Server](ht
5555

5656
Configure authentication:
5757

58-
1. Select the GitHub Official server.
59-
2. Choose **Personal Access Token** as the authentication method.
60-
3. Enter your GitHub token from **GitHub Settings** > **Developer Settings** > **Personal access tokens**.
58+
- Select the GitHub Official server
59+
- Choose **Personal Access Token** as the authentication method
60+
- Enter your GitHub token from **GitHub Settings** > **Developer Settings** > **Personal access tokens**
6161

6262
This server lets GitHub Copilot create pull requests, manage issues, and commit changes directly to your repositories.
6363

@@ -69,10 +69,10 @@ No configuration is needed. This server helps GitHub Copilot break down complex
6969

7070
## Connect VS Code to the MCP Gateway
7171

72-
1. In Docker Desktop, go to **MCP Toolkit** > **Clients** tab.
73-
2. Scroll to **Visual Studio Code** and click **Connect**.
74-
3. Open VS Code and click the **Extensions** icon in the left toolbar.
75-
4. Find **MCP_DOCKER**, click the gear icon, and click **Start Server**.
72+
- In Docker Desktop, go to **MCP Toolkit** > **Clients** tab
73+
- Scroll to **Visual Studio Code** and select **Connect**
74+
- Open VS Code and select the **Extensions** icon in the left toolbar
75+
- Find **MCP_DOCKER**, select the gear icon, and select **Start Server**
7676

7777
## Verify the connection
7878

@@ -82,14 +82,20 @@ Open GitHub Copilot Chat in VS Code and ask:
8282
What Arm migration tools do you have access to?
8383
```
8484

85-
If the setup is correct, Copilot will list tools from:
85+
If the setup is correct, Copilot lists tools from:
8686

8787
- Arm MCP Server
8888
- GitHub MCP Server
8989
- Sequential Thinking MCP Server
9090

9191
This confirms that tool invocation through the MCP Gateway is working.
9292

93-
Your environment is now ready for AI-assisted migration.
93+
## What you've learned and what's next
9494

95-
In the next section, you will examine the demo application and identify the architecture-specific elements that require adaptation for Arm64.
95+
You have:
96+
- Enabled the Docker MCP Toolkit in Docker Desktop
97+
- Configured three MCP servers: Arm MCP Server, GitHub MCP Server, and Sequential Thinking MCP Server
98+
- Connected VS Code with GitHub Copilot to the MCP Gateway
99+
- Verified that Copilot can access migration tools
100+
101+
Next, you'll examine the demo application to identify x86-specific code that needs adaptation for Arm64.

content/learning-paths/servers-and-cloud-computing/docker-mcp-toolkit/3-understand-the-demo.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Understand the legacy x86 demo application
2+
title: Examine x86 AVX2 intrinsics in the demo application
33
weight: 4
44

55
### FIXED, DO NOT MODIFY
@@ -77,15 +77,15 @@ To run this code on Arm, several adjustments are required:
7777

7878
2. **Intrinsic mapping**: Each AVX2 intrinsic must be mapped to an Arm equivalent.
7979
For example:
80-
- `_mm256_setzero_pd()` creates a 256-bit zero vector of four doubles(Arm NEON is 128-bit).
80+
- `_mm256_setzero_pd()` creates a 256-bit zero vector of four doubles. Arm NEON uses 128-bit registers.
8181
- `_mm256_loadu_pd()` loads 4 doubles at once (NEON loads 2 with `vld1q_f64`).
8282
- `_mm256_add_pd()` and `_mm256_mul_pd()` are 256-bit operations (NEON uses 128-bit equivalents).
8383
- `_mm256_extractf128_pd()` extracts the high 128 bits (not needed on NEON).
8484

85-
4. **Vector width differences**: AVX2 operates on 256-bit registers (four double-precision values). NEON operates on 128-bit registers (two double-precision values). This affects:
86-
- Loop stride
87-
- Accumulation logic
88-
- Horizontal reduction patterns
85+
3. **Vector width differences**: AVX2 operates on 256-bit registers (four double-precision values). NEON operates on 128-bit registers (two double-precision values). This affects:
86+
- Loop stride
87+
- Accumulation logic
88+
- Horizontal reduction patterns
8989

9090
4. **Horizontal reduction logic**: The AVX2 pattern:
9191

@@ -99,5 +99,11 @@ is specific to x86 register structure. On Arm, reduction is implemented using NE
9999
On newer Arm platforms supporting SVE or SVE2 (for example Neoverse V1/V2 based platforms), wider vector lengths may be available. SVE uses a vector-length-agnostic (VLA) model, which differs from fixed-width AVX2 and NEON programming. The Arm MCP Server knowledge base can help determine the appropriate approach for your target platform.
100100
{{% /notice %}}
101101
102-
In the next section, you will use GitHub Copilot together with the Docker MCP Toolkit to analyze these elements automatically and generate Arm-compatible updates.
103-
In the next section, you will use GitHub Copilot with the Docker MCP Toolkit to automate the entire migration.
102+
## What you've learned and what's next
103+
104+
You have:
105+
- Examined a legacy x86 application with AVX2 intrinsics
106+
- Identified the architecture-specific elements: base image, compiler flags, SIMD headers, and intrinsic functions
107+
- Understood how vector width differences between AVX2 (256-bit) and NEON (128-bit) affect the migration approach
108+
109+
Next, you'll use GitHub Copilot with the Docker MCP Toolkit to automate the migration process.

content/learning-paths/servers-and-cloud-computing/docker-mcp-toolkit/4-run-migration.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Run the AI-driven Arm migration
2+
title: Automate x86 to Arm migration with GitHub Copilot
33
weight: 5
44

55
### FIXED, DO NOT MODIFY
@@ -15,7 +15,7 @@ cd docker-blog-arm-migration
1515
code .
1616
```
1717

18-
Make sure the MCP_DOCKER server is running in VS Code ( Use **Extensions** > **MCP_DOCKER** > **Start Server** if needed).
18+
Make sure the MCP_DOCKER server is running in VS Code (use **Extensions** > **MCP_DOCKER** > **Start Server** if needed).
1919

2020
This allows GitHub Copilot to invoke the configured MCP servers through the MCP Gateway.
2121

@@ -136,14 +136,22 @@ You can see an example PR at [github.com/JoeStech/docker-blog-arm-migration/pull
136136
After migration, you should see:
137137

138138
**Dockerfile updates**:
139-
- Replaced `centos:6` with `ubuntu:22.04`.
140-
- Added `TARGETARCH` for multi-architecture builds.
141-
- Changed `-mavx2` to `-march=armv8-a+simd` for Arm builds.
139+
- Replaced `centos:6` with `ubuntu:22.04`
140+
- Added `TARGETARCH` for multi-architecture builds
141+
- Changed `-mavx2` to `-march=armv8-a+simd` for Arm builds
142142

143143
**Source code updates**:
144-
- Added `#ifdef __aarch64__` architecture guards.
145-
- Replaced all `_mm256_*` AVX2 intrinsics with NEON equivalents (`vld1q_f64`, `vaddq_f64`, `vmulq_f64`).
146-
- Adjusted loop strides from 4 (AVX2) to 2 (NEON).
147-
- Rewrote horizontal reduction using NEON pair-wise addition.
144+
- Added `#ifdef __aarch64__` architecture guards
145+
- Replaced all `_mm256_*` AVX2 intrinsics with NEON equivalents (`vld1q_f64`, `vaddq_f64`, `vmulq_f64`)
146+
- Adjusted loop strides from 4 (AVX2) to 2 (NEON)
147+
- Rewrote horizontal reduction using NEON pair-wise addition
148148

149-
In the next section, you will build, test, and validate the migrated application on Arm.
149+
## What you've learned and what's next
150+
151+
You have:
152+
- Provided migration instructions to GitHub Copilot
153+
- Observed the AI-driven workflow using MCP server tools
154+
- Reviewed the automated changes: container image updates, intrinsic mapping, and compiler flag adjustments
155+
- Seen how the GitHub MCP Server creates a pull request with all migration changes
156+
157+
Next, you'll build and validate the migrated application on Arm64 hardware.

content/learning-paths/servers-and-cloud-computing/docker-mcp-toolkit/5-validate-and-next-steps.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Validate the migration and explore further
2+
title: Validate the Arm64 migration and test containers
33
weight: 6
44

55
### FIXED, DO NOT MODIFY
@@ -66,10 +66,10 @@ This produces a multi-architecture manifest that allows Docker to automatically
6666

6767
AI-assisted workflows streamline repetitive discovery and mapping tasks, particularly when architecture-specific intrinsics are involved.
6868

69-
| Approach | Time |
70-
|----------|------|
71-
| Manual migration (install tools, research intrinsics, rewrite code, debug, document) | Several hours, depending on complexity |
72-
| Docker MCP Toolkit + GitHub Copilot (prompt, review, merge) | Significantly reduced manual effort |
69+
| Approach | Effort |
70+
|----------|--------|
71+
| Manual migration (install tools, research intrinsics, rewrite code, debug, document) | Several hours to days, depending on complexity |
72+
| Docker MCP Toolkit + GitHub Copilot (prompt, review, merge) | Reduced to minutes for initial migration, plus review time |
7373

7474
Actual time savings depend on codebase size and complexity, but structured tool invocation reduces the need for manual documentation lookup and repetitive edits.
7575

@@ -117,14 +117,14 @@ The Docker MCP Toolkit and Arm MCP Server support more than the example migratio
117117
- **Knowledge base**: The `knowledge_base_search` tool covers all content from [learn.arm.com](https://learn.arm.com) Learning Paths, intrinsics documentation, and software compatibility information.
118118
- **Dynamic MCP**: AI agents can discover and add new MCP servers from the Docker MCP Catalog during a conversation without manual configuration.
119119

120-
## Summary
120+
## What you've learned
121121

122122
In this Learning Path, you:
123123

124-
1. Installed and configured the Docker MCP Toolkit with the Arm MCP Server, GitHub MCP Server, and Sequential Thinking MCP Server.
125-
2. Connected VS Code with GitHub Copilot to the MCP Gateway.
126-
3. Examined architecture-specific elements in a legacy x86 AVX2 application.
127-
4. Used AI-assisted MCP tools to analyze, refactor, and update the codebase for Arm64.
128-
5. Built and validated the migrated application on Arm64.
124+
- Installed and configured the Docker MCP Toolkit with the Arm MCP Server, GitHub MCP Server, and Sequential Thinking MCP Server
125+
- Connected VS Code with GitHub Copilot to the MCP Gateway
126+
- Examined architecture-specific elements in a legacy x86 AVX2 application
127+
- Used AI-assisted MCP tools to analyze, refactor, and update the codebase for Arm64
128+
- Built and validated the migrated application on Arm64
129129

130130
The Docker MCP Toolkit enables AI assistants to invoke structured migration tools inside the containerized Arm MCP server. This approach reduces manual lookup and repetitive refactoring work while keeping developers in control of review and validation.

content/learning-paths/servers-and-cloud-computing/docker-mcp-toolkit/_index.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
---
22
title: Automate x86 to Arm Migration with Docker MCP Toolkit, VS Code and GitHub Copilot
3-
4-
draft: true
5-
cascade:
6-
draft: true
73

84
description: Learn how to use the Docker MCP Toolkit with the Arm MCP Server and GitHub Copilot to automate container and code migration from x86 to Arm64. Through a hands-on example, migrate a legacy C++ application with AVX2 intrinsics to Arm NEON.
95

@@ -44,10 +40,6 @@ operatingsystems:
4440
- macOS
4541

4642
further_reading:
47-
- resource:
48-
title: "Automate x86 to Arm Migration with Docker MCP Toolkit, VS Code, and GitHub Copilot"
49-
link: https://www.docker.com/blog/automate-arm-migration-docker-mcp-copilot/
50-
type: blog
5143
- resource:
5244
title: Docker MCP Toolkit Documentation
5345
link: https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit/

0 commit comments

Comments
 (0)