Skip to content

Commit

Permalink
dns: hostfix for docker internal domain (abiosoft#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
abiosoft committed May 16, 2022
1 parent 43b3266 commit 5d39343
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ jobs:
- name: Validate Docker
run: docker ps && docker info

- name: Validate DNS
run: colima ssh -- nslookup host.docker.internal

- name: Build Image
run: docker build integration

Expand Down Expand Up @@ -142,6 +145,9 @@ jobs:
- name: Build Image
run: docker build integration

- name: Validate DNS
run: colima ssh -- nslookup host.docker.internal

- name: Stop
run: colima stop

Expand Down Expand Up @@ -233,6 +239,9 @@ jobs:
- name: Validate Containerd
run: colima nerdctl ps && colima nerdctl info

- name: Validate DNS
run: colima ssh -- nslookup host.docker.internal

- name: Build Image
run: colima nerdctl -- build integration

Expand Down
16 changes: 15 additions & 1 deletion environment/vm/lima/network/daemon/gvproxy/gvproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,21 @@ func configuration() types.Configuration {
DHCPStaticLeases: map[string]string{
DeviceIP: MacAddress(),
},
DNS: []types.Zone{},
DNS: []types.Zone{
{
Name: "internal.",
Records: []types.Record{
{
Name: "host.docker",
IP: net.ParseIP("192.168.5.2"),
},
{
Name: "host.lima",
IP: net.ParseIP("192.168.5.2"),
},
},
},
},
DNSSearchDomains: searchDomains(),
NAT: map[string]string{
natIP: "127.0.0.1",
Expand Down

0 comments on commit 5d39343

Please sign in to comment.