Skip to content

Commit 1188703

Browse files
committed
Adding node internal ip
1 parent d688ed8 commit 1188703

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

framework/components/clnode/clnode.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ type NodeOut struct {
7171
HostURL string `toml:"url"`
7272
DockerURL string `toml:"docker_internal_url"`
7373
DockerP2PUrl string `toml:"p2p_docker_internal_url"`
74+
InternalIP string `toml:"internal_ip"`
7475
}
7576

7677
// NewNodeWithDB create a new Chainlink node with some image:tag and one or several configs
@@ -298,6 +299,11 @@ func newNode(in *Input, pgOut *postgres.Output) (*NodeOut, error) {
298299
ContainerRequest: req,
299300
Started: true,
300301
})
302+
ip, err := c.ContainerIP(ctx)
303+
if err != nil {
304+
return nil, err
305+
}
306+
301307
if err != nil {
302308
return nil, err
303309
}
@@ -315,6 +321,7 @@ func newNode(in *Input, pgOut *postgres.Output) (*NodeOut, error) {
315321
HostURL: fmt.Sprintf("http://%s:%s", host, mp.Port()),
316322
DockerURL: fmt.Sprintf("http://%s:%s", containerName, DefaultHTTPPort),
317323
DockerP2PUrl: fmt.Sprintf("http://%s:%s", containerName, DefaultP2PPort),
324+
InternalIP: ip,
318325
}, nil
319326
}
320327

0 commit comments

Comments
 (0)