Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Windows] How to properly set container Time Zone configuration? OR, how to ignore host Time Zone configuration? #40284
Hi, I'm using the following Windows Server Core Image:
My container image need to run over unknown container hosts, like AWS, Azure AKS, On Premises and even on Windows Desktops and those hosts have unknown Time Zone configurations.
I need to ensure that an Windows Server Core ltsc2019 container runs under an exactly Time Zone.
I'm newbie, but as far as I know, the whole thing about containers is ship it as image once and run it everywhere, with environment isolation and integrity.. right?!
Well, I already tried:
By the way, Windows Location and Language container settings seems to have same issues :(
@sanguedemonstro Why system timezone matters on your use case? Common way handle these is use UTC time on those parts of code where time really matters (e.g. authentication) and then on UI side show time using timezone on where end user is located.
Side comment. If possible I highly recommend port your application(s) to .NET Core and switch to Linux containers because of much better performance, stability and community support.
System Time Zone really really really matters on my use case, I'm porting whole legacy ERP systems to container, those systems are composed by:
There are .NET components and Win32 components, some of them from 3rd party.
No way to change that.
We build and maintain a lot of ERP systems (accounting, HCM, health care, logistics, industry, tourism) for hundreds of customers running on many scenarious (cloud, on-prem, hybrid) all over the country.
Our company is beting on Windows Server containers to bring legacy systems to the cloud.
.NET and Win32 softwares will be around for long time for sure.. Microsoft could realize that globalization settings like language and time zone are fundamental to keep the world runnig..
So.. any help would be awesome.
@sanguedemonstro OK. That is definitely right use case for Windows containers. I just wanted to make sure because you see (ugly) issues/limitations which does not exist Linux version of Docker.
However if you cannot change application(s) code then your options are:
I also suggest that you invest to Microsoft Premier Support becsuse it really is only way to get support for Windows containers issues which are not on open source parts of the code.
PS. We have run Windows containers on production about 2 years now and I have been the one who has tried to tackle those most critical issues so if you want here more about real world experiences you can reach me on Docker community Slack.
@sanguedemonstro read your playground docs now and noticed that we have got date and time to be visible on Finnish format (and PowerShell cmdlet
That is done by importing those settings directly to registry by using Dockerfile like this:
And here is actual registry file (which I have just exported from server with full UI):
@sanguedemonstro Other thing which come to my mind is that even on AKS those Windows container nodes are dedicated for single Azure tenant so it is technically possible to have different settings on them between Azure tenants.
That why I think that you should also create feature request for them about
@olljanat - great to see you have been running Windows containers in production for 2 years. That's amazing! Would love to know more and hear your best practices. You can reach me and my team by email at win-containers@Microsoft.com. or on Twitter @WeijuanLand.
Also I was earlier keep tracking of known issues on https://github.com/olljanat/docker-issue-tracking but it is not fully up to date
Not so nice thing looks to be that Win Srv 2019 added a lot of new issues to Windows containers which indicates that integration tests with Docker features have not been run on Microsoft side (and lot of them are actually disabled on Moby too for Windows). That why we have been forced to keep most of our production containers still on Windows Server 2016. Also when I was working on with #39733 it started to feel that no one on Microsoft have not actually done any kind of load test/benchmarking for Windows containers...
So yes I can update those which was listed above and also drop your email but if I can wish I would like to see more people from Microsoft working with Moby project.