1
1
mirror of https://github.com/cooperspencer/gickup synced 2024-10-18 07:38:08 +02:00
gickup/Dockerfile
Colin Dean 90f6ca960c 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 * * *"
```
2021-12-16 23:15:45 -05:00

17 lines
486 B
Docker

FROM golang:alpine as builder
RUN apk add -U --no-cache ca-certificates tzdata
WORKDIR /go/src/github.com/cooperspencer/gickup
COPY . .
RUN go get -d -v ./...
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .
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"]