diff options
author | Emile <hanemile@protonmail.com> | 2019-10-08 00:13:56 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-08 00:13:56 +0200 |
commit | 1a4167dc1e10e4d4d8167970948588b878e1de4d (patch) | |
tree | 163dae614093aefd8ff44d81b212e0a677b3a57c | |
parent | 4746698c0674c1ae9f25b221f239d390e5eb68bc (diff) |
getting the network id and building the network config
-rw-r--r-- | src/docker.go | 11 |
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, "") |