File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -174,12 +174,18 @@ class DockerNetworkMonitor {
174
174
// Merge the sets for the same hostname in multiple networks together, to create
175
175
// a single mapping from hostnames to all possible addresses. This isn't great,
176
176
// but hopefully in practice there will be few or zero conflicts regardless.
177
- return _ . assignWith < { [ hostname : string ] : Set < string > } > ( { } ,
177
+ const aliasMapping = _ . assignWith < { [ hostname : string ] : Set < string > } > ( { } ,
178
178
...Object . values ( this . aliasMappings ) ,
179
179
( existingIps : Set < string > = new Set ( ) , nextIps : Set < string > = new Set ( ) ) => {
180
180
return new Set ( [ ...existingIps , ...nextIps ] ) ;
181
181
}
182
182
) ;
183
+
184
+ return {
185
+ ...aliasMapping ,
186
+ // Host.docker.internal is always supported as an alias for us, the host OS
187
+ 'host.docker.internal' : new Set ( [ '127.0.0.1' ] )
188
+ } ;
183
189
}
184
190
185
191
onEvent = async ( event : DockerEvent ) => {
You can’t perform that action at this time.
0 commit comments