-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 1.01 KB
/
Makefile
File metadata and controls
34 lines (25 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Makefile
PROJECT := mcp-python
CONTAINER_REGISTRY ?= registry.example.com # your private registry hostname
NAMESPACE ?= # optional; leave empty if your registry doesn't require a namespace
CONTEXT ?= .
# Timestamp used for tags (computed once per make invocation)
VERSION := $(shell date +%Y%m%d%H%M)
# Resolve image name with optional namespace
IMAGE := $(CONTAINER_REGISTRY)$(if $(NAMESPACE),/$(NAMESPACE))/$(PROJECT)
.PHONY: docker dockerx docker-nocache push test
docker:
docker build -t $(IMAGE):latest $(CONTEXT)
dockerx:
docker buildx build --platform linux/amd64,linux/arm64 \
-t $(IMAGE):$(VERSION) -t $(IMAGE):latest \
--push $(CONTEXT)
docker-nocache:
docker build --no-cache -t $(IMAGE):latest $(CONTEXT)
push:
docker tag $(IMAGE):latest $(IMAGE):$(VERSION)
docker push $(IMAGE):$(VERSION)
docker push $(IMAGE):latest
test:
# Installe les dépendances dans un venv éphémère géré par uv et lance les tests
uv run --with-requirements requirements-dev.txt pytest -v