update
This commit is contained in:
@@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
# Copy requirements first so this layer is cached unless deps change
|
# Copy requirements first so this layer is cached unless deps change
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
COPY backend /app/backend
|
||||||
# FIX: Create an isolated venv to compile wheels so Kaniko doesn't corrupt global pip vendor files
|
# FIX: Create an isolated venv to compile wheels so Kaniko doesn't corrupt global pip vendor files
|
||||||
RUN python -m venv /opt/wheelhouse-env && \
|
RUN python -m venv /opt/wheelhouse-env && \
|
||||||
/opt/wheelhouse-env/bin/pip install --no-cache-dir --upgrade pip && \
|
/opt/wheelhouse-env/bin/pip install --no-cache-dir --upgrade pip && \
|
||||||
@@ -64,6 +64,7 @@ ENV PATH=/opt/venv/bin:$PATH
|
|||||||
# Copy pre-built wheels from wheelhouse stage (platform-specific)
|
# Copy pre-built wheels from wheelhouse stage (platform-specific)
|
||||||
COPY --from=wheelhouse /wheels /wheels
|
COPY --from=wheelhouse /wheels /wheels
|
||||||
COPY --from=wheelhouse /wheels/requirements.txt ./requirements.txt
|
COPY --from=wheelhouse /wheels/requirements.txt ./requirements.txt
|
||||||
|
COPY --from=wheelhouse /app/backend /app/backend
|
||||||
|
|
||||||
# Install dependencies FROM LOCAL WHEELS ONLY (no network access needed)
|
# Install dependencies FROM LOCAL WHEELS ONLY (no network access needed)
|
||||||
# --no-index: do not query PyPI or any external index
|
# --no-index: do not query PyPI or any external index
|
||||||
@@ -94,6 +95,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
# Step 3: Use the exact matching numeric IDs for --chown
|
# Step 3: Use the exact matching numeric IDs for --chown
|
||||||
COPY --from=builder --chown=999:999 /opt/venv /opt/venv
|
COPY --from=builder --chown=999:999 /opt/venv /opt/venv
|
||||||
|
COPY --from=builder --chown=999:999 /app/backend /app/backend
|
||||||
ENV PATH=/opt/venv/bin:$PATH
|
ENV PATH=/opt/venv/bin:$PATH
|
||||||
|
|
||||||
# Copy application code
|
# Copy application code
|
||||||
|
|||||||
Reference in New Issue
Block a user