I would like to autostart a docker container in the background at boot. I do not want it to start at login, but at boot (to serve a HTTP interface to all my colleagues on the LAN) before/without anyone logging in. I have tried to start the Docker App using a file in /Library/LaunchDaemons, but it seems like the Docker App requires the user to be logged in first.

When googling, I get a lot of solutions for old VirtualBox style Docker, but I would prefer to use the official (xhyve) docker.

Running MacOS 10.12.1. Docker installed by just downloading the Docker App dmg from Stable channel.

  • Did you install xhyve and probably docker-machine-driver-xhyve with homebrew?
    – klanomath
    Oct 26, 2016 at 15:27
  • @klanomath, no I downloaded this dmg: download.docker.com/mac/stable/Docker.dmg and drag-and-drop:ed Docker into my Applications. Oct 28, 2016 at 9:21
  • Please add a link to one of the "lot of solutions for old VirtualBox style Docker" which fits your need.
    – klanomath
    Oct 31, 2016 at 3:13

1 Answer 1


🚧*    Under construction    🚧

Docker for Mac is launched sandboxed (or not, if disabled in the Docker prefs) while logging in by a LogInItem in the application bundle probably using this HelperApp method.

This is the reason why neither a launch agent nor a login item (in System Preferences > User & Groups > $USER > Login Item) is available.

Probably it's very costly to impossible to launch a user owned sandboxed container & webserver image to serve the wanted HTTP interface.

Maybe it's possible by using a classical method and installing xhyve & docker-machine-driver-xhyve with homebrew instead of a VirtualBox solution and linking the boot/user Docker environment and the user Docker environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .