From 01cca5053200caa887949698e11863e2e1f4bfdb Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Fri, 11 Aug 2023 06:13:50 -0700 Subject: [PATCH] Add tzdata Allows setting container timezone using TZ env variable --- Dockerfile | 2 +- Dockerfile.multi-stage | 2 +- README.md | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e2fa358..54580af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN mkdir /app WORKDIR /app/ # Add common checking tools -RUN apk --no-cache add bash=~5 curl=~8 jq=~1 bind-tools=~9 +RUN apk --no-cache add bash=~5 curl=~8 jq=~1 bind-tools=~9 tzdata~=2023c # Add minitor user for running as non-root RUN addgroup -S minitor && adduser -S minitor -G minitor diff --git a/Dockerfile.multi-stage b/Dockerfile.multi-stage index f3c4311..bcd4546 100644 --- a/Dockerfile.multi-stage +++ b/Dockerfile.multi-stage @@ -22,7 +22,7 @@ WORKDIR /app/ COPY --from=builder /app/minitor . # Add common checking tools -RUN apk --no-cache add bash=~5 curl=~8 jq=~1 bind-tools=~9 +RUN apk --no-cache add bash=~5 curl=~8 jq=~1 bind-tools=~9 tzdata~=2023c # Add minitor user for running as non-root RUN addgroup -S minitor && adduser -S minitor -G minitor diff --git a/README.md b/README.md index 5345fe0..f24ac86 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ docker run -v $PWD/config.yml:/app/config.yml iamthefij/minitor-go:latest Images are provided for `amd64`, `arm`, and `arm64` architechtures. +Timezone configuration for the container is set by passing the `TZ` env variable. Eg. `TZ=America/Los_Angeles`. + ## Configuring In this repo, you can explore the `sample-config.yml` file for an example, but the general structure is as follows. It should be noted that environment variable interpolation happens on load of the YAML file.