@@ -41,8 +41,6 @@ import (
4141 "time"
4242
4343 "github.com/arduino/arduino-connector/auth"
44- "github.com/docker/docker/api/types"
45- docker "github.com/docker/docker/client"
4644 mqtt "github.com/eclipse/paho.mqtt.golang"
4745 "github.com/facchinm/service"
4846 "github.com/kardianos/osext"
@@ -116,47 +114,6 @@ func createConfigFolder() error {
116114 return nil
117115}
118116
119- func retrieveDockerImages () ([]string , error ) {
120- imageListOptions := types.ImageListOptions {All : true }
121-
122- cli , err := docker .NewClientWithOpts (docker .WithVersion ("1.38" ))
123- if err != nil {
124- return []string {}, err
125- }
126-
127- images , err := cli .ImageList (context .Background (), imageListOptions )
128- if err != nil {
129- return []string {}, err
130- }
131-
132- imgs := []string {}
133- for _ , v := range images {
134- imgs = append (imgs , v .RepoTags [0 ])
135- }
136- return imgs , nil
137- }
138-
139- func retrieveDockerContainer () ([]string , error ) {
140- cli , err := docker .NewClientWithOpts (docker .WithVersion ("1.38" ))
141- if err != nil {
142- return []string {}, err
143- }
144-
145- containers , err := cli .ContainerList (context .Background (), types.ContainerListOptions {All : true })
146- if err != nil {
147- return []string {}, err
148- }
149-
150- cs := []string {}
151- for _ , v := range containers {
152- cs = append (cs , v .ID )
153- }
154-
155- fmt .Println ("containers when create config: " , cs )
156-
157- return cs , nil
158- }
159-
160117func isNetManagerInstalled () bool {
161118 cmd := exec .Command ("bash" , "-c" , "dpkg --get-selections | grep network-manager" )
162119 out , _ := cmd .CombinedOutput ()
0 commit comments