Update dependencies

This commit is contained in:
James
2017-08-16 11:15:14 -07:00
parent b9c0374fe3
commit f46ea14760
1220 changed files with 142690 additions and 47576 deletions

View File

@@ -3,17 +3,17 @@ sudo: required
go:
- 1.7.x
- 1.8.x
- 1.9rc1
- 1.9rc2
- tip
os:
- linux
- osx
env:
matrix:
- GOARCH=amd64 DOCKER_VERSION=1.12.6
- GOARCH=386 DOCKER_VERSION=1.12.6
- GOARCH=amd64 DOCKER_VERSION=1.13.1
- GOARCH=386 DOCKER_VERSION=1.13.1
- GOARCH=amd64 DOCKER_PKG_VERSION=17.06.0~ce-0~ubuntu
- GOARCH=386 DOCKER_PKG_VERSION=17.06.0~ce-0~ubuntu
- GOARCH=amd64 DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty
- GOARCH=386 DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty
global:
- GO_TEST_FLAGS=-race
- DOCKER_HOST=tcp://127.0.0.1:2375
@@ -28,6 +28,6 @@ matrix:
fast_finish: true
exclude:
- os: osx
env: GOARCH=amd64 DOCKER_VERSION=1.12.6
env: GOARCH=amd64 DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty
- os: osx
env: GOARCH=386 DOCKER_VERSION=1.12.6
env: GOARCH=386 DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty

View File

@@ -39,6 +39,7 @@ Chris Bednarski
Chris Stavropoulos
Christian Stewart
Christophe Mourette
Clint Armstrong
CMGS
Colin Hebert
Craig Jellick
@@ -59,6 +60,7 @@ Ed
Elias G. Schneevoigt
Erez Horev
Eric Anderson
Eric J. Holmes
Eric Mountain
Erwin van Eyk
Ethan Mosbaugh

View File

@@ -7,7 +7,7 @@ environment:
matrix:
- GOVERSION: 1.7.5
- GOVERSION: 1.8.3
- GOVERSION: 1.9rc1
- GOVERSION: 1.9rc2
install:
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- rmdir c:\go /s /q

View File

@@ -24,6 +24,7 @@ import (
"os"
"path/filepath"
"reflect"
"runtime"
"strconv"
"strings"
"sync/atomic"
@@ -33,7 +34,6 @@ import (
"github.com/docker/docker/pkg/homedir"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/stdcopy"
"github.com/hashicorp/go-cleanhttp"
"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
)
@@ -212,7 +212,7 @@ func NewVersionedClient(endpoint string, apiVersionString string) (*Client, erro
}
}
c := &Client{
HTTPClient: cleanhttp.DefaultClient(),
HTTPClient: defaultClient(),
Dialer: &net.Dialer{},
endpoint: endpoint,
endpointURL: u,
@@ -326,7 +326,7 @@ func NewVersionedTLSClientFromBytes(endpoint string, certPEMBlock, keyPEMBlock,
}
tlsConfig.RootCAs = caPool
}
tr := cleanhttp.DefaultTransport()
tr := defaultTransport()
tr.TLSClientConfig = tlsConfig
if err != nil {
return nil, err
@@ -1040,3 +1040,41 @@ func getDockerEnv() (*dockerEnv, error) {
dockerCertPath: dockerCertPath,
}, nil
}
// defaultTransport returns a new http.Transport with similar default values to
// http.DefaultTransport, but with idle connections and keepalives disabled.
func defaultTransport() *http.Transport {
transport := defaultPooledTransport()
transport.DisableKeepAlives = true
transport.MaxIdleConnsPerHost = -1
return transport
}
// defaultPooledTransport returns a new http.Transport with similar default
// values to http.DefaultTransport. Do not use this for transient transports as
// it can leak file descriptors over time. Only use this for transports that
// will be re-used for the same host(s).
func defaultPooledTransport() *http.Transport {
transport := &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).DialContext,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1,
}
return transport
}
// defaultClient returns a new http.Client with similar default values to
// http.Client, but with a non-shared Transport, idle connections disabled, and
// keepalives disabled.
func defaultClient() *http.Client {
return &http.Client{
Transport: defaultTransport(),
}
}

View File

@@ -10,8 +10,6 @@ import (
"context"
"net"
"net/http"
"github.com/hashicorp/go-cleanhttp"
)
// initializeNativeClient initializes the native Unix domain socket client on
@@ -21,7 +19,7 @@ func (c *Client) initializeNativeClient() {
return
}
socketPath := c.endpointURL.Path
tr := cleanhttp.DefaultTransport()
tr := defaultTransport()
tr.Dial = func(network, addr string) (net.Conn, error) {
return c.Dialer.Dial(unixProtocol, socketPath)
}

View File

@@ -13,7 +13,6 @@ import (
"time"
"github.com/Microsoft/go-winio"
"github.com/hashicorp/go-cleanhttp"
)
const namedPipeConnectTimeout = 2 * time.Second
@@ -36,7 +35,7 @@ func (c *Client) initializeNativeClient() {
timeout := namedPipeConnectTimeout
return winio.DialPipe(namedPipePath, &timeout)
}
tr := cleanhttp.DefaultTransport()
tr := defaultTransport()
tr.Dial = dialFunc
tr.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
return dialFunc(network, addr)

