templates/docker-compose/borgmatic/ - avoid losing STDERR lines
use stdbuf to change the buffereing mode to be linewise
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user