diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/docker.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/docker.go b/src/docker.go index 1dda5b2..7dfe584 100644 --- a/src/docker.go +++ b/src/docker.go @@ -120,6 +120,16 @@ func spawnCompanion(username string, accesscode string) { connectContainerToNetwork(containerID, circusNetworkID) log.Println("Container added to the circus network") + + // Get IP Address of that container + inspectJSON, err := dockerCLI.ContainerInspect(dockerCtx, containerID) + if err != nil { + log.Println("inspectJsonErr: ", err) + } + + fmt.Println("---") + fmt.Printf("%#v", inspectJSON.NetworkSettings.Networks) + fmt.Printf("companion IP: %#v", inspectJSON.NetworkSettings.Networks["circus"].IPAddress) } func generateSessionSalt() string { |