View File

@@ -328,6 +328,43 @@ type Config struct {
VolumesFrom string `json:"VolumesFrom,omitempty" yaml:"VolumesFrom,omitempty" toml:"VolumesFrom,omitempty"`
}
// HostMount represents a mount point in the container in HostConfig.
//
// It has been added in the version 1.25 of the Docker API
type HostMount struct {
Target string `json:"Target,omitempty" yaml:"Target,omitempty" toml:"Target,omitempty"`
Source string `json:"Source,omitempty" yaml:"Source,omitempty" toml:"Source,omitempty"`
Type string `json:"Type,omitempty" yaml:"Type,omitempty" toml:"Type,omitempty"`
ReadOnly bool `json:"ReadOnly,omitempty" yaml:"ReadOnly,omitempty" toml:"ReadOnly,omitempty"`
BindOptions *BindOptions `json:"BindOptions,omitempty" yaml:"BindOptions,omitempty" toml:"BindOptions,omitempty"`
VolumeOptions *VolumeOptions `json:"VolumeOptions,omitempty" yaml:"VolumeOptions,omitempty" toml:"VolumeOptions,omitempty"`
TempfsOptions *TempfsOptions `json:"TempfsOptions,omitempty" yaml:"TempfsOptions,omitempty" toml:"TempfsOptions,omitempty"`
}
// BindOptions contains optional configuration for the bind type
type BindOptions struct {
Propagation string `json:"Propagation,omitempty" yaml:"Propagation,omitempty" toml:"Propagation,omitempty"`
}
// VolumeOptions contains optional configuration for the volume type
type VolumeOptions struct {
NoCopy bool `json:"NoCopy,omitempty" yaml:"NoCopy,omitempty" toml:"NoCopy,omitempty"`
Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty" toml:"Labels,omitempty"`
DriverConfig VolumeDriverConfig `json:"DriverConfig,omitempty" yaml:"DriverConfig,omitempty" toml:"DriverConfig,omitempty"`
}
// TempfsOptions contains optional configuration for the tempfs type
type TempfsOptions struct {
SizeBytes int64 `json:"SizeBytes,omitempty" yaml:"SizeBytes,omitempty" toml:"SizeBytes,omitempty"`
Mode int `json:"Mode,omitempty" yaml:"Mode,omitempty" toml:"Mode,omitempty"`
}
// VolumeDriverConfig holds a map of volume driver specific options
type VolumeDriverConfig struct {
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
Options map[string]string `json:"Options,omitempty" yaml:"Options,omitempty" toml:"Options,omitempty"`
}
// Mount represents a mount point in the container.
//
// It has been added in the version 1.20 of the Docker API, available since
@@ -740,6 +777,7 @@ type HostConfig struct {
CPUPercent int64 `json:"CpuPercent,omitempty" yaml:"CpuPercent,omitempty"`
IOMaximumBandwidth int64 `json:"IOMaximumBandwidth,omitempty" yaml:"IOMaximumBandwidth,omitempty"`
IOMaximumIOps int64 `json:"IOMaximumIOps,omitempty" yaml:"IOMaximumIOps,omitempty"`
Mounts []HostMount `json:"Mounts,omitempty" yaml:"Mounts,omitempty" toml:"Mounts,omitempty"`
}
// NetworkingConfig represents the container's networking configuration for each of its interfaces

View File

@@ -2686,7 +2686,7 @@ type sleepyRoudTripper struct {
func (rt *sleepyRoudTripper) RoundTrip(r *http.Request) (*http.Response, error) {
time.Sleep(rt.sleepDuration)
return nil, fmt.Errorf("Can't complete roung trip")
return nil, fmt.Errorf("Can't complete round trip")
}
func TestInspectContainerWhenContextTimesOut(t *testing.T) {

View File

@@ -15,8 +15,6 @@ import (
"path/filepath"
"testing"
"time"
"github.com/hashicorp/go-cleanhttp"
)
func TestExportContainerViaUnixSocket(t *testing.T) {
@@ -29,7 +27,7 @@ func TestExportContainerViaUnixSocket(t *testing.T) {
endpoint := "unix://" + tempSocket
u, _ := parseEndpoint(endpoint, false)
client := Client{
HTTPClient: cleanhttp.DefaultClient(),
HTTPClient: defaultClient(),
Dialer: &net.Dialer{},
endpoint: endpoint,
endpointURL: u,

View File

@@ -1559,6 +1559,7 @@ func (s *DockerServer) initSwarmNode(listenAddr, advertiseAddr string) (swarm.No
return swarm.Node{
ID: s.nodeID,
Status: swarm.NodeStatus{
Addr: hostPart,
State: swarm.NodeStateReady,
},
ManagerStatus: &swarm.ManagerStatus{

View File

@@ -10,10 +10,9 @@ if [[ $TRAVIS_OS_NAME == "linux" ]]; then
sudo rm -f `which docker`
set -e
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty testing" | sudo tee -a /etc/apt/sources.list.d/docker.list
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
sudo apt-get update
sudo apt-get install docker-engine=${DOCKER_VERSION}-0~ubuntu-$(lsb_release -cs) -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
sudo apt-get install docker-ce=${DOCKER_PKG_VERSION} -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
sudo start docker || true
fi