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