From 259eb1423809c02093a2006117c35c0e29ad142f Mon Sep 17 00:00:00 2001 From: ronnyabraham Date: Fri, 29 Apr 2022 14:36:06 +0300 Subject: [PATCH] fixed following error: [localhost] run: docker-machine ip default [localhost] out: /usr/local/bin/virtualenvwrapper.sh: line 230: : command not found [localhost] out: virtualenvwrapper.sh: There was a problem running the initialization hooks. [localhost] out: [localhost] out: If Python could not import the module virtualenvwrapper.hook_loader, [localhost] out: check that virtualenvwrapper has been installed for [localhost] out: VIRTUALENVWRAPPER_PYTHON= and that PATH is [localhost] out: set properly. [localhost] out: Error getting IP address: ssh command error: [localhost] out: command : ip addr show [localhost] out: err : exit status 255 [localhost] out: output : [localhost] out: --- modules/docker.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/docker.py b/modules/docker.py index 9475da1..e53be78 100644 --- a/modules/docker.py +++ b/modules/docker.py @@ -22,6 +22,10 @@ def docker_ip(): docker_cmd = 'docker-machine ip %s' % \ configuration.docker.machine + docker_cmd = "docker inspect -f '{{" + docker_cmd += "range.NetworkSettings.Networks}}" + docker_cmd += "{{.IPAddress}}{{end}}' pedantic_tu" + return _execute(docker_cmd) else: @@ -43,7 +47,7 @@ def docker_run(cmd): _execute = executize("run") if configuration.docker.database.host != 'local': _execute = executize("sudo") - + if configuration.docker.machine: docker_eval = "eval $(docker-machine env %s)" % \ configuration.docker.machine @@ -278,7 +282,8 @@ def edit(param='help'): print('database template path: %s' % database_template_path) project_branch = configuration.project.branch - + print('project branch: %s' % project_branch) + locations = { 'database': { 'path': database_build_path,