Skip to content

Commit ab8348e

Browse files
committed
Fix build issue
1 parent 4d673d0 commit ab8348e

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

Containerfile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
11
FROM registry.access.redhat.com/ubi9/python-311
22

3-
WORKDIR /app
4-
53
# Set default MCP transport if not provided
64
ENV MCP_TRANSPORT=stdio
75

86
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
97

10-
# Copy project files needed for uv sync
8+
# Copy project files to user's home directory (no permission issues)
119
COPY pyproject.toml ./
1210
COPY .python-version ./
1311
COPY uv.lock ./
1412
COPY README.md ./
1513
# 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/ ./
2315

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
2818

2919
# Environment variables (set these when running the container)
3020
# SNOWFLAKE_BASE_URL - Snowflake API base URL (optional, defaults to Red Hat's instance)
@@ -36,4 +26,4 @@ RUN uv sync --no-cache --locked && \
3626
# Expose metrics port
3727
EXPOSE 8000
3828

39-
CMD ["uv", "run", "python", "src/mcp_server.py"]
29+
CMD ["uv", "run", "python", "mcp_server.py"]

0 commit comments

Comments
 (0)