auto build image (#147)
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: 疯魔慕薇 <kfanjian@gmail.com> Co-authored-by: adam jones <domdomegg+git@gmail.com>
This commit is contained in:
parent
d461400055
commit
c1d7bcd081
2 changed files with 3 additions and 4 deletions
|
|
@ -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.
|
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
|
```bash
|
||||||
# Build the Docker image
|
|
||||||
docker build -t registry .
|
|
||||||
|
|
||||||
# Run the registry and MongoDB with docker compose
|
# 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.
|
This will start the MCP Registry service and MongoDB with Docker, exposing it on port 8080.
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ services:
|
||||||
registry:
|
registry:
|
||||||
image: registry
|
image: registry
|
||||||
container_name: registry
|
container_name: registry
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile
|
||||||
links:
|
links:
|
||||||
- mongodb
|
- mongodb
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue