Docker Community Forums

Share and learn in the Docker community.

Time in container causing issues with Azure Auth

(Dmolton) #1

Hi I’m trying to get a simple AspNetCore Web API up and running in a Windows container. I’m running into an issue when the web app launches and I try to communicate with a deployed Azure CosmosDB for the first time. The Azure service is returning the following:

One or more errors occurred. (The authorization token is not valid at the current time. Please create another token and retry (token start time: Sat, 19 May 2018 19:42:20 GMT, token expiry time: Sat, 19 May 2018 19:57:20 GMT, current server time: Sat, 19 May 2018 16:42:21 GMT).

As best I can tell the Azure service is providing an auth token good for 15 minutes however the time in the running container is off by 3 hours. I’ve confirmed the correct time in my bios and host Win 10 PC.

This is only an issue with the windows container. If switch to Linux containers - everything runs fine and the same service can communicate with azure db no problem.

Any help is greatly appreciated.