diff --git a/templates/docker-compose/borgmatic/Dockerfile b/templates/docker-compose/borgmatic/Dockerfile index 5af8ab1..b39d1c5 100644 --- a/templates/docker-compose/borgmatic/Dockerfile +++ b/templates/docker-compose/borgmatic/Dockerfile @@ -1,4 +1,11 @@ FROM b3vis/borgmatic:latest-msmtp +# Install stdbuf, used by backup.sh +RUN \ + echo "* Installing Runtime Packages" \ + && apk upgrade --no-cache \ + && echo "* Installing Runtime Packages" \ + && apk add -U --no-cache \ + coreutils COPY --chmod=755 backup.sh /backup.sh diff --git a/templates/docker-compose/borgmatic/backup.sh b/templates/docker-compose/borgmatic/backup.sh index 102a781..06a426d 100755 --- a/templates/docker-compose/borgmatic/backup.sh +++ b/templates/docker-compose/borgmatic/backup.sh @@ -31,7 +31,7 @@ indent() { log() { # Adapted from https://stackoverflow.com/a/31151808 { - "$@" 2>&1 1>&3 3>&- | indent " ! " + stdbuf -oL -eL "$@" 2>&1 1>&3 3>&- | indent " ! " } 3>&1 1>&2 | indent " | " | tee -a "$LOGFILE" }