Docker reverting to previous state when computer awakes from sleep

Expected behavior

When computer awakes from sleep, Docker for Mac awakes to the same state it was in prior to sleep.

Actual behavior

When it awakes Docker for Mac resets to some old state where different containers were running, not running the ones you had before sleeping.
The effect of this is that every time you walk away from your computer and it auto-locks, anything you were using is stopped and a bunch of random containers have taken their place.

Information

  • the output of:
    • pinata diagnose -u on OSX
      OS X: version 10.10.5 (build: 14F27)
      Docker.app: version v1.11.1-beta13
      Running diagnostic tests:
      [OK] Moby booted
      [OK] driver.amd64-linux
      [OK] vmnetd
      [OK] osxfs
      [OK] db
      [OK] slirp
      [OK] menubar
      [OK] environment
      [OK] Docker
      [OK] VT-x
      Docker logs are being collected into /tmp/20160527-110721.tar.gz
      Most specific failure is: No error was detected
      Your unique id is: 7E2BFEC8-BD97-4F2B-AD66-30E0A77F4CA2
      Please quote this in all correspondence.

Running on 10.10.5

Steps to reproduce the behavior

  1. Stop all containers
  2. Sleep the Mac
  3. Awake it
  4. Wait for Docker to respond
  5. Check what containers are running. It should be none since you stopped them all. I don’t know why it starts the containers it does, but it’s definitely unexpected.
1 Like

Similar to this

Sounds like you have the same problem that I have:

It looks like it, or something very similar in any case.

I’ve found that changing the sleep settings so my Mac sleeps after 30 minutes is a good solution. Suddenly I’ve found that everything is staying the way I left it!
Not practical for laptops though of course.