Skip to content

Commit 4d673d0

Browse files
committed
Enhance Containerfile for OpenShift compatibility
Enhance Containerfile for OpenShift compatibility by setting directory permissions for the app and virtual environment. This ensures the application is writable by the group, addressing user ID constraints in OpenShift.
1 parent 9db132b commit 4d673d0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Containerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,16 @@ COPY README.md ./
1515
# Copy application files (needed for editable install)
1616
COPY ./src/ ./src/
1717

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
23+
1824
# Create cache directory with proper permissions and install dependencies
19-
RUN uv sync --no-cache --locked
25+
RUN uv sync --no-cache --locked && \
26+
chgrp -R 0 /app/.venv && \
27+
chmod -R g=u /app/.venv
2028

2129
# Environment variables (set these when running the container)
2230
# SNOWFLAKE_BASE_URL - Snowflake API base URL (optional, defaults to Red Hat's instance)

0 commit comments

Comments
 (0)