From 90f6ca960cdb6317f592dd7d02f064523ebacb98 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 16 Dec 2021 23:15:45 -0500 Subject: [PATCH] Adds tzdata to enable setting time zone in cron specifier This enables setting the timezone in the cron specifier, e.g. ```yaml cron: TZ=America/New_York 0 2 * * * ``` Without this package's data, you'll get an error: ``` 2021-12-17 04:08:35 ERR provided bad location America/New_York: unknown time zone America/New_York spec="TZ=America/New_York 0 2 * * *" ``` --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 35e3cd3..7e53c45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM golang:alpine as builder -RUN apk add -U --no-cache ca-certificates +RUN apk add -U --no-cache ca-certificates tzdata WORKDIR /go/src/github.com/cooperspencer/gickup COPY . . @@ -12,4 +12,5 @@ FROM scratch as production WORKDIR / COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /go/src/github.com/cooperspencer/gickup/app /gickup/app +COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo CMD ["./gickup/app"]