Windows docker -f doesn't follow instantly #30046

hongxima opened this Issue Jan 11, 2017 · 4 comments


None yet

4 participants




Windows docker -f doesn't follow instantly as expected. Most the times It just outputted the history logs and stuck there , seldom it outputted new logs every one minute.
This happens ONLY to Windows docker.

Steps to reproduce the issue:
docker run -d --name=log-tester microsoft/windowsservercore powershell while ($true) {$d=Get-Date; write-host 'Time is:' $d; Sleep 1}
docker logs -f log-tester

Describe the results you received:
Logs didn't get printed every second. Instead, only history logs were outputted but new logs either didn't printed (most testcases) or printed in a batch every one minute (in very few testcases)

Describe the results you expected:
logs should be outputted in stream instantly. In this particular testcase, logs should get printed every second.

Output of docker version:

C:\Users\Administrator>docker version
 Version:      1.14.0-dev
 API version:  1.26
 Go version:   go1.7.3
 Git commit:   f93c04d
 Built:        Sat Dec 17 15:16:54 2016
 OS/Arch:      windows/amd64

 Version:             1.14.0-dev
 API version:         1.26
 Minimum API version: 1.24
 Go version:          go1.7.3
 Git commit:          f93c04d
 Built:               Sat Dec 17 15:16:54 2016
 OS/Arch:             windows/amd64
 Experimental:        false

Output of docker info:

C:\Users\Administrator>docker info
Containers: 8
 Running: 3
 Paused: 0
 Stopped: 5
Images: 25
Server Version: 1.14.0-dev
Storage Driver: windowsfilter
Logging Driver: json-file
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.351.amd64fre.rs1_release_inmarket.161014-1755)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 3.999 GiB
Name: WIN2016-DOCKER-01
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Experimental: false
Insecure Registries:
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):
VMware Workstation 12.5.1 Virtual Machine


Wondering; is it time related, or does if flush logs once a specific size is reached? If you try the same test container, but make it log a bigger log message, does that change what you're seeing?

Is your client also running inside the VM, or is it running on the host, and connecting with the VM over tcp/ip?

/cc @johnstep


I am looking into this now.


We also tried containers with massive logs, it did prove either time or 'log-buffer' related. Most of the test cases it just stuck there with the history logs printed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment