Skip to content

Commit 3353d7d

Browse files
y0noreddec
andauthored
Add timezone support (#10)
* Update Dockerfile.build Add timezone support * Update docker-compose.yaml Add timezone to compose file * Update Dockerfile.build Co-authored-by: Aleksandr Baryshnikov <owner@reddec.net> --------- Co-authored-by: Aleksandr Baryshnikov <owner@reddec.net>
1 parent e138df9 commit 3353d7d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Dockerfile.build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ COPY . .
77
RUN CGO_ENABLED=0 go build -v -o /usr/local/bin/app ./cmd/...
88

99
FROM alpine:3.19 AS certs
10-
RUN apk add --no-cache ca-certificates && update-ca-certificates
10+
RUN apk add --no-cache tzdata ca-certificates && update-ca-certificates
1111

1212
FROM scratch
1313
ENTRYPOINT ["/app"]
1414
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
15-
COPY --from=build /usr/local/bin/app /app
15+
COPY --from=certs /usr/share/zoneinfo /usr/share/zoneinfo
16+
COPY --from=build /usr/local/bin/app /app

docker-compose.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ services:
1515
dockerfile: Dockerfile.build
1616
restart: unless-stopped
1717
volumes:
18-
- /var/run/docker.sock:/var/run/docker.sock:ro
18+
- /var/run/docker.sock:/var/run/docker.sock:ro
19+
environment:
20+
- TZ=Europe/Paris

0 commit comments

Comments
 (0)