Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add tzdata in docker containers by default #4711

Open
ptcarino opened this issue Dec 5, 2024 · 1 comment
Open

[Feature]: Add tzdata in docker containers by default #4711

ptcarino opened this issue Dec 5, 2024 · 1 comment

Comments

@ptcarino
Copy link

ptcarino commented Dec 5, 2024

User story

As an adminsitrator, I want to set proper time and timezone so that logs use the correct local date and time.

Game

Terraria

Linux distro

Other

Command

command: start

Further information

Docker environment variable "TZ" has no effect as there's no tzdata installed in the container. Log timestamps are affected due to this as the container's system timezone is set to Etc/UTC. Calculating the time difference can hamper troubleshooting procedures.

@irobot73
Copy link

Just add the host's via the VOLUMES:

    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro

To confirm, access the console & check the output of 'date'

linuxgsm@ubuntu:/app$ date
Thu Dec 12 08:59:31 EST 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New Issues
Development

No branches or pull requests

2 participants