From 4bbf3a3e809232fe0bb3d534cdb5c9528b2e007f Mon Sep 17 00:00:00 2001 From: Gregoo Date: Fri, 17 Jan 2025 22:51:22 +0100 Subject: [PATCH] Shave 100MB from the Docker image by not caching and removing some dependencies --- Dockerfile | 9 ++++----- requirements.txt | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53c5cda..3c1742b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ -FROM python:slim +FROM python:3-slim WORKDIR /app -# Python library requirements -COPY requirements.txt . -RUN pip install -r requirements.txt - # Bricktracker COPY . . +# Python library requirements +RUN pip --no-cache-dir install -r requirements.txt + ENTRYPOINT ["./entrypoint.sh"] diff --git a/requirements.txt b/requirements.txt index c6ac3b2..b80bffd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,5 @@ flask-login gunicorn humanize jinja2 -pathlib -plotly rebrick requests