From c056879df4b717cdd0ccd1a1993e7ca519c50ad9 Mon Sep 17 00:00:00 2001 From: Zoey Date: Wed, 3 May 2023 16:26:55 +0200 Subject: [PATCH 1/2] optimize borg dockerfile Signed-off-by: Zoey --- Containers/borgbackup/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index 3aac5df4..da93391a 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -13,11 +13,8 @@ RUN set -ex; \ VOLUME /root -COPY start.sh /usr/bin/ -COPY backupscript.sh / -RUN chmod +x /usr/bin/start.sh; \ - chmod +x /backupscript.sh +COPY --chmod=775 start.sh /usr/bin/start.sh +COPY --chmod=775 backupscript.sh /backupscript.sh -USER root ENTRYPOINT ["start.sh"] LABEL com.centurylinklabs.watchtower.monitor-only="true" From 06d802fd4377f6f49672064191c5a02413565ad5 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 3 May 2023 17:42:04 +0200 Subject: [PATCH 2/2] apply suggestion Signed-off-by: Simon L --- Containers/borgbackup/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index da93391a..4e4b51c6 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -13,8 +13,8 @@ RUN set -ex; \ VOLUME /root -COPY --chmod=775 start.sh /usr/bin/start.sh -COPY --chmod=775 backupscript.sh /backupscript.sh +COPY --chmod=770 *.sh / + +ENTRYPOINT ["/start.sh"] -ENTRYPOINT ["start.sh"] LABEL com.centurylinklabs.watchtower.monitor-only="true"