From c8c5fce9f9adc1af537554a2976a391404c6495c Mon Sep 17 00:00:00 2001 From: Filip Pytloun Date: Thu, 6 Apr 2023 17:47:21 +0200 Subject: [PATCH] Allow to pass backup path as argument --- Dockerfile | 1 + backup.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0352b39..919d1f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,5 +16,6 @@ RUN apk add --update --no-cache ca-certificates fuse openssh-client tzdata jq cu COPY --from=builder /go/src/github.com/restic/restic/restic /usr/bin ADD backup.sh /usr/local/bin/backup.sh +RUN chmod +x /usr/local/bin/backup.sh ENTRYPOINT ["/usr/bin/restic"] diff --git a/backup.sh b/backup.sh index 5d84a49..e74316b 100644 --- a/backup.sh +++ b/backup.sh @@ -1,5 +1,6 @@ #!/bin/sh -e +BACKUP_PATH=${BACKUP_PATH:-$1} INSTANCE="$(echo ${INSTANCE:-${TAG}} | envsubst)" export RESTIC_REPOSITORY="$(echo ${RESTIC_REPOSITORY} | envsubst)"