@@ -17,8 +17,8 @@ func newConf(conf config.Config) (l Config, err error) {
17
17
l .Arch = environment .Arch (conf .VM .Arch ).Value ()
18
18
19
19
l .Images = append (l .Images ,
20
- File {Arch : environment .AARCH64 , Location : "https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.3-1 /alpine-lima-clm-3.14.3-aarch64.iso" , Digest : "sha512:07d5b98f93c48e103cc0a3610a99980c17a5c8ca3ea81ca66ee53de2a182d41568e6701c146728270ecf2b8a944abc34f25ebb0edcea3378f2c17c75a287f85c " },
21
- File {Arch : environment .X8664 , Location : "https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.3-1 /alpine-lima-clm-3.14.3-x86_64.iso" , Digest : "sha512:1bcdf1fec1f7de5938a1dd6effad9546d20ff6caf6eefc8224a66af74891f0337f6f1e9bb8c2b3231e1364be004c3b25457cbc427968e27750d60662093538aa " },
20
+ File {Arch : environment .AARCH64 , Location : "https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.4 /alpine-lima-clm-3.14.3-aarch64.iso" , Digest : "sha512:9a964a8709e6813cfdfc4ac58a5c811de04aa6eb1a41c13fe9662b39a28af8222d2684e501637d6e294f3857328a46d69969c3e6b8868eb633478596733f168e " },
21
+ File {Arch : environment .X8664 , Location : "https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.4 /alpine-lima-clm-3.14.3-x86_64.iso" , Digest : "sha512:20237c13bf6e4769d4b027934d7084d436f3b930f4d8289aaba85d1db3025d28f0eabf7ea4aba8adef48ce3de1de3616a72b2fa8b31e818a6d30f4904483b8d9 " },
22
22
)
23
23
24
24
l .CPUs = conf .VM .CPU
@@ -33,6 +33,9 @@ func newConf(conf config.Config) (l Config, err error) {
33
33
// always use host resolver to generate Lima's default resolv.conf file
34
34
// colima will override this in VM when custom DNS is set
35
35
l .HostResolver .Enabled = true
36
+ l .HostResolver .Hosts = map [string ]string {
37
+ "host.docker.internal" : "host.lima.internal" ,
38
+ }
36
39
37
40
l .Env = map [string ]string {}
38
41
for k , v := range conf .VM .Env {
@@ -52,11 +55,23 @@ func newConf(conf config.Config) (l Config, err error) {
52
55
}
53
56
54
57
// handle port forwarding to allow listening on 0.0.0.0
58
+ // bind 0.0.0.0
59
+ l .PortForwards = append (l .PortForwards ,
60
+ PortForward {
61
+ GuestIPMustBeZero : true ,
62
+ GuestIP : net .ParseIP ("0.0.0.0" ),
63
+ GuestPortRange : [2 ]int {1 , 65535 },
64
+ HostIP : net .ParseIP ("0.0.0.0" ),
65
+ HostPortRange : [2 ]int {1 , 65535 },
66
+ Proto : TCP ,
67
+ },
68
+ )
69
+ // bind 127.0.0.1
55
70
l .PortForwards = append (l .PortForwards ,
56
71
PortForward {
57
72
GuestIP : net .ParseIP ("127.0.0.1" ),
58
73
GuestPortRange : [2 ]int {1 , 65535 },
59
- HostIP : conf . PortInterface ,
74
+ HostIP : net . ParseIP ( "127.0.0.1" ) ,
60
75
HostPortRange : [2 ]int {1 , 65535 },
61
76
Proto : TCP ,
62
77
},
@@ -152,21 +167,23 @@ const (
152
167
)
153
168
154
169
type PortForward struct {
155
- GuestIP net.IP `yaml:"guestIP,omitempty" json:"guestIP,omitempty"`
156
- GuestPort int `yaml:"guestPort,omitempty" json:"guestPort,omitempty"`
157
- GuestPortRange [2 ]int `yaml:"guestPortRange,omitempty" json:"guestPortRange,omitempty"`
158
- GuestSocket string `yaml:"guestSocket,omitempty" json:"guestSocket,omitempty"`
159
- HostIP net.IP `yaml:"hostIP,omitempty" json:"hostIP,omitempty"`
160
- HostPort int `yaml:"hostPort,omitempty" json:"hostPort,omitempty"`
161
- HostPortRange [2 ]int `yaml:"hostPortRange,omitempty" json:"hostPortRange,omitempty"`
162
- HostSocket string `yaml:"hostSocket,omitempty" json:"hostSocket,omitempty"`
163
- Proto Proto `yaml:"proto,omitempty" json:"proto,omitempty"`
164
- Ignore bool `yaml:"ignore,omitempty" json:"ignore,omitempty"`
170
+ GuestIPMustBeZero bool `yaml:"guestIPMustBeZero,omitempty" json:"guestIPMustBeZero,omitempty"`
171
+ GuestIP net.IP `yaml:"guestIP,omitempty" json:"guestIP,omitempty"`
172
+ GuestPort int `yaml:"guestPort,omitempty" json:"guestPort,omitempty"`
173
+ GuestPortRange [2 ]int `yaml:"guestPortRange,omitempty" json:"guestPortRange,omitempty"`
174
+ GuestSocket string `yaml:"guestSocket,omitempty" json:"guestSocket,omitempty"`
175
+ HostIP net.IP `yaml:"hostIP,omitempty" json:"hostIP,omitempty"`
176
+ HostPort int `yaml:"hostPort,omitempty" json:"hostPort,omitempty"`
177
+ HostPortRange [2 ]int `yaml:"hostPortRange,omitempty" json:"hostPortRange,omitempty"`
178
+ HostSocket string `yaml:"hostSocket,omitempty" json:"hostSocket,omitempty"`
179
+ Proto Proto `yaml:"proto,omitempty" json:"proto,omitempty"`
180
+ Ignore bool `yaml:"ignore,omitempty" json:"ignore,omitempty"`
165
181
}
166
182
167
183
type HostResolver struct {
168
- Enabled bool `yaml:"enabled" json:"enabled"`
169
- IPv6 bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty"`
184
+ Enabled bool `yaml:"enabled" json:"enabled"`
185
+ IPv6 bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty"`
186
+ Hosts map [string ]string `yaml:"hosts,omitempty" json:"hosts,omitempty"`
170
187
}
171
188
172
189
type volumeMount string
0 commit comments