Skip to content

Commit

Permalink
feat(docker): set docker.ip fallback to 127.0.0.1
Browse files Browse the repository at this point in the history
Close #216
  • Loading branch information
Toilal committed Oct 11, 2022
1 parent 6bf49ea commit 5d0afb8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ddb/feature/docker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,8 @@ def _configure_defaults_ip(self, feature_config):
raise FeatureConfigurationAutoConfigureError(self, 'ip',
"Can't get ip address "
"from network interface configuration: " + interface)
except FeatureConfigurationAutoConfigureError as error:
if os.path.exists('/var/run/docker.sock'):
ip_address = '127.0.0.1'
else:
raise error
except FeatureConfigurationAutoConfigureError:
ip_address = '127.0.0.1'

feature_config['ip'] = ip_address

Expand Down

0 comments on commit 5d0afb8

Please sign in to comment.