cirruslabs / gitlab-tart-executor

GitLab Runner executor to run jobs in Tart VMs
MIT License
60 stars 5 forks source link

Option to sync timezone from host #2

Closed fkorotkov closed 1 year ago

fkorotkov commented 1 year ago

So VM has the same timezone as host

edigaryev commented 1 year ago

This seems to require root privileges on both the host and the guest (systemsetup -gettimezone and systemsetup -settimezone <timezone>), which makes it infeasible.

Perhaps we should rather declare this as out-of-scope and propose users to set the timezone in the image itself (since we now have an automated way to do this)?

fkorotkov commented 1 year ago

It seems it's at least possible to find out host timezone without sudo. Maybe we can at least pass it as an environment variable? Or in case of such flag presented we can require that the username passed has sudo permissions and fail with a nice error in prepare if not. What do you think? 🤔