Skip to content

Commit

Permalink
Only use IPv4 nameservers on Mac (#1482)
Browse files Browse the repository at this point in the history
Workaround for a Docker bug: docker/for-mac#1432
  • Loading branch information
dimaryaz authored Jan 3, 2020
1 parent 411b24e commit b3d0f48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/python/quilt3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ def _launch_local_s3proxy():

# Workaround for a Docker-for-Mac bug in which the container
# ends up with a different DNS server than the host.
command += ["--dns", dns_resolver.nameservers[0]]
# Workaround #2: use only IPv4 addresses.
if sys.platform == 'darwin':
nameservers = [ip for ip in dns_resolver.nameservers if ip.count('.') == 3]
command += ["--dns", nameservers[0]]

command += ["-p", "5002:80", "quiltdata/s3proxy"]
subprocess.Popen(command)

Expand Down

0 comments on commit b3d0f48

Please sign in to comment.