2

I am trying to start docker-machine using a launchctl. I have install docker-machine using the docker toolbox. Here is my plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.docker.machine.default</string>
        <key>EnvironmentVariables</key>
        <dict>
            <key>PATH</key>
            <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string>
        </dict>
        <key>ProgramArguments</key>
        <array>
            <string>docker-machine</string>
            <string>start</string>
            <string>default</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
</plist>

However I get this error, and I unsure how to solve it.

^[[Oct  1 11:08:00 lm com.apple.xpc.launchd[1] (com.docker.machine.default[4157]): Service could not initialize: 14D136: xpcproxy + 13421 [1402][E34BADE4-4125-3886-AA5B-08E47BD0E884]: 0x2
  • Did you ever figure this out? – pdoherty926 Nov 23 '15 at 15:51
  • @pdoherty926 No unfortunately not. I'm still getting this error. I have to start docker-machine manually every time I turn my computer on. Are you having the same problem? If so then I will create an issue on docker-machine repo. – Michael Barton Nov 23 '15 at 19:58
  • Yeah, I wasn't able to get anything similar working. My current approach is to set Docker Quickstart Terminal as a Login Item, with some modifications to its start shell script. – pdoherty926 Nov 23 '15 at 22:23
0

Better late than never :)

The first argument in ProgramArguments (here: docker-machine) need to be an absolute path to docker-machine executable. For me, it should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.docker.machine.default</string>
        <key>EnvironmentVariables</key>
        <dict>
            <key>PATH</key>
            <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string>
        </dict>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/local/bin/docker-machine</string>
            <string>start</string>
            <string>default</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
</plist>

Determine yours by running which docker-machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.