-
Notifications
You must be signed in to change notification settings - Fork 466
Commit 999af36
fix(compose): avoid pulling registry from Docker Hub (#437)
<!-- Provide a brief summary of your changes -->
## Motivation and Context
Previously running `docker-compose up` the first time, Docker would pull
the official Docker Hub registry container, instead of building the MCP
registry locally. This PR ensures the registry image is never pulled,
and that it has a descriptive name locally without clashing with
existing local container images.
The `make dev-compose` command already enforces container build. This
change only helps those who interface with the `docker-compose`
configuration through other means.
## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->
To validate the issue, clone the repository locally. Ensure none of the
images referenced by `docker-compose` exist locally:
```bash
docker rm -f registry postgres
docker rmi registry postgres:16-alpine
```
Run `docker-compose up` without the `--build` flag. Notice that both
`registry` and `postgres` images are pulled from Docker Hub. Registry
prints the following start up logs - showing it's _a_ registry but of
the wrong kind :)
```
registry | time="2025-09-11T11:16:23.966357009Z" level=debug msg="using \"text\" logging formatter"
registry | time="2025-09-11T11:16:23.967075675Z" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." environment=development go.version=go1.23.7 instance.id=566edec9-5208-4bd9-ab38-9e97d3f3b5b5 service=registry version=3.0.0
registry | time="2025-09-11T11:16:23.9671568Z" level=info msg="redis not configured" environment=development go.version=go1.23.7 instance.id=566edec9-5208-4bd9-ab38-9e97d3f3b5b5 service=registry version=3.0.0
registry | time="2025-09-11T11:16:23.967193342Z" level=info msg="Starting upload purge in 31m0s" environment=development go.version=go1.23.7 instance.id=566edec9-5208-4bd9-ab38-9e97d3f3b5b5 service=registry version=3.0.0
registry | time="2025-09-11T11:16:23.967215509Z" level=info msg="using inmemory blob descriptor cache" environment=development go.version=go1.23.7 instance.id=566edec9-5208-4bd9-ab38-9e97d3f3b5b5 service=registry version=3.0.0
registry | time="2025-09-11T11:16:23.967348634Z" level=info msg="providing prometheus metrics on /metrics"
registry | time="2025-09-11T11:16:23.968138634Z" level=info msg="debug server listening :5001"
registry | time="2025-09-11T11:16:23.9681758Z" level=info msg="listening on [::]:5000" environment=development go.version=go1.23.7 instance.id=566edec9-5208-4bd9-ab38-9e97d3f3b5b5 service=registry version=3.0.0
```
Checkout the proposed change. When `docker-compose up` is ran it builds
the registry container and launches it.
```
$ docker-compose up
[+] Running 0/0
[+] Running 0/1stry Building 0.1s
[+] Building 8.7s (18/18) FINISHED docker:desktop-linux
...
registry | 2025/09/11 11:20:12 Starting MCP Registry Application vdev (commit: unknown)
...
```
## Breaking Changes
<!-- Will users need to update their code or configurations? -->
None.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
Signed-off-by: Ville Vesilehto <[email protected]>
Co-authored-by: Radoslav Dimitrov <[email protected]>1 parent c6b8359 commit 999af36Copy full SHA for 999af36
File tree
Expand file treeCollapse file tree
1 file changed
+2
-1
lines changedOpen diff view settings
Filter options
Expand file treeCollapse file tree
1 file changed
+2
-1
lines changedOpen diff view settings
Collapse file
+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments