ditch docker sdk due to dated dependencies on case sensitive Sirupsen logrus
package main
-import (
- "bytes"
- "fmt"
- "os"
- "time"
+func main() {
- docker "github.com/fsouza/go-dockerclient"
- log "github.com/sirupsen/logrus"
-)
+ /*
+
+ c := config.New()
+
+ s := plugin.NewStore()
+
+ ctx := context.Background()
+
+ d, err := daemon.NewDaemon(ctx, c, s)
+ if err != nil {
+ log.Fatalln("error creating new docker daemon", err)
+ }
+
+ image, err := d.ImageService().LookupImage("nginx")
+ if err != nil {
+ log.Fatalln("error looking up image", err)
+ }
+
+ b := new(bytes.Buffer)
+
+ d.ImageService().PullImage(ctx, image.Config.Image, "", nil, nil, nil, b)
-func main() {
// TODO: make this run from a docker server instead of a client
// make a local docker client
@@ -39,7 +52,6 @@ func main() {
pullImage(dockerClient, opts, auth)
fmt.Println(b.Len())
-
}
// timeTrack tracks the time it takes for a function to complete
@@ -59,4 +71,6 @@ func pullImage(dockerClient *docker.Client, opts docker.PullImageOptions, auth d
log.Errorln("failed to pull image ", err)
os.Exit(1)
}
+
+ */
}
