From e27033a5dd545fdfae8c51800705b065de258308 Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Mon, 20 Jan 2025 17:27:50 +0530 Subject: [PATCH] chore: try new docker config --- packages/tests/src/lib/dockerode.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/tests/src/lib/dockerode.ts b/packages/tests/src/lib/dockerode.ts index 2428b67cb9..5aa8e2db22 100644 --- a/packages/tests/src/lib/dockerode.ts +++ b/packages/tests/src/lib/dockerode.ts @@ -107,6 +107,7 @@ export default class Dockerode { const container = await this.docker.createContainer({ Image: this.IMAGE_NAME, HostConfig: { + NetworkMode: NETWORK_NAME, AutoRemove: true, PortBindings: { [`${restPort}/tcp`]: [{ HostPort: restPort.toString() }], @@ -116,6 +117,8 @@ export default class Dockerode { [`${discv5UdpPort}/udp`]: [{ HostPort: discv5UdpPort.toString() }] }) }, + Dns: ["8.8.8.8"], + Links: [], Mounts: args.rlnRelayEthClientAddress ? [ { @@ -135,18 +138,19 @@ export default class Dockerode { [`${discv5UdpPort}/udp`]: {} }) }, - Cmd: argsArrayWithIP - }); - await container.start(); - - await Dockerode.network.connect({ - Container: container.id, - EndpointConfig: { - IPAMConfig: { - IPv4Address: this.containerIp + Cmd: argsArrayWithIP, + NetworkingConfig: { + EndpointsConfig: { + [NETWORK_NAME]: { + IPAMConfig: { + IPv4Address: this.containerIp + } + } } } }); + await container.start(); + const logStream = fs.createWriteStream(logPath); container.logs(