From c1d7bcd081bb893c4ed9f41bc20f877441ee9703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E9=AD=94=E6=85=95=E8=96=87?= Date: Wed, 6 Aug 2025 18:08:56 +0800 Subject: [PATCH] auto build image (#147) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto build image when we run `docker compose up`, Make it start more easy for beginner. ## Motivation and Context When I try to use `docker compose up` start the MCP server, docker default pull `registry` image from dockerhub, because I forget build image first. Maybe we don't need to manually build the image, just build it automatically when docker compose starts ## How Has This Been Tested? Just run `docker-compose up --build` at a environment has installed docker and docker compose. Signed-off-by: 疯魔慕薇 Co-authored-by: adam jones --- README.md | 5 +---- docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d7f32b0..82b26aa 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,8 @@ For development: The easiest way to get the registry running is to use `docker compose`. This will setup the MCP Registry service, import the seed data and run MongoDB in a local Docker environment. ```bash -# Build the Docker image -docker build -t registry . - # Run the registry and MongoDB with docker compose -docker compose up +docker compose up --build ``` This will start the MCP Registry service and MongoDB with Docker, exposing it on port 8080. diff --git a/docker-compose.yml b/docker-compose.yml index 02d9a32..7c7dae5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,8 @@ services: registry: image: registry container_name: registry + build: + dockerfile: Dockerfile links: - mongodb depends_on: