@@ -40,8 +40,6 @@ import (
4040 "time"
4141
4242 "github.com/arduino/arduino-connector/auth"
43- "github.com/docker/docker/api/types"
44- docker "github.com/docker/docker/client"
4543 mqtt "github.com/eclipse/paho.mqtt.golang"
4644 "github.com/facchinm/service"
4745 "github.com/kardianos/osext"
@@ -106,47 +104,6 @@ func createConfigFolder() error {
106104 return nil
107105}
108106
109- func retrieveDockerImages () ([]string , error ) {
110- imageListOptions := types.ImageListOptions {All : true }
111-
112- cli , err := docker .NewClientWithOpts (docker .WithVersion ("1.38" ))
113- if err != nil {
114- return []string {}, err
115- }
116-
117- images , err := cli .ImageList (context .Background (), imageListOptions )
118- if err != nil {
119- return []string {}, err
120- }
121-
122- imgs := []string {}
123- for _ , v := range images {
124- imgs = append (imgs , v .RepoTags [0 ])
125- }
126- return imgs , nil
127- }
128-
129- func retrieveDockerContainer () ([]string , error ) {
130- cli , err := docker .NewClientWithOpts (docker .WithVersion ("1.38" ))
131- if err != nil {
132- return []string {}, err
133- }
134-
135- containers , err := cli .ContainerList (context .Background (), types.ContainerListOptions {All : true })
136- if err != nil {
137- return []string {}, err
138- }
139-
140- cs := []string {}
141- for _ , v := range containers {
142- cs = append (cs , v .ID )
143- }
144-
145- fmt .Println ("containers when create config: " , cs )
146-
147- return cs , nil
148- }
149-
150107func isNetManagerInstalled () bool {
151108 cmd := exec .Command ("bash" , "-c" , "dpkg --get-selections | grep network-manager" )
152109 out , _ := cmd .CombinedOutput ()
0 commit comments