@@ -76,6 +76,7 @@ func hasRunningTasksInNetwork(d networkInspector) bool {
7676
7777 if len (resp .Containers ) > 1 {
7878 // Has other containers running in the network
79+ logrus .Infof ("%d other task(s) running locally, skipping network removal." , len (resp .Containers )- 1 )
7980 return true
8081 }
8182
@@ -99,7 +100,7 @@ func stopEndpointsContainer(d containerStopper) {
99100 err := d .ContainerStop (ctx , localEndpointsContainerName , nil )
100101 if err != nil {
101102 if strings .Contains (strings .ToLower (err .Error ()), "no such container" ) {
102- // The container was removed , do nothing.
103+ // The containers in the network were already stopped by the user using "docker stop" , do nothing.
103104 return
104105 }
105106 logrus .Fatalf ("Failed to stop %s container due to %v" , localEndpointsContainerName , err )
@@ -122,7 +123,7 @@ func removeEndpointsContainer(d containerRemover) {
122123 err := d .ContainerRemove (ctx , localEndpointsContainerName , types.ContainerRemoveOptions {})
123124 if err != nil {
124125 if strings .Contains (strings .ToLower (err .Error ()), "no such container" ) {
125- // The container was removed, do nothing.
126+ // The containers in the network were already removed by the user using "docker rm" , do nothing.
126127 return
127128 }
128129 logrus .Fatalf ("Failed to remove %s container due to %v" , localEndpointsContainerName , err )
0 commit comments