Keeping containers running across restart/reboot

I noticed that the current (Version 1.12.1-beta24 (build: 11525) Docker for Mac has a registry container that runs across restart/reboot. This appears to have started 3 weeks ago (per the container CREATED info).

I did a Google search, searched the Docker Forum and could not find any questions related to this, and tried searching the Mac OS X file system to see if I can identify how this is managed and can’t seem to find anything.

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
ee66e82e7076        registry:2          "/ /etc/"   3 weeks ago         Up 3 minutes>5000/tcp   registry

Does anyone know (a) how this works and (b) how can it be extended to include other containers that I would like to have running (e.g., a squid-deb-proxy for caching APT packages for Debian containers/VMs). Thanks!

We haven’t introduced any system service containers so I think that registry container was started by you. I believe you can get this kind of behavior using restart policies. See this Codeship blog post for an explanation or check out the docs.