diff --git a/docker.go b/docker.go index a383731c21..2b21924d63 100644 --- a/docker.go +++ b/docker.go @@ -5,8 +5,6 @@ import ( "context" "encoding/binary" "fmt" - "github.com/cenkalti/backoff" - "github.com/docker/docker/errdefs" "io" "io/ioutil" "log" @@ -16,6 +14,9 @@ import ( "strings" "time" + "github.com/cenkalti/backoff" + "github.com/docker/docker/errdefs" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" @@ -23,8 +24,8 @@ import ( "github.com/docker/docker/client" "github.com/docker/go-connections/nat" + "github.com/google/uuid" "github.com/pkg/errors" - uuid "github.com/satori/go.uuid" "github.com/testcontainers/testcontainers-go/wait" ) @@ -413,8 +414,8 @@ func NewDockerProvider() (*DockerProvider, error) { // BuildImage will build and image from context and Dockerfile, then return the tag func (p *DockerProvider) BuildImage(ctx context.Context, img ImageBuildInfo) (string, error) { - repo := uuid.NewV4() - tag := uuid.NewV4() + repo := uuid.New() + tag := uuid.New() repoTag := fmt.Sprintf("%s:%s", repo, tag) @@ -463,7 +464,7 @@ func (p *DockerProvider) CreateContainer(ctx context.Context, req ContainerReque req.Labels = make(map[string]string) } - sessionID := uuid.NewV4() + sessionID := uuid.New() var termSignal chan bool if !req.SkipReaper { @@ -684,7 +685,7 @@ func (p *DockerProvider) CreateNetwork(ctx context.Context, req NetworkRequest) Labels: req.Labels, } - sessionID := uuid.NewV4() + sessionID := uuid.New() var termSignal chan bool if !req.SkipReaper { diff --git a/go.mod b/go.mod index 288719ed9c..5703a70032 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/go-redis/redis v6.15.7+incompatible github.com/go-sql-driver/mysql v1.5.0 github.com/gogo/protobuf v1.2.0 // indirect + github.com/google/uuid v1.1.1 github.com/gorilla/context v1.1.1 // indirect github.com/gorilla/mux v1.6.2 // indirect github.com/kr/pretty v0.1.0 // indirect @@ -26,7 +27,6 @@ require ( github.com/opencontainers/image-spec v1.0.1 // indirect github.com/opencontainers/runc v0.1.1 // indirect github.com/pkg/errors v0.9.1 - github.com/satori/go.uuid v1.2.0 github.com/sirupsen/logrus v1.2.0 // indirect golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect google.golang.org/grpc v1.17.0 // indirect @@ -34,6 +34,4 @@ require ( gotest.tools v0.0.0-20181223230014-1083505acf35 ) -replace github.com/gofrs/uuid => github.com/google/uuid v1.1.1 - replace github.com/docker/docker => github.com/docker/engine v0.0.0-20190717161051-705d9623b7c1 diff --git a/go.sum b/go.sum index 9bbcd24710..edfa5b54f7 100644 --- a/go.sum +++ b/go.sum @@ -50,6 +50,8 @@ github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaW github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk= @@ -93,8 +95,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=