Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dockerutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def isDockerRunningOnOSX():
(os.path.isfile('/usr/local/bin/boot2docker')
and isBoot2DockerRunning()) or
(os.path.isfile('/usr/local/bin/docker-machine')
and isDockerMachineRunning()))
and isDockerMachineRunning()) or
(os.path.isfile('/usr/local/bin/docker')
and isDockerNativeRunning()))


def isBoot2DockerRunning():
Expand Down Expand Up @@ -91,6 +93,13 @@ def isDockerMachineRunning():
setEnvVariables()
return True

def isDockerNativeRunning():
docker_ping = "curl --unix-socket /var/run/docker.sock http://localhost/_ping"
status = os.popen(docker_ping).read().strip()
if (status == "OK"):
return True
return False

def isDockerInstalledOnLinux():
if shutil.which('docker') != None :
return True
Expand Down