From e67fa844446968fe50e26fcb6a2269925e04ea19 Mon Sep 17 00:00:00 2001 From: blackandred <22807686+blackandred@users.noreply.github.com> Date: Thu, 1 Aug 2024 07:54:19 +0200 Subject: [PATCH] fix: Image is missing rclone --- Dockerfile | 8 ++++++++ Makefile | 1 + 2 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 734f2b1..f8c9ea0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,25 @@ FROM python:3.12-slim-bookworm as builder RUN pip install --upgrade poetry poetry-plugin-export +RUN apt-get update && apt-get install -y make wget unzip ADD poetry.lock /app/ ADD pyproject.toml /app/ +ADD Makefile /app +RUN mkdir /app/bin WORKDIR "/app" RUN poetry export > /app/requirements.txt +RUN make bin/rclone +# ============ +# Target image +# ============ FROM python:3.12-slim-bookworm ENV RBACKUP_PATH=/app/rbackup COPY --from=builder /app/requirements.txt /app/requirements.txt +COPY --from=builder /app/bin/rclone /usr/bin/rclone RUN pip install -r /app/requirements.txt ADD rbackup /app/rbackup diff --git a/Makefile b/Makefile index 8970842..f309675 100644 --- a/Makefile +++ b/Makefile @@ -14,3 +14,4 @@ bin/rclone: wget https://downloads.rclone.org/v1.67.0/rclone-v1.67.0-linux-amd64.zip -O /tmp/rclone/rclone.zip cd /tmp/rclone && unzip rclone.zip mv /tmp/rclone/*/rclone ./bin/rclone + chmod + ./bin/rclone