diff --git a/docs/get-started.md b/docs/get-started.md index bfd93b564f..9967363133 100644 --- a/docs/get-started.md +++ b/docs/get-started.md @@ -209,6 +209,40 @@ Commands that follow this style are: For machines other than `default`, and commands other than those listed above, you must always specify the name explicitly as an argument. +## Start local machines on startup + +In order to ensure that the Docker client is automatically configured at the start of each shell session, some users like to embed `eval $(docker-machine env default)` in their shell profiles (e.g., the `~/.bash_profile` file). However, this fails if the `default` machine is not running. If desired, you can configure your system to start the `default` machine automatically. + +Here is an example of how to configure this on OS X. + +Create a file called `com.docker.machine.default.plist` under `~/Library/LaunchAgents` with the following content: + +``` + + + + + EnvironmentVariables + + PATH + /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin + + Label + com.docker.machine.default + ProgramArguments + + /usr/local/bin/docker-machine + start + default + + RunAtLoad + + + +``` + +You can change the `default` string above to make this `LaunchAgent` start any machine(s) you desire. + ## Where to go next - Provision multiple Docker hosts [on your cloud provider](get-started-cloud.md)