Skip to content

Commit

Permalink
chore: try new docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Jan 20, 2025
1 parent 8029f21 commit e27033a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions packages/tests/src/lib/dockerode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() }],
Expand All @@ -116,6 +117,8 @@ export default class Dockerode {
[`${discv5UdpPort}/udp`]: [{ HostPort: discv5UdpPort.toString() }]
})
},
Dns: ["8.8.8.8"],
Links: [],
Mounts: args.rlnRelayEthClientAddress
? [
{
Expand All @@ -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(
Expand Down

0 comments on commit e27033a

Please sign in to comment.