chore: optimize Dockerfile
This commit is contained in:
@@ -16,12 +16,15 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Fix security policy for ImageMagick
|
# Fix security policy for ImageMagick
|
||||||
RUN sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml
|
RUN sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml
|
||||||
|
|
||||||
# Copy the current directory contents into the container at /MoneyPrinterTurbo
|
# Copy only the requirements.txt first to leverage Docker cache
|
||||||
COPY . .
|
COPY requirements.txt ./
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Now copy the rest of the codebase into the image
|
||||||
|
COPY . .
|
||||||
|
|
||||||
# Expose the port the app runs on
|
# Expose the port the app runs on
|
||||||
EXPOSE 8501
|
EXPOSE 8501
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user