Reputation: 2119
I'm on OS X using boot2docker. I'm trying to use fabric to simplify running docker containers for our QA's.
Running this command...
containerFound = fab.local('docker ps -a | grep nodejs', capture=True)
# this didn't work either if fab.local('docker ps -a | grep nodejs').succeeded
generates the following error:
Fatal error: local() encountered an error (return code 1) while executing 'docker ps -a | grep nodejs'
Is this an issue using boot2docker. I tried using sudo as well but nothing. I believe boot2docker runs as root anyways so sudo isn't needed.
Upvotes: 0
Views: 329
Reputation: 362
In Fabric 1.3.2 at least, you can recover the exception by catching the SystemExit exception. That's helpful if you have more than one command to run in a batch (like a deploy) and want to cleanup if one of them fails.
Upvotes: 1