我是Docker的新手,所以可能错过了一个明显的配置。
有人可以在这里提出可能存在的问题吗?
即:我可以添加到我的#34;码头运行"脚本,以便从我的docker容器中看到两个远程机器?
干杯,
克里斯
下面包含的容器内的NSLOOKUP和DIG信息。 注意:我现在在组织中的另一个办公室(在不同的子网上),当我第一次发布原始查询时。在这个办公室里,我的docker容器无法访问machine1或machine2。但是,当我的docker容器外面时,我仍然可以访问它们。
MACHINE 1
=========
root@cb4b66d8ad7e:/# nslookup machine1.sydney.network
Server: 127.0.0.11
Address: 127.0.0.11#53
Non-authoritative answer:
Name: machine1.sydney.network
Address: 172.16.32.20
----------------------------------
root@cb4b66d8ad7e:/# dig machine1.sydney.network
; <<>> DiG 9.10.3-P4-Ubuntu <<>> machine1.sydney.network
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12578
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;machine1.sydney.network. IN A
;; ANSWER SECTION:
machine1.sydney.network. 1916 IN A 172.16.32.20
;; Query time: 12 msec
;; SERVER: 127.0.0.11#53(127.0.0.11)
;; WHEN: Mon Apr 30 23:53:05 UTC 2018
;; MSG SIZE rcvd: 70
MACHINE 2
=========
root@cb4b66d8ad7e:/# nslookup machine2.sydney.network
Server: 127.0.0.11
Address: 127.0.0.11#53
Non-authoritative answer:
Name: machine2.sydney.network
Address: 172.17.32.115
----------------------------------
root@cb4b66d8ad7e:/# dig machine2.sydney.network
; <<>> DiG 9.10.3-P4-Ubuntu <<>> machine2.sydney.network
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42566
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;machine2.sydney.network. IN A
;; ANSWER SECTION:
machine2.sydney.network. 60 IN A 172.17.32.115
;; Query time: 11 msec
;; SERVER: 127.0.0.11#53(127.0.0.11)
;; WHEN: Mon Apr 30 23:48:45 UTC 2018
;; MSG SIZE rcvd: 70