From fb0fa65e347725935db7c53e55fac12057cb69df Mon Sep 17 00:00:00 2001 From: James Tufarelli <8152401+Minituff@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:20:13 -0700 Subject: [PATCH] Log TARGETPLATFORM and BUILDPLATFORM --- Dockerfile | 6 ++++-- pkg/entry.sh | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index feb6bd77..4e6c76a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ # Use base docker image. Contains the docker commands we need to start and stop containers FROM docker:24.0.6-cli -ARG TARGETPLATFORM -ARG BUILDPLATFORM +ARG TARGETPLATFORM="" +ARG BUILDPLATFORM="" RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" +ENV BUILDPLATFORM=${BUILDPLATFORM} +ENV TARGETPLATFORM=${TARGETPLATFORM} # Install dependencies RUN apk add bash rsync tzdata dos2unix jq diff --git a/pkg/entry.sh b/pkg/entry.sh index b3782d45..ce698190 100644 --- a/pkg/entry.sh +++ b/pkg/entry.sh @@ -3,7 +3,9 @@ source /app/logger.sh # Use the logger script create_new_report_file -logThis "Nautical Backup Version: $NAUTICAL_VERSION" "INFO" "init" +logThis "Nautical Backup Version: $NAUTICAL_VERSION:$TARGETPLATFORM" "INFO" "init" +logThis "BUILDPLATFORM $BUILDPLATFORM" +logThis "TARGETPLATFORM $TARGETPLATFORM" logThis "Using log level: $LOG_LEVEL" "DEBUG" "init" # Echo the CRON schedule for logging/debugging