fixed when container removed to be removed from the tracked list

This commit is contained in:
2021-08-13 22:52:01 +04:00
parent a920ff749b
commit c7985ed318
2 changed files with 7 additions and 39 deletions

View File

@@ -152,6 +152,12 @@ func RemoveContainerGroups(ContainerID string) error {
if err != nil {
return err
}
// Write groups information on the grouptrackcontainer.json file
err = groups.WriteGroup()
if err != nil {
return err
}
return nil
}

View File

@@ -2,45 +2,7 @@
"Groups": [
{
"ID": "grp8c59a8bd-56c2-4234-b7b7-3ef4727da927",
"TrackContainer": [
{
"ID": "9c407a796018eba3db51eda61d6e6f75adea2da66bca2e7a2b1c1cdb08f282aa",
"Container": {
"SSHUsername": "master",
"SSHPassword": "password",
"ID": "9c407a796018eba3db51eda61d6e6f75adea2da66bca2e7a2b1c1cdb08f282aa",
"TagName": "p2p-ubuntu",
"ImagePath": "/home/akilan/Documents/p2p-rendering-computation/server/docker/containers/docker-ubuntu-sshd/",
"Ports": {
"Port": [
{
"PortName": "SSH",
"InternalPort": 22,
"Type": "tcp",
"ExternalPort": 43835,
"Description": "SSH Port"
},
{
"PortName": "NoVNC",
"InternalPort": 5901,
"Type": "tcp",
"ExternalPort": 34383,
"Description": "NoVNC port"
},
{
"PortName": "NoVNC",
"InternalPort": 6081,
"Type": "tcp",
"ExternalPort": 34501,
"Description": "NoVNC port"
}
]
},
"GPU": "false"
},
"IpAddress": "0.0.0.0"
}
]
"TrackContainer": []
}
]
}