Skip to content

Commit 5cafea7

Browse files
committed
Add Docker containerization instructions to README.md
1 parent 6d79702 commit 5cafea7

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

README.Docker.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Apache OFBiz® is a trademark of the [Apache Software Foundation](https://www.ap
2929
5. [Test the Local MCP Server](#test-the-local-mcp-server)
3030
6. [Test the Remote MCP Server](#test-the-remote-mcp-server)
3131
7. [Inspect the MCP servers](#inspect-the-mcp-servers)
32+
8. [Containerization with Docker](#containerization-with-docker)
3233

3334
---
3435

@@ -192,3 +193,33 @@ npx @modelcontextprotocol/inspector
192193
```
193194

194195
This will open a browser window ready to test your MCP servers.
196+
197+
## Containerization with Docker
198+
199+
The following instructions describe how to containerize the application using Docker.
200+
201+
First, build a Docker image:
202+
203+
`docker build -t mcp-server-for-apache-ofbiz .`.
204+
205+
If your target environment uses a different CPU architecture than your development machine (for example, if you're working on an Apple M1 but deploying to an amd64 platform), make sure to build the image for the correct target architecture:
206+
207+
`docker build --platform=linux/amd64 -t mcp-server-for-apache-ofbiz .`.
208+
209+
After building the image, create a container
210+
211+
`docker create --name my-mcp-server-for-apache-ofbiz -p 3000:3000 mcp-server-for-apache-ofbiz`
212+
213+
and run it
214+
215+
`docker start my-mcp-server-for-apache-ofbiz`.
216+
217+
The MCP server will be available at http://localhost:3000/mcp.
218+
219+
If you wish, you can push the image to your registry by running
220+
221+
`docker push myregistry.com/apache-ofbiz-mcp-server`.
222+
223+
Alternatively, you can start the application with a single command by running:
224+
225+
`docker compose -p mcp-server-for-apache-ofbiz up --build`.

0 commit comments

Comments
 (0)