Skip to content

Commit 36a1aae

Browse files
committed
Don't try to tunnel Docker's host/none networks
1 parent af13258 commit 36a1aae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/interceptors/docker/docker-networking.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ class DockerNetworkMonitor {
269269
const networkDetails: Docker.NetworkInspectInfo = await this.docker.getNetwork(networkId).inspect();
270270
const isDefaultBridge = networkDetails.Options?.['com.docker.network.bridge.default_bridge'] === 'true';
271271

272+
if (networkDetails.Driver === 'null' || networkDetails.Driver === 'host') {
273+
// We can't (and shouldn't - it's inaccessible) join and route into the null 'none' network
274+
// We can't (and don't need to - it's always host-accessible) join and route into the 'host' network
275+
return undefined;
276+
}
277+
272278
const networkContainers = await Promise.all(
273279
Object.values(networkDetails.Containers ?? {}).map((networkContainer) =>
274280
this.docker.getContainer(networkContainer.Name).inspect()

0 commit comments

Comments
 (0)