This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2551
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2551 by this push:
     new 947397a47 [DATALAB-2551]: fixed docker daemon.json
947397a47 is described below

commit 947397a47016f942bef7bbe268ba40124da6fc82
Author: leonidfrolov <[email protected]>
AuthorDate: Wed May 25 17:30:10 2022 +0300

    [DATALAB-2551]: fixed docker daemon.json
---
 infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py 
b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
index f5628add7..c27382c69 100644
--- a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
+++ b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
@@ -247,8 +247,12 @@ def ensure_docker_endpoint():
                                            "| grep 'DNS Servers:' "
                                            "| awk '{print $3}'")
                                   .stdout.rstrip("\n\r"))
-                conn.sudo("sed -i 's|DNS_IP_RESOLVE|\"dns\": [\"{0}\"],|g' 
{1}/tmp/daemon.json"
+                if dns_ip_resolve:
+                    conn.sudo("sed -i 's|DNS_IP_RESOLVE|\"dns\": [\"{0}\"],|g' 
{1}/tmp/daemon.json"
                           .format(dns_ip_resolve, args.datalab_path))
+                else:
+                    conn.sudo("sed -i 's|DNS_IP_RESOLVE||g' {}/tmp/daemon.json"
+                              .format(args.datalab_path))
             elif args.cloud_provider == "gcp" or args.cloud_provider == 
"azure":
                 dns_ip_resolve = ""
                 conn.sudo('sed -i "s|DNS_IP_RESOLVE||g" {1}/tmp/daemon.json'


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to