diff --git a/Dockerfile b/Dockerfile index c0b4891..a66379b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,13 @@ FROM python:alpine AS base FROM base AS dependencies # install dependencies COPY requirements.txt . -RUN pip install -r requirements.txt - +RUN pip install --user -r requirements.txt + # # ---- Release ---- -FROM dependencies AS release -# copy project source file(s) +FROM base AS release +# copy installed dependencies and project source file(s) WORKDIR / +COPY --from=dependencies /root/.local /root/.local COPY cloudflare-ddns.py . -CMD ["python", "-u", "/cloudflare-ddns.py", "--repeat"] \ No newline at end of file +CMD ["python", "-u", "/cloudflare-ddns.py", "--repeat"]