Skip to content

Commit

Permalink
Vendor dependencies and use docker/go-docker for API types
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Oct 20, 2017
1 parent 82b95ee commit 7ce693f
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 32 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
play-with-docker
node_modules
docker-compose.single.yml
lala
vendor
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.8
FROM golang:1.9

COPY . /go/src/github.com/play-with-docker/play-with-docker

Expand Down
18 changes: 9 additions & 9 deletions docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions docker/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docker/local_cached_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions docker/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion provisioner/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pwd/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pwd/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pwd/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions router/l2/l2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions scheduler/task/check_swarm_ports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scheduler/task/check_swarm_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions scheduler/task/check_swarm_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scheduler/task/collect_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scheduler/task/collect_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7ce693f

Please sign in to comment.