1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 09:53:21 +08:00

Fixes prometheus gauges

Fix session close. Now PWD gets disconnected from network before
deleting it.
This commit is contained in:
Jonathan Leibiusky (@xetorthio)
2016-12-17 11:41:24 -08:00
parent 70eaf37d4b
commit 93226e30ff
4 changed files with 48 additions and 33 deletions

View File

@@ -142,6 +142,17 @@ func ConnectNetwork(containerId, networkId string) error {
return nil
}
func DisconnectNetwork(containerId, networkId string) error {
err := c.NetworkDisconnect(context.Background(), networkId, containerId, true)
if err != nil {
log.Printf("Disconnection of container from network err [%s]\n", err)
return err
}
return nil
}
func DeleteNetwork(id string) error {
err := c.NetworkRemove(context.Background(), id)