dockerfile-fix
This commit is contained in:
@@ -5,8 +5,10 @@ WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install system dependencies required for building Python packages
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gcc libffi-dev libssl-dev
|
||||
RUN pip install asyncio aiohttp redis[hiredis]
|
||||
|
||||
# Install Python dependencies including redis with hiredis support
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Stage 2: Final stage
|
||||
@@ -15,7 +17,10 @@ FROM python:slim
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only necessary files from the builder stage
|
||||
COPY --from=builder /usr/local/lib/python/dist-packages /usr/local/lib/python/dist-packages
|
||||
COPY --from=builder /usr/local/lib/python3/dist-packages /usr/local/lib/python3/dist-packages
|
||||
COPY --from=builder /usr/local/lib/python3.*/dist-packages /usr/local/lib/python3.*/dist-packages
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8080
|
||||
|
Reference in New Issue
Block a user