Unable to run Windows Time Service within a Docker container RRS feed

  • Question

  • Problem:

       My application requires Windows Time Service to be enabled. But I'm unable to start it when running microsoft/dotnet-       framework:4.7.2-runtime-20180508-windowsservercore-1803 image.

    Steps to reproduce:

    1. Run microsoft/dotnet-framework Docker container:
      docker run -it --rm microsoft/dotnet-framework:4.7.2-runtime-20180508-windowsservercore-1803
    2. Enter w32tm /register command.
    3. Enter net start w32time command.

    Expected behavior:

       The Windows Time Service is started successfully.

    Actual behavior:

       The service can not be started with a following error:

    The Windows Time service is starting.
    The Windows Time service could not be started.
    A system error has occurred.
    System error 5 has occurred.
    Access is denied.

    Additional information:

    A typical problem resolution which I see in web for the error like that is to run those commands from an elevated cmd/powershell. But I'm already an administrative user (ContainerAdministrator).
    Also I've tried to enable administrator user and to run a .ps1 script with the same commands from an Administrator account - and it's all the same.

    Also, the service starts successfully on a microsoft/dotnet-framework:4.7.2-runtime-20180508-windowsservercore-ltsc2016 image.

    Friday, June 1, 2018 10:00 AM

All replies

  • Greetings,

    Thanks for sharing the issue.

    Would you mind to post this issue in github? We may have to loop some developers to investigate this issue.

    Sic Parvis Magna

    Tuesday, June 5, 2018 1:19 AM
  • Hi,

    I've created an issue as you asked:

    Best regards,


    Tuesday, June 5, 2018 9:25 AM
  • I've got an answer there that this issue is not specific to the microsoft/dotnet-framework images, since it appears on 1709/1803 images only. As I said before, the problem is not reproduced on ltsc2016 image.
    Tuesday, June 5, 2018 3:40 PM
  • Thanks for updating.

    Base on the comment by Michael in following issue, will ltsc2016 be a workaround for you?

    Sic Parvis Magna

    Wednesday, June 6, 2018 12:54 AM
  • Using ltsc2016 is a potential workaround.  There are several reasons I can think of on why users would prefer 1709 or 1803 - reduced image size being the primary.  @Huajin, is there a recommendation for how to use the Windows Time Service within a 1709/1803 container?  Are there optional components that can be added to the image to get this to work?
    Wednesday, June 6, 2018 2:12 PM
  • Hello Michael,

    I cannot find a specific documentation for enabling Windows Time Service within a 1709/1803 container.

    Is it possible to ping taylorb about this issue via internal channel?

    Sic Parvis Magna

    Wednesday, June 6, 2018 3:35 PM
  • Hi guys,

    I do use ltsc2016 as a workaround, but this image is 3x heavier, which is not what we want from a Docker image.

    Wednesday, June 6, 2018 4:13 PM
  • Hi,

    Are there any plans on bringing NTP Service to work on 1709/1803?

    Thursday, June 7, 2018 8:28 AM
  • Are there any updates on this already? Being able to keep the time somewhat accurately inside the containers is really a must have.
     I also checked the latest insider image and it still has the problem.
    • Edited by Stannieman Friday, June 22, 2018 7:08 PM
    Friday, June 22, 2018 5:58 PM
  • Hello,

    Our application is getting stale tokens because of this bug. Do you have any timetable when a fix will be available?


    Tuesday, August 21, 2018 11:10 AM