From e60ad2503570aa38fa24bd2bf4eb3f85291eccfa Mon Sep 17 00:00:00 2001 From: etienne-hd Date: Sat, 7 Mar 2026 16:38:42 +0100 Subject: [PATCH] chore(docker): update Dockerfile and added docker-entrypoint.sh --- Dockerfile | 6 +++++- docker-entrypoint.sh | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 36b1625..122c9b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,12 @@ FROM python:3.11-slim WORKDIR /app COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt && rm requirements.txt COPY lbc-finder /app +COPY docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + +ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["python", "main.py"] \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 0000000..f3ffa37 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -e requirements.txt ] +then + pip install --no-cache-dir -r requirements.txt +fi + +exec "$@" \ No newline at end of file