Conversation
|
I'm a bit torn on this one, mostly because of not wanting to change things that currently work as intended. I would definitely think this is something to include in a v3, yes. One big question in here would be: considering this would be merged and users that currently mount their TZ data as it's done right now updated without changing their config, would their setups still continue to work? |
|
I just tested it by using my custom image (only adding environment:
- TZ=${TZ}
image: offen/docker-volume-backup:v2.47.2-tzdata-test
volumes:
# - /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
# - /usr/share/zoneinfo:/usr/share/zoneinfo:roI also tried the custom image with environment:
# - TZ=${TZ}
image: offen/docker-volume-backup:v2.47.2-tzdata-test
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo:/usr/share/zoneinfo:roI then tried using the custom environment:
- TZ=${TZ}
image: offen/docker-volume-backup:v2.47.2-tzdata-test
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo:/usr/share/zoneinfo:roAll cases are working as expected, producing the expected time with the Perhaps it is better saved for v3, but I think this functionality could be enabled without issue immediately. |
|
From #28 (comment) /usr/share/zoneinfo:/usr/share/zoneinfo:roPage it's missing from: set container timezone services:
backup:
image: offen/docker-volume-backup:v2
volumes:
- data:/backup/my-app-backup:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
volumes:
data:I can edit and open a PR to fix |
That'd be grand 🎩 |
|
Continuing our conversation here...
No worries. I can do some more testing and report back. I was doing some research on ChatGPT and it agrees that it's a low-risk change. I think the testing I did above will cover users that upgrade to a new image that includes |
Changes
tzdatapackage to Docker imageReason
Installing
tzdataprovides the system timezone database and allows the container timezone to be configured via theTZenvironment variable.