Vendor dependencies and use docker/go-docker for API types

This commit is contained in:
Marcos Lilljedahl
2017-10-20 18:42:16 -03:00
parent 82b95ee112
commit 7ce693fab5
16 changed files with 31 additions and 32 deletions

3
.gitignore vendored
View File

@@ -1,4 +1,3 @@
play-with-docker
node_modules
docker-compose.single.yml
lala
vendor

View File

@@ -1,4 +1,4 @@
FROM golang:1.8
FROM golang:1.9
COPY . /go/src/github.com/play-with-docker/play-with-docker

View File

@@ -14,13 +14,13 @@ import (
"strings"
"time"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/api/types/volume"
"github.com/docker/docker/client"
client "docker.io/go-docker"
"docker.io/go-docker/api/types"
"docker.io/go-docker/api/types/container"
"docker.io/go-docker/api/types/network"
"docker.io/go-docker/api/types/swarm"
"docker.io/go-docker/api/types/volume"
"github.com/containerd/containerd/reference"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/play-with-docker/play-with-docker/config"
)
@@ -398,7 +398,7 @@ func (d *docker) GetContainerIPs(id string) (map[string]string, error) {
}
func (d *docker) pullImage(ctx context.Context, image string) error {
_, err := reference.ParseNormalizedNamed(image)
_, err := reference.Parse(image)
if err != nil {
return err
}
@@ -431,7 +431,7 @@ func (d *docker) ExecAttach(instanceName string, command []string, out io.Writer
if err != nil {
return 0, err
}
resp, err := d.c.ContainerExecAttach(context.Background(), e.ID, types.ExecStartCheck{Tty: true})
resp, err := d.c.ContainerExecAttach(context.Background(), e.ID, types.ExecConfig{AttachStdout: true, AttachStderr: true, Tty: true})
if err != nil {
return 0, err
}

View File

@@ -8,8 +8,8 @@ import (
"net/url"
"time"
"github.com/docker/docker/api"
"github.com/docker/docker/client"
"docker.io/go-docker/api"
client "docker.io/go-docker"
"github.com/docker/go-connections/tlsconfig"
"github.com/play-with-docker/play-with-docker/pwd/types"
"github.com/play-with-docker/play-with-docker/router"

View File

@@ -7,7 +7,7 @@ import (
"sync"
"time"
"github.com/docker/docker/client"
client "docker.io/go-docker"
"github.com/play-with-docker/play-with-docker/pwd/types"
"github.com/play-with-docker/play-with-docker/storage"
)

View File

@@ -5,8 +5,8 @@ import (
"net"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"docker.io/go-docker/api/types"
client "docker.io/go-docker"
"github.com/stretchr/testify/mock"
)

View File

@@ -6,7 +6,7 @@ import (
"net/url"
"strings"
dtypes "github.com/docker/docker/api/types"
dtypes "docker.io/go-docker/api/types"
"github.com/play-with-docker/play-with-docker/config"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/pwd/types"

View File

@@ -4,7 +4,7 @@ import (
"testing"
"time"
dtypes "github.com/docker/docker/api/types"
dtypes "docker.io/go-docker/api/types"
"github.com/play-with-docker/play-with-docker/config"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/event"

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
dtypes "github.com/docker/docker/api/types"
dtypes "docker.io/go-docker/api/types"
"github.com/play-with-docker/play-with-docker/config"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/event"

View File

@@ -4,7 +4,7 @@ import (
"testing"
"time"
dtypes "github.com/docker/docker/api/types"
dtypes "docker.io/go-docker/api/types"
"github.com/play-with-docker/play-with-docker/config"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/event"

View File

@@ -10,10 +10,10 @@ import (
"os"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"docker.io/go-docker/api/types"
"docker.io/go-docker/api/types/filters"
"docker.io/go-docker/api/types/network"
client "docker.io/go-docker"
"github.com/gorilla/mux"
"github.com/play-with-docker/play-with-docker/config"
"github.com/play-with-docker/play-with-docker/router"

View File

@@ -4,8 +4,8 @@ import (
"context"
"testing"
dockerTypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
dockerTypes "docker.io/go-docker/api/types"
"docker.io/go-docker/api/types/swarm"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/event"
"github.com/play-with-docker/play-with-docker/pwd/types"

View File

@@ -4,7 +4,7 @@ import (
"context"
"log"
"github.com/docker/docker/api/types/swarm"
"docker.io/go-docker/api/types/swarm"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/event"
"github.com/play-with-docker/play-with-docker/pwd/types"

View File

@@ -4,8 +4,8 @@ import (
"context"
"testing"
dockerTypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
dockerTypes "docker.io/go-docker/api/types"
"docker.io/go-docker/api/types/swarm"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/event"
"github.com/play-with-docker/play-with-docker/pwd/types"

View File

@@ -10,7 +10,7 @@ import (
"net/url"
"time"
dockerTypes "github.com/docker/docker/api/types"
dockerTypes "docker.io/go-docker/api/types"
units "github.com/docker/go-units"
lru "github.com/hashicorp/golang-lru"
"github.com/play-with-docker/play-with-docker/docker"

View File

@@ -7,7 +7,7 @@ import (
"io"
"testing"
dockerTypes "github.com/docker/docker/api/types"
dockerTypes "docker.io/go-docker/api/types"
"github.com/play-with-docker/play-with-docker/docker"
"github.com/play-with-docker/play-with-docker/event"
"github.com/play-with-docker/play-with-docker/pwd/types"