Skip to content

Commit 5d39343

Browse files
authored
dns: hostfix for docker internal domain (#286)
1 parent 43b3266 commit 5d39343

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/integration.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ jobs:
9292
- name: Validate Docker
9393
run: docker ps && docker info
9494

95+
- name: Validate DNS
96+
run: colima ssh -- nslookup host.docker.internal
97+
9598
- name: Build Image
9699
run: docker build integration
97100

@@ -142,6 +145,9 @@ jobs:
142145
- name: Build Image
143146
run: docker build integration
144147

148+
- name: Validate DNS
149+
run: colima ssh -- nslookup host.docker.internal
150+
145151
- name: Stop
146152
run: colima stop
147153

@@ -233,6 +239,9 @@ jobs:
233239
- name: Validate Containerd
234240
run: colima nerdctl ps && colima nerdctl info
235241

242+
- name: Validate DNS
243+
run: colima ssh -- nslookup host.docker.internal
244+
236245
- name: Build Image
237246
run: colima nerdctl -- build integration
238247

environment/vm/lima/network/daemon/gvproxy/gvproxy.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,21 @@ func configuration() types.Configuration {
105105
DHCPStaticLeases: map[string]string{
106106
DeviceIP: MacAddress(),
107107
},
108-
DNS: []types.Zone{},
108+
DNS: []types.Zone{
109+
{
110+
Name: "internal.",
111+
Records: []types.Record{
112+
{
113+
Name: "host.docker",
114+
IP: net.ParseIP("192.168.5.2"),
115+
},
116+
{
117+
Name: "host.lima",
118+
IP: net.ParseIP("192.168.5.2"),
119+
},
120+
},
121+
},
122+
},
109123
DNSSearchDomains: searchDomains(),
110124
NAT: map[string]string{
111125
natIP: "127.0.0.1",

0 commit comments

Comments
 (0)