Docker Community Forums

Share and learn in the Docker community.

Status time wrong after restart for restarted container

(Donovan) #1

Expected behavior

status up time should be consistent with created time.

Actual behavior

status up time is showing several hours difference from created time.


I created the example nginx container with restart always - restarted the docker vm and then looked at ps output. Noticed the created time looked correct, but status up time looked incorrect:

C:\Users\Donovan>docker run -d -p 80:80 --name webserver --restart always nginx

C:\Users\Donovan>docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                           NAMES
11354016d3f9        nginx               "nginx -g 'daemon off"   51 seconds ago      Up 4 hours>80/tcp, 443/tcp   webserver

I don’t recall this being an issue with virtualbox and released docker 1.11 binary, but I did not use another machine to go back and test - apologies if it has nothing to do with docker for windows beta.

beta 13 update: the problem still happens, but I’ve restarted enough times now to notice that it doesn’t always happen - though it still happens on most restarts that automatically started containers have the wrong status time. If i had to guess: on most startups the docker daemon is running before any time adjustments in the vm.

Steps to reproduce the behavior

1.create daemonized container with restart always
2.restart docker vm (i used exit on the systray, and then started it again)
3. check ps output, notice uptime vs created time (see output in information section above)