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

Wrong timezone within container #168

Open
Flunkyball opened this issue Apr 7, 2023 · 2 comments
Open

Wrong timezone within container #168

Flunkyball opened this issue Apr 7, 2023 · 2 comments
Assignees

Comments

@Flunkyball
Copy link

Hello,

Iam running the latest container of bareos-director and added in the compose file the following volumes in order to get time and timezone in sync with the host system:

  - "/etc/localtime:/etc/localtime:ro"
  - "/etc/timezone:/etc/timezone:ro"

However, the container still is running UTC time and therefore backups are started on the clients 2 hours later than scheduled due to the wrong timezone.

What is the proper procedure in your setup to correct that ?

Thx,
Ludwig

@barcus barcus self-assigned this Apr 14, 2023
@barcus
Copy link
Owner

barcus commented May 15, 2023

Hello Ludwig,
This is the good way to setup your own timezone i think 👍
Maybe it should be added by default in all compose file !

@grapemix
Copy link

I can confirmed that the package tzdata is being installed in 21-alpine, so we can just set an env var called TZ and we can get local time in the box.

On the other hand, images like fd and sd don't have tzdata installed, so mounting /etc/timezone won't help getting the local time in the box. So adding tzdata inside the Dockerfile is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants