docker / libcompose

*Unmaintained/Deprecated* An experimental go library providing Compose-like functionality
https://godoc.org/github.com/docker/libcompose
Apache License 2.0
585 stars 191 forks source link

Network Alias #461

Closed vito-c closed 6 years ago

vito-c commented 7 years ago

From what I can tell network aliases don't work at all.

vito-c commented 7 years ago
ALIASES: [mongo.db mongo.local.test.in]
Network ID: "test_default"
ENDPOINT: &network.EndpointSettings{IPAMConfig:(*network.EndpointIPAMConfig)(0xc4202e9b40), Links:[]string{}, Aliases:[]string{"mongo.db", "mongo.local.test.in"},
     fmt.Printf("Network ID: %#v\n", networkID)
    fmt.Printf("ENDPOINT: %#v\n", nc.EndpointConfig)
    fmt.Printf("*ENDPOINT: %#v\n", config)
    resp, err := cli.post(ctx, "/networks/" + networkID + "/connect", nil, nc, nil)

Here is the response:

ALIASES: [mongo.db mongo.local.test.in]
Network ID: "test_default"
ENDPOINT: &network.EndpointSettings{IPAMConfig:(*network.EndpointIPAMConfig)(0xc4202e9b40), Links:[]string{}, Aliases:[]string{"mongo.db", "mongo.local.test.in"},

RESP: client.serverResponse{
body:http.noBody{}, header:http.Header{
  "Docker-Experimental":[]string{"true"}, "Server":[]string{
     "Docker/17.03.1-ce (linux)"}, 
      "Api-Version":[]string{"1.27"}, 
      "Content-Length":[]string{"0"}, 
      "Content-Type":[]string{"text/plain; charset=utf-8"}, 
      "Date":[]string{"Thu, 27 Apr 2017 17:15:49 GMT"}}, statusCode:200}

Then docker inspect doesn't show any networks.