forked from open-webui/mcpo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (31 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
42 lines (31 loc) · 1.09 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
35
36
37
38
39
40
41
42
FROM python:3.12-slim-bookworm
# Install uv (from official binary), nodejs, npm, and git
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js and npm via NodeSource
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Confirm npm and node versions (optional debugging info)
RUN node -v && npm -v
# Copy your mcpo source code (assuming in src/mcpo)
COPY . /app
WORKDIR /app
# Create virtual environment explicitly in known location
ENV VIRTUAL_ENV=/app/.venv
RUN uv venv "$VIRTUAL_ENV"
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Install mcpo (assuming pyproject.toml is properly configured)
RUN uv pip install . && rm -rf ~/.cache
# Verify mcpo installed correctly
RUN which mcpo
# Expose port (optional but common default)
EXPOSE 8000
# Entrypoint set for easy container invocation
ENTRYPOINT ["mcpo"]
# Default help CMD (can override at runtime)
CMD ["--help"]