about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/docker.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/docker.go b/src/docker.go
index 12f3b54..51e1d81 100644
--- a/src/docker.go
+++ b/src/docker.go
@@ -79,7 +79,16 @@ func spawnCompanion(username string, accesscode string) {
 		},
 	}
 
-	log.Println("Starting the container")
+	circusNetworkID, err := getCircusNetworkID(dockerCtx, dockerCLI)
+	NetworkingConfig := &network.NetworkingConfig{
+		EndpointsConfig: map[string]*network.EndpointSettings{
+			"circus": {
+				NetworkID: circusNetworkID,
+			},
+		},
+	}
+
+	log.Println("Creating the container")
 
 	// create the docker container
 	resp, err := dockerCLI.ContainerCreate(dockerCtx, Config, HostConfig, nil, "")