diff --git a/hack/vendor.sh b/hack/vendor.sh index daebce5d5c..46c4bfb113 100755 --- a/hack/vendor.sh +++ b/hack/vendor.sh @@ -25,7 +25,7 @@ clone git golang.org/x/net 78cb2c067747f08b343f20614155233ab4ea2ad3 https://gith clone git golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3 clone git github.com/docker/go-connections v0.2.0 -clone git github.com/docker/engine-api a2999dbd3471ffe167f2aec7dccb9fa9b016dcbc +clone git github.com/docker/engine-api b7e5e1ecd6121d7b643d607f20ced0cb5c93739c clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837 clone git github.com/imdario/mergo 0.2.1 diff --git a/vendor/src/github.com/docker/engine-api/client/client.go b/vendor/src/github.com/docker/engine-api/client/client.go index f91d235be4..8c8c6fd182 100644 --- a/vendor/src/github.com/docker/engine-api/client/client.go +++ b/vendor/src/github.com/docker/engine-api/client/client.go @@ -21,7 +21,7 @@ type Client struct { addr string // basePath holds the path to prepend to the requests. basePath string - // transport is the interface to sends request with, it implements transport.Client. + // transport is the interface to send request with, it implements transport.Client. transport transport.Client // version of the server to talk to. version string diff --git a/vendor/src/github.com/docker/engine-api/client/image_pull.go b/vendor/src/github.com/docker/engine-api/client/image_pull.go index 0584f00bd4..9287604a47 100644 --- a/vendor/src/github.com/docker/engine-api/client/image_pull.go +++ b/vendor/src/github.com/docker/engine-api/client/image_pull.go @@ -27,7 +27,7 @@ func (cli *Client) ImagePull(ctx context.Context, ref string, options types.Imag query := url.Values{} query.Set("fromImage", repository) - if tag != "" { + if tag != "" && !options.All { query.Set("tag", tag) } diff --git a/vendor/src/github.com/docker/engine-api/client/image_push.go b/vendor/src/github.com/docker/engine-api/client/image_push.go index 8134f8018c..9c837a76d1 100644 --- a/vendor/src/github.com/docker/engine-api/client/image_push.go +++ b/vendor/src/github.com/docker/engine-api/client/image_push.go @@ -10,7 +10,6 @@ import ( distreference "github.com/docker/distribution/reference" "github.com/docker/engine-api/types" - "github.com/docker/engine-api/types/reference" ) // ImagePush requests the docker host to push an image to a remote registry. @@ -27,7 +26,10 @@ func (cli *Client) ImagePush(ctx context.Context, ref string, options types.Imag return nil, errors.New("cannot push a digest reference") } - tag := reference.GetTagFromNamedRef(distributionRef) + var tag = "" + if nameTaggedRef, isNamedTagged := distributionRef.(distreference.NamedTagged); isNamedTagged { + tag = nameTaggedRef.Tag() + } query := url.Values{} query.Set("tag", tag) diff --git a/vendor/src/github.com/docker/engine-api/client/request.go b/vendor/src/github.com/docker/engine-api/client/request.go index 4ad2d24b88..cdbb0975bd 100644 --- a/vendor/src/github.com/docker/engine-api/client/request.go +++ b/vendor/src/github.com/docker/engine-api/client/request.go @@ -85,6 +85,11 @@ func (cli *Client) sendClientRequest(ctx context.Context, method, path string, q } req, err := cli.newRequest(method, path, query, body, headers) + if cli.proto == "unix" || cli.proto == "npipe" { + // For local communications, it doesn't matter what the host is. We just + // need a valid and meaningful host name. (See #189) + req.Host = "docker" + } req.URL.Host = cli.addr req.URL.Scheme = cli.transport.Scheme() diff --git a/vendor/src/github.com/docker/engine-api/client/transport/cancellable/LICENSE b/vendor/src/github.com/docker/engine-api/client/transport/cancellable/LICENSE new file mode 100644 index 0000000000..6a66aea5ea --- /dev/null +++ b/vendor/src/github.com/docker/engine-api/client/transport/cancellable/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/src/github.com/docker/engine-api/types/client.go b/vendor/src/github.com/docker/engine-api/types/client.go index a345341490..ab61103842 100644 --- a/vendor/src/github.com/docker/engine-api/types/client.go +++ b/vendor/src/github.com/docker/engine-api/types/client.go @@ -178,6 +178,7 @@ type ImageLoadResponse struct { // ImagePullOptions holds information to pull images. type ImagePullOptions struct { + All bool RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry PrivilegeFunc RequestPrivilegeFunc } diff --git a/vendor/src/github.com/docker/engine-api/types/configs.go b/vendor/src/github.com/docker/engine-api/types/configs.go index fc840e3f2d..7d4fcb343e 100644 --- a/vendor/src/github.com/docker/engine-api/types/configs.go +++ b/vendor/src/github.com/docker/engine-api/types/configs.go @@ -38,7 +38,7 @@ type ContainerCommitConfig struct { Config *container.Config } -// ExecConfig is a small subset of the Config struct that hold the configuration +// ExecConfig is a small subset of the Config struct that holds the configuration // for the exec feature of docker. type ExecConfig struct { User string // User that will run the command diff --git a/vendor/src/github.com/docker/engine-api/types/container/host_config.go b/vendor/src/github.com/docker/engine-api/types/container/host_config.go index cd3a9f6725..39f6a22516 100644 --- a/vendor/src/github.com/docker/engine-api/types/container/host_config.go +++ b/vendor/src/github.com/docker/engine-api/types/container/host_config.go @@ -25,7 +25,7 @@ func (i Isolation) IsDefault() bool { // IpcMode represents the container ipc stack. type IpcMode string -// IsPrivate indicates whether the container uses it's private ipc stack. +// IsPrivate indicates whether the container uses its private ipc stack. func (n IpcMode) IsPrivate() bool { return !(n.IsHost() || n.IsContainer()) } @@ -186,7 +186,7 @@ func (rp *RestartPolicy) IsAlways() bool { } // IsOnFailure indicates whether the container has the "on-failure" restart policy. -// This means the contain will automatically restart of exiting with a non-zero exit status. +// This means the container will automatically restart of exiting with a non-zero exit status. func (rp *RestartPolicy) IsOnFailure() bool { return rp.Name == "on-failure" } diff --git a/vendor/src/github.com/docker/engine-api/types/reference/image_reference.go b/vendor/src/github.com/docker/engine-api/types/reference/image_reference.go index 6bfb2f99bf..be9cf8ebed 100644 --- a/vendor/src/github.com/docker/engine-api/types/reference/image_reference.go +++ b/vendor/src/github.com/docker/engine-api/types/reference/image_reference.go @@ -4,7 +4,7 @@ import ( distreference "github.com/docker/distribution/reference" ) -// Parse parses the given references and return the repository and +// Parse parses the given references and returns the repository and // tag (if present) from it. If there is an error during parsing, it will // return an error. func Parse(ref string) (string, string, error) { @@ -18,7 +18,7 @@ func Parse(ref string) (string, string, error) { } // GetTagFromNamedRef returns a tag from the specified reference. -// This function is necessary as long as the docker "server" api make the distinction between repository +// This function is necessary as long as the docker "server" api makes the distinction between repository // and tags. func GetTagFromNamedRef(ref distreference.Named) string { var tag string @@ -27,6 +27,8 @@ func GetTagFromNamedRef(ref distreference.Named) string { tag = x.Digest().String() case distreference.NamedTagged: tag = x.Tag() + default: + tag = "latest" } return tag } diff --git a/vendor/src/github.com/docker/engine-api/types/registry/registry.go b/vendor/src/github.com/docker/engine-api/types/registry/registry.go index 4fcf986e7b..8a6fe70ea7 100644 --- a/vendor/src/github.com/docker/engine-api/types/registry/registry.go +++ b/vendor/src/github.com/docker/engine-api/types/registry/registry.go @@ -82,7 +82,7 @@ type SearchResult struct { IsOfficial bool `json:"is_official"` // Name is the name of the repository Name string `json:"name"` - // IsOfficial indicates whether the result is trusted + // IsTrusted indicates whether the result is trusted IsTrusted bool `json:"is_trusted"` // IsAutomated indicates whether the result is automated IsAutomated bool `json:"is_automated"` diff --git a/vendor/src/github.com/docker/engine-api/types/versions/v1p20/types.go b/vendor/src/github.com/docker/engine-api/types/versions/v1p20/types.go index ed800061fa..5736efad00 100644 --- a/vendor/src/github.com/docker/engine-api/types/versions/v1p20/types.go +++ b/vendor/src/github.com/docker/engine-api/types/versions/v1p20/types.go @@ -27,7 +27,7 @@ type ContainerConfig struct { VolumeDriver string } -// StatsJSON is a backcompatibility struct used in Stats for API prior to 1.21 +// StatsJSON is a backcompatibility struct used in Stats for APIs prior to 1.21 type StatsJSON struct { types.Stats Network types.NetworkStats `json:"network,omitempty"`