Skip to content

Commit 9380db6

Browse files
committedMar 29, 2025·
Add Dockerfile
1 parent 070fff4 commit 9380db6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
 

‎Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
2+
3+
WORKDIR /app
4+
5+
ENV UV_COMPILE_BYTECODE=1
6+
7+
ENV UV_LINK_MODE=copy
8+
9+
RUN --mount=type=cache,target=/root/.cache/uv \
10+
--mount=type=bind,source=uv.lock,target=uv.lock \
11+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
12+
uv sync --frozen --no-install-project --no-dev --no-editable
13+
14+
ADD . /app
15+
RUN --mount=type=cache,target=/root/.cache/uv \
16+
uv sync --frozen --no-dev --no-editable
17+
18+
FROM python:3.12-slim-bookworm
19+
20+
WORKDIR /app
21+
22+
COPY --from=uv /root/.local /root/.local
23+
COPY --from=uv --chown=app:app /app/.venv /app/.venv
24+
25+
ENV PATH="/app/.venv/bin:$PATH"
26+
27+
ENTRYPOINT ["mcp-server-calculator"]

0 commit comments

Comments
 (0)
Please sign in to comment.