1
1
FROM registry.access.redhat.com/ubi9/python-311
2
2
3
- WORKDIR /app
4
-
5
3
# Set default MCP transport if not provided
6
4
ENV MCP_TRANSPORT=stdio
7
5
8
6
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
9
7
10
- # Copy project files needed for uv sync
8
+ # Copy project files to user's home directory (no permission issues)
11
9
COPY pyproject.toml ./
12
10
COPY .python-version ./
13
11
COPY uv.lock ./
14
12
COPY README.md ./
15
13
# Copy application files (needed for editable install)
16
- COPY ./src/ ./src/
17
-
18
- # Set permissions for OpenShift compatibility
19
- # OpenShift runs containers with random user IDs, so we need to ensure
20
- # the app directory and subdirectories are writable by the group
21
- RUN chgrp -R 0 /app && \
22
- chmod -R g=u /app
14
+ COPY ./src/ ./
23
15
24
- # Create cache directory with proper permissions and install dependencies
25
- RUN uv sync --no-cache --locked && \
26
- chgrp -R 0 /app/.venv && \
27
- chmod -R g=u /app/.venv
16
+ # Install dependencies - no permission changes needed
17
+ RUN uv sync --no-cache --locked
28
18
29
19
# Environment variables (set these when running the container)
30
20
# SNOWFLAKE_BASE_URL - Snowflake API base URL (optional, defaults to Red Hat's instance)
@@ -36,4 +26,4 @@ RUN uv sync --no-cache --locked && \
36
26
# Expose metrics port
37
27
EXPOSE 8000
38
28
39
- CMD ["uv" , "run" , "python" , "src/ mcp_server.py" ]
29
+ CMD ["uv" , "run" , "python" , "mcp_server.py" ]
0 commit comments