Skip to content

Commit 8e5a289

Browse files
Merge pull request #11 from ScrapeGraphAI/dockerize
add dockerfile to publish on docker mcp registry
2 parents f979782 + 9d15a93 commit 8e5a289

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use Python slim image
2+
FROM python:3.11-slim
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Set Python unbuffered mode
8+
ENV PYTHONUNBUFFERED=1
9+
10+
# Copy pyproject.toml and README.md first for better caching
11+
COPY pyproject.toml README.md ./
12+
13+
# Copy the source code
14+
COPY src/ ./src/
15+
16+
# Install the package and its dependencies from pyproject.toml
17+
RUN pip install --no-cache-dir .
18+
19+
# Create non-root user
20+
RUN useradd -m -u 1000 mcpuser && \
21+
chown -R mcpuser:mcpuser /app
22+
23+
# Switch to non-root user
24+
USER mcpuser
25+
26+
# Run the server
27+
CMD ["python", "-m", "scrapegraph_mcp.server"]
28+

0 commit comments

Comments
 (0)