Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 57b27434ea | |||
| 010c234a0d | |||
| f6693b0b25 | |||
| ed16a3136b | |||
| e63ac0ea35 | |||
| c1a4358ea4 | |||
| 27ab7cc3d6 | |||
| 74bd5f143f | |||
| 8dc400713f | |||
| 543f9b32ee | |||
| 1d314f2227 | |||
| 275ab1f063 | |||
| 4f6ab11ff4 | |||
| 537309a548 | |||
| 08714b4579 | |||
| 789a15bc73 | |||
| ce12ac2d14 | |||
| 4c94a0af75 | |||
| 0717f261ed | |||
| fc8717799f | |||
| 76f4876129 | |||
| 7ea48a16e3 | |||
| 75e9075591 | |||
| 69e1094f5a | |||
| 890e29da87 | |||
| 78d52ec5d4 | |||
| c0bbca75af | |||
| b666e9a090 |
@ -34,10 +34,18 @@ func runDialStdio(dockerCli command.Cli) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to open the raw stream connection")
|
||||
}
|
||||
connHalfCloser, ok := conn.(halfCloser)
|
||||
if !ok {
|
||||
defer conn.Close()
|
||||
|
||||
var connHalfCloser halfCloser
|
||||
switch t := conn.(type) {
|
||||
case halfCloser:
|
||||
connHalfCloser = t
|
||||
case halfReadWriteCloser:
|
||||
connHalfCloser = &nopCloseReader{t}
|
||||
default:
|
||||
return errors.New("the raw stream connection does not implement halfCloser")
|
||||
}
|
||||
|
||||
stdin2conn := make(chan error)
|
||||
conn2stdout := make(chan error)
|
||||
go func() {
|
||||
@ -90,6 +98,19 @@ type halfCloser interface {
|
||||
halfWriteCloser
|
||||
}
|
||||
|
||||
type halfReadWriteCloser interface {
|
||||
io.Reader
|
||||
halfWriteCloser
|
||||
}
|
||||
|
||||
type nopCloseReader struct {
|
||||
halfReadWriteCloser
|
||||
}
|
||||
|
||||
func (x *nopCloseReader) CloseRead() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type halfReadCloserWrapper struct {
|
||||
io.ReadCloser
|
||||
}
|
||||
|
||||
@ -150,9 +150,8 @@ func TestOldValidAuth(t *testing.T) {
|
||||
|
||||
// defaultIndexserver is https://index.docker.io/v1/
|
||||
ac := config.AuthConfigs["https://index.docker.io/v1/"]
|
||||
if ac.Username != "joejoe" || ac.Password != "hello" {
|
||||
t.Fatalf("Missing data from parsing:\n%q", config)
|
||||
}
|
||||
assert.Equal(t, ac.Username, "joejoe")
|
||||
assert.Equal(t, ac.Password, "hello")
|
||||
|
||||
// Now save it and make sure it shows up in new form
|
||||
configStr := saveConfigAndValidateNewFormat(t, config, tmpHome)
|
||||
@ -213,9 +212,8 @@ func TestOldJSON(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
|
||||
ac := config.AuthConfigs["https://index.docker.io/v1/"]
|
||||
if ac.Username != "joejoe" || ac.Password != "hello" {
|
||||
t.Fatalf("Missing data from parsing:\n%q", config)
|
||||
}
|
||||
assert.Equal(t, ac.Username, "joejoe")
|
||||
assert.Equal(t, ac.Password, "hello")
|
||||
|
||||
// Now save it and make sure it shows up in new form
|
||||
configStr := saveConfigAndValidateNewFormat(t, config, tmpHome)
|
||||
@ -249,9 +247,8 @@ func TestNewJSON(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
|
||||
ac := config.AuthConfigs["https://index.docker.io/v1/"]
|
||||
if ac.Username != "joejoe" || ac.Password != "hello" {
|
||||
t.Fatalf("Missing data from parsing:\n%q", config)
|
||||
}
|
||||
assert.Equal(t, ac.Username, "joejoe")
|
||||
assert.Equal(t, ac.Password, "hello")
|
||||
|
||||
// Now save it and make sure it shows up in new form
|
||||
configStr := saveConfigAndValidateNewFormat(t, config, tmpHome)
|
||||
@ -284,9 +281,8 @@ func TestNewJSONNoEmail(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
|
||||
ac := config.AuthConfigs["https://index.docker.io/v1/"]
|
||||
if ac.Username != "joejoe" || ac.Password != "hello" {
|
||||
t.Fatalf("Missing data from parsing:\n%q", config)
|
||||
}
|
||||
assert.Equal(t, ac.Username, "joejoe")
|
||||
assert.Equal(t, ac.Password, "hello")
|
||||
|
||||
// Now save it and make sure it shows up in new form
|
||||
configStr := saveConfigAndValidateNewFormat(t, config, tmpHome)
|
||||
@ -431,10 +427,8 @@ func TestJSONReaderNoFile(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
|
||||
ac := config.AuthConfigs["https://index.docker.io/v1/"]
|
||||
if ac.Username != "joejoe" || ac.Password != "hello" {
|
||||
t.Fatalf("Missing data from parsing:\n%q", config)
|
||||
}
|
||||
|
||||
assert.Equal(t, ac.Username, "joejoe")
|
||||
assert.Equal(t, ac.Password, "hello")
|
||||
}
|
||||
|
||||
func TestOldJSONReaderNoFile(t *testing.T) {
|
||||
@ -444,9 +438,8 @@ func TestOldJSONReaderNoFile(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
|
||||
ac := config.AuthConfigs["https://index.docker.io/v1/"]
|
||||
if ac.Username != "joejoe" || ac.Password != "hello" {
|
||||
t.Fatalf("Missing data from parsing:\n%q", config)
|
||||
}
|
||||
assert.Equal(t, ac.Username, "joejoe")
|
||||
assert.Equal(t, ac.Password, "hello")
|
||||
}
|
||||
|
||||
func TestJSONWithPsFormatNoFile(t *testing.T) {
|
||||
|
||||
@ -44,8 +44,8 @@ from different sessions on the Docker host.
|
||||
|
||||
To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the
|
||||
container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to
|
||||
the container. You can detach from a container and leave it running using the
|
||||
`CTRL-p CTRL-q` key sequence.
|
||||
the container. If the container was run with `-i` and `-t`, you can detach from
|
||||
a container and leave it running using the `CTRL-p CTRL-q` key sequence.
|
||||
|
||||
> **Note:**
|
||||
> A process running as PID 1 inside a container is treated specially by
|
||||
|
||||
@ -504,13 +504,13 @@ stable.
|
||||
|
||||
|
||||
Squashing layers can be beneficial if your Dockerfile produces multiple layers
|
||||
modifying the same files, for example, file that are created in one step, and
|
||||
modifying the same files, for example, files that are created in one step, and
|
||||
removed in another step. For other use-cases, squashing images may actually have
|
||||
a negative impact on performance; when pulling an image consisting of multiple
|
||||
layers, layers can be pulled in parallel, and allows sharing layers between
|
||||
images (saving space).
|
||||
|
||||
For most use cases, multi-stage are a better alternative, as they give more
|
||||
For most use cases, multi-stage builds are a better alternative, as they give more
|
||||
fine-grained control over your build, and can take advantage of future
|
||||
optimizations in the builder. Refer to the [use multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/)
|
||||
section in the userguide for more information.
|
||||
@ -531,7 +531,7 @@ The `--squash` option has a number of known limitations:
|
||||
downloading a single layer cannot be parallelized.
|
||||
- When attempting to squash an image that does not make changes to the
|
||||
filesystem (for example, the Dockerfile only contains `ENV` instructions),
|
||||
the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823)
|
||||
the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823)).
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
|
||||
@ -303,7 +303,7 @@ the same file can share a single page cache entry (or entries), it makes
|
||||
> **Note**: As promising as `overlay` is, the feature is still quite young and
|
||||
> should not be used in production. Most notably, using `overlay` can cause
|
||||
> excessive inode consumption (especially as the number of images grows), as
|
||||
> well as > being incompatible with the use of RPMs.
|
||||
> well as being incompatible with the use of RPMs.
|
||||
|
||||
The `overlay2` uses the same fast union filesystem but takes advantage of
|
||||
[additional features](https://lkml.org/lkml/2015/2/11/106) added in Linux
|
||||
@ -1231,10 +1231,14 @@ The `--metrics-addr` option takes a tcp address to serve the metrics API.
|
||||
This feature is still experimental, therefore, the daemon must be running in experimental
|
||||
mode for this feature to work.
|
||||
|
||||
To serve the metrics API on localhost:1337 you would specify `--metrics-addr 127.0.0.1:1337`
|
||||
allowing you to make requests on the API at `127.0.0.1:1337/metrics` to receive metrics in the
|
||||
To serve the metrics API on `localhost:9323` you would specify `--metrics-addr 127.0.0.1:9323`,
|
||||
allowing you to make requests on the API at `127.0.0.1:9323/metrics` to receive metrics in the
|
||||
[prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) format.
|
||||
|
||||
Port `9323` is the [default port associated with Docker
|
||||
metrics](https://github.com/prometheus/prometheus/wiki/Default-port-allocations)
|
||||
to avoid collisions with other prometheus exporters and services.
|
||||
|
||||
If you are running a prometheus server you can add this address to your scrape configs
|
||||
to have prometheus collect metrics on Docker. For more information
|
||||
on prometheus you can view the website [here](https://prometheus.io/).
|
||||
@ -1243,7 +1247,7 @@ on prometheus you can view the website [here](https://prometheus.io/).
|
||||
scrape_configs:
|
||||
- job_name: 'docker'
|
||||
static_configs:
|
||||
- targets: ['127.0.0.1:1337']
|
||||
- targets: ['127.0.0.1:9323']
|
||||
```
|
||||
|
||||
Please note that this feature is still marked as experimental as metrics and metric
|
||||
@ -1308,7 +1312,7 @@ This is a full example of the allowed configuration options on Linux:
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "10m",
|
||||
"max-files":"5",
|
||||
"max-file":"5",
|
||||
"labels": "somelabel",
|
||||
"env": "os,customer"
|
||||
},
|
||||
|
||||
@ -177,7 +177,7 @@ This is similar to tagging an image and pushing it to a foreign registry.
|
||||
|
||||
After you have created your local copy of the manifest list, you may optionally
|
||||
`annotate` it. Annotations allowed are the architecture and operating system (overriding the image's current values),
|
||||
os features, and an archictecure variant.
|
||||
os features, and an architecture variant.
|
||||
|
||||
Finally, you need to `push` your manifest list to the desired registry. Below are descriptions of these three commands,
|
||||
and an example putting them all together.
|
||||
@ -270,5 +270,5 @@ $ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1
|
||||
$ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag
|
||||
```
|
||||
|
||||
Note that the `--insecure` flag is not required to annotate a manifest list, since annotations are to a locally-stored copy of a manifest list. You may also skip the `--insecure` flag if you are performaing a `docker manifest inspect` on a locally-stored manifest list. Be sure to keep in mind that locally-stored manifest lists are never used by the engine on a `docker pull`.
|
||||
Note that the `--insecure` flag is not required to annotate a manifest list, since annotations are to a locally-stored copy of a manifest list. You may also skip the `--insecure` flag if you are performing a `docker manifest inspect` on a locally-stored manifest list. Be sure to keep in mind that locally-stored manifest lists are never used by the engine on a `docker pull`.
|
||||
|
||||
|
||||
@ -116,6 +116,7 @@ Valid placeholders for the Go template are listed below:
|
||||
|
||||
Placeholder | Description
|
||||
----------------|------------------------------------------------------------------------------------------
|
||||
`.ID` | Task ID
|
||||
`.Name` | Task name
|
||||
`.Image` | Task image
|
||||
`.Node` | Node ID
|
||||
|
||||
@ -26,6 +26,17 @@ Options:
|
||||
--no-prune Do not delete untagged parents
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Removes (and un-tags) one or more images from the host node. If an image has
|
||||
multiple tags, using this command with the tag as a parameter only removes the
|
||||
tag. If the tag is the only one for the image, both the image and the tag are
|
||||
removed.
|
||||
|
||||
This does not remove images from a registry. You cannot remove an image of a
|
||||
running container unless you use the `-f` option. To see all images on a host
|
||||
use the [`docker image ls`](images.md) command.
|
||||
|
||||
## Examples
|
||||
|
||||
You can remove an image using its short or long ID, its tag, or its digest. If
|
||||
|
||||
@ -717,15 +717,15 @@ $ docker run -d --isolation default busybox top
|
||||
On Windows, `--isolation` can take one of these values:
|
||||
|
||||
|
||||
| Value | Description |
|
||||
|:----------|:-------------------------------------------------------------------------------------------|
|
||||
| `default` | Use the value specified by the Docker daemon's `--exec-opt` or system default (see below). |
|
||||
| `process` | Shared-kernel namespace isolation (not supported on Windows client operating systems). |
|
||||
| `hyperv` | Hyper-V hypervisor partition-based isolation. |
|
||||
| Value | Description |
|
||||
|:----------|:------------------------------------------------------------------------------------------------------------------|
|
||||
| `default` | Use the value specified by the Docker daemon's `--exec-opt` or system default (see below). |
|
||||
| `process` | Shared-kernel namespace isolation (not supported on Windows client operating systems older than Windows 10 1809). |
|
||||
| `hyperv` | Hyper-V hypervisor partition-based isolation. |
|
||||
|
||||
The default isolation on Windows server operating systems is `process`. The default (and only supported)
|
||||
The default isolation on Windows server operating systems is `process`. The default
|
||||
isolation on Windows client operating systems is `hyperv`. An attempt to start a container on a client
|
||||
operating system with `--isolation process` will fail.
|
||||
operating system older than Windows 10 1809 with `--isolation process` will fail.
|
||||
|
||||
On Windows server, assuming the default configuration, these commands are equivalent
|
||||
and result in `process` isolation:
|
||||
|
||||
@ -219,7 +219,7 @@ tutorial](https://docs.docker.com/engine/swarm/swarm-tutorial/rolling-update/).
|
||||
|
||||
### Set environment variables (-e, --env)
|
||||
|
||||
This sets an environmental variable for all tasks in a service. For example:
|
||||
This sets an environment variable for all tasks in a service. For example:
|
||||
|
||||
```bash
|
||||
$ docker service create \
|
||||
|
||||
@ -171,5 +171,5 @@ On Windows:
|
||||
"table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"
|
||||
|
||||
|
||||
> **Note**: On Docker 17.09 and older, the `{{.Container}}` column was used, in
|
||||
> stead of `{{.ID}}\t{{.Name}}`.
|
||||
> **Note**: On Docker 17.09 and older, the `{{.Container}}` column was used,
|
||||
> instead of `{{.ID}}\t{{.Name}}`.
|
||||
|
||||
@ -106,7 +106,7 @@ func ensureBasicPluginBin() (string, error) {
|
||||
}
|
||||
installPath := filepath.Join(os.Getenv("GOPATH"), "bin", name)
|
||||
cmd := exec.Command(goBin, "build", "-o", installPath, "./basic")
|
||||
cmd.Env = append(cmd.Env, "CGO_ENABLED=0")
|
||||
cmd.Env = append(os.Environ(), "CGO_ENABLED=0")
|
||||
if out, err := cmd.CombinedOutput(); err != nil {
|
||||
return "", errors.Wrapf(err, "error building basic plugin bin: %s", string(out))
|
||||
}
|
||||
|
||||
4
e2e/testdata/Dockerfile.connhelper-ssh
vendored
4
e2e/testdata/Dockerfile.connhelper-ssh
vendored
@ -1,10 +1,8 @@
|
||||
FROM docker:test-dind
|
||||
RUN apk --no-cache add shadow openssh-server && \
|
||||
groupadd -f docker && \
|
||||
useradd -m penguin && \
|
||||
useradd --create-home --shell /bin/sh --password $(head -c32 /dev/urandom | base64) penguin && \
|
||||
usermod -aG docker penguin && \
|
||||
usermod -p $(head -c32 /dev/urandom | base64) penguin && \
|
||||
chsh -s /bin/sh penguin && \
|
||||
ssh-keygen -A
|
||||
# workaround: ssh session excludes /usr/local/bin from $PATH
|
||||
RUN ln -s /usr/local/bin/docker /usr/bin/docker
|
||||
|
||||
@ -23,3 +23,29 @@ the same capabilities as the container, which may be limited. Set
|
||||
--user [user | user:group | uid | uid:gid | user:gid | uid:group ]
|
||||
|
||||
Without this argument the command will be run as root in the container.
|
||||
|
||||
# Exit Status
|
||||
|
||||
The exit code from `docker exec` gives information about why the container
|
||||
failed to exec or why it exited. When `docker exec` exits with a non-zero code,
|
||||
the exit codes follow the `chroot` standard, see below:
|
||||
|
||||
**_126_** if the **_contained command_** cannot be invoked
|
||||
|
||||
$ docker exec busybox /etc; echo $?
|
||||
# exec: "/etc": permission denied
|
||||
docker: Error response from daemon: Contained command could not be invoked
|
||||
126
|
||||
|
||||
**_127_** if the **_contained command_** cannot be found
|
||||
|
||||
$ docker exec busybox foo; echo $?
|
||||
# exec: "foo": executable file not found in $PATH
|
||||
docker: Error response from daemon: Contained command not found or does not exist
|
||||
127
|
||||
|
||||
**_Exit code_** of **_contained command_** otherwise
|
||||
|
||||
$ docker exec busybox /bin/sh -c 'exit 3'
|
||||
# 3
|
||||
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
Removes one or more images from the host node. This does not remove images from
|
||||
a registry. You cannot remove an image of a running container unless you use the
|
||||
**-f** option. To see all images on a host use the **docker image ls** command.
|
||||
Removes (and un-tags) one or more images from the host node. If an image has
|
||||
multiple tags, using this command with the tag as a parameter only removes the
|
||||
tag. If the tag is the only one for the image, both the image and the tag are
|
||||
removed.
|
||||
|
||||
This does not remove images from a registry. You cannot remove an image of a
|
||||
running container unless you use the **-f** option. To see all images on a host
|
||||
use the **docker image ls** command.
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
|
||||
@ -69,6 +69,7 @@ function runtests {
|
||||
TEST_SKIP_PLUGIN_TESTS="${SKIP_PLUGIN_TESTS-}" \
|
||||
GOPATH="$GOPATH" \
|
||||
PATH="$PWD/build/:/usr/bin" \
|
||||
HOME="$HOME" \
|
||||
"$(which go)" test -v ./e2e/... ${TESTFLAGS-}
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ github.com/cpuguy83/go-md2man v1.0.8
|
||||
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76 # v1.1.0
|
||||
github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af
|
||||
github.com/docker/distribution 83389a148052d74ac602f5f1d62f86ff2f3c4aa5
|
||||
github.com/docker/docker d2ecc7bad104139c118249ad159b45315a022754 https://github.com/docker/engine # 18.09 branch
|
||||
github.com/docker/docker 200b524eff60a9c95a22bc2518042ac2ff617d07 https://github.com/docker/engine # 18.09 branch
|
||||
github.com/docker/docker-credential-helpers 5241b46610f2491efdf9d1c85f1ddf5b02f6d962
|
||||
# the docker/go package contains a customized version of canonical/json
|
||||
# and is used by Notary. The package is periodically rebased on current Go versions.
|
||||
|
||||
7
vendor/github.com/docker/docker/builder/remotecontext/git/gitutils.go
generated
vendored
7
vendor/github.com/docker/docker/builder/remotecontext/git/gitutils.go
generated
vendored
@ -102,6 +102,11 @@ func parseRemoteURL(remoteURL string) (gitRepo, error) {
|
||||
u.Fragment = ""
|
||||
repo.remote = u.String()
|
||||
}
|
||||
|
||||
if strings.HasPrefix(repo.ref, "-") {
|
||||
return gitRepo{}, errors.Errorf("invalid refspec: %s", repo.ref)
|
||||
}
|
||||
|
||||
return repo, nil
|
||||
}
|
||||
|
||||
@ -124,7 +129,7 @@ func fetchArgs(remoteURL string, ref string) []string {
|
||||
args = append(args, "--depth", "1")
|
||||
}
|
||||
|
||||
return append(args, "origin", ref)
|
||||
return append(args, "origin", "--", ref)
|
||||
}
|
||||
|
||||
// Check if a given git URL supports a shallow git clone,
|
||||
|
||||
10
vendor/github.com/docker/docker/client/request.go
generated
vendored
10
vendor/github.com/docker/docker/client/request.go
generated
vendored
@ -195,10 +195,18 @@ func (cli *Client) checkResponseErr(serverResp serverResponse) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(serverResp.body)
|
||||
bodyMax := 1 * 1024 * 1024 // 1 MiB
|
||||
bodyR := &io.LimitedReader{
|
||||
R: serverResp.body,
|
||||
N: int64(bodyMax),
|
||||
}
|
||||
body, err := ioutil.ReadAll(bodyR)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if bodyR.N == 0 {
|
||||
return fmt.Errorf("request returned %s with a message (> %d bytes) for API route and version %s, check if the server supports the requested API version", http.StatusText(serverResp.statusCode), bodyMax, serverResp.reqURL)
|
||||
}
|
||||
if len(body) == 0 {
|
||||
return fmt.Errorf("request returned %s for API route and version %s, check if the server supports the requested API version", http.StatusText(serverResp.statusCode), serverResp.reqURL)
|
||||
}
|
||||
|
||||
8
vendor/github.com/docker/docker/pkg/archive/copy.go
generated
vendored
8
vendor/github.com/docker/docker/pkg/archive/copy.go
generated
vendored
@ -336,6 +336,14 @@ func RebaseArchiveEntries(srcContent io.Reader, oldBase, newBase string) io.Read
|
||||
return
|
||||
}
|
||||
|
||||
// srcContent tar stream, as served by TarWithOptions(), is
|
||||
// definitely in PAX format, but tar.Next() mistakenly guesses it
|
||||
// as USTAR, which creates a problem: if the newBase is >100
|
||||
// characters long, WriteHeader() returns an error like
|
||||
// "archive/tar: cannot encode header: Format specifies USTAR; and USTAR cannot encode Name=...".
|
||||
//
|
||||
// To fix, set the format to PAX here. See docker/for-linux issue #484.
|
||||
hdr.Format = tar.FormatPAX
|
||||
hdr.Name = strings.Replace(hdr.Name, oldBase, newBase, 1)
|
||||
if hdr.Typeflag == tar.TypeLink {
|
||||
hdr.Linkname = strings.Replace(hdr.Linkname, oldBase, newBase, 1)
|
||||
|
||||
20
vendor/github.com/docker/docker/pkg/mount/sharedsubtree_linux.go
generated
vendored
20
vendor/github.com/docker/docker/pkg/mount/sharedsubtree_linux.go
generated
vendored
@ -48,18 +48,22 @@ func MakeRUnbindable(mountPoint string) error {
|
||||
return ensureMountedAs(mountPoint, "runbindable")
|
||||
}
|
||||
|
||||
func ensureMountedAs(mountPoint, options string) error {
|
||||
mounted, err := Mounted(mountPoint)
|
||||
// MakeMount ensures that the file or directory given is a mount point,
|
||||
// bind mounting it to itself it case it is not.
|
||||
func MakeMount(mnt string) error {
|
||||
mounted, err := Mounted(mnt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !mounted {
|
||||
if err := Mount(mountPoint, mountPoint, "none", "bind,rw"); err != nil {
|
||||
return err
|
||||
}
|
||||
if mounted {
|
||||
return nil
|
||||
}
|
||||
if _, err = Mounted(mountPoint); err != nil {
|
||||
|
||||
return Mount(mnt, mnt, "none", "bind")
|
||||
}
|
||||
|
||||
func ensureMountedAs(mountPoint, options string) error {
|
||||
if err := MakeMount(mountPoint); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
4
vendor/github.com/docker/docker/pkg/progress/progress.go
generated
vendored
4
vendor/github.com/docker/docker/pkg/progress/progress.go
generated
vendored
@ -39,6 +39,10 @@ type Output interface {
|
||||
type chanOutput chan<- Progress
|
||||
|
||||
func (out chanOutput) WriteProgress(p Progress) error {
|
||||
// FIXME: workaround for panic in #37735
|
||||
defer func() {
|
||||
recover()
|
||||
}()
|
||||
out <- p
|
||||
return nil
|
||||
}
|
||||
|
||||
2
vendor/github.com/docker/docker/registry/registry.go
generated
vendored
2
vendor/github.com/docker/docker/registry/registry.go
generated
vendored
@ -145,7 +145,7 @@ func trustedLocation(req *http.Request) bool {
|
||||
// addRequiredHeadersToRedirectedRequests adds the necessary redirection headers
|
||||
// for redirected requests
|
||||
func addRequiredHeadersToRedirectedRequests(req *http.Request, via []*http.Request) error {
|
||||
if via != nil && via[0] != nil {
|
||||
if len(via) != 0 && via[0] != nil {
|
||||
if trustedLocation(req) && trustedLocation(via[0]) {
|
||||
req.Header = via[0].Header
|
||||
return nil
|
||||
|
||||
47
vendor/github.com/docker/docker/vendor.conf
generated
vendored
47
vendor/github.com/docker/docker/vendor.conf
generated
vendored
@ -1,7 +1,7 @@
|
||||
# the following lines are in sorted order, FYI
|
||||
github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109
|
||||
github.com/Microsoft/hcsshim 44c060121b68e8bdc40b411beba551f3b4ee9e55
|
||||
github.com/Microsoft/go-winio v0.4.10
|
||||
github.com/Microsoft/hcsshim v0.7.12
|
||||
github.com/Microsoft/go-winio v0.4.11
|
||||
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
|
||||
github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git
|
||||
github.com/golang/gddo 9b12a26f3fbd7397dee4e20939ddca719d840d2a
|
||||
@ -26,8 +26,8 @@ github.com/imdario/mergo v0.3.6
|
||||
golang.org/x/sync 1d60e4601c6fd243af51cc01ddf169918a5407ca
|
||||
|
||||
# buildkit
|
||||
github.com/moby/buildkit 6812dac65e0440bb75affce1fb2175e640edc15d
|
||||
github.com/tonistiigi/fsutil b19464cd1b6a00773b4f2eb7acf9c30426f9df42
|
||||
github.com/moby/buildkit d9f75920678e35090025bb89344c5370e2efc8e7
|
||||
github.com/tonistiigi/fsutil 2862f6bc5ac9b97124e552a5c108230b38a1b0ca
|
||||
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746
|
||||
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
|
||||
github.com/google/shlex 6f45313302b9c56850fc17f99e40caebce98c716
|
||||
@ -37,7 +37,7 @@ github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
|
||||
#get libnetwork packages
|
||||
|
||||
# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy accordingly
|
||||
github.com/docker/libnetwork a79d3687931697244b8e03485bf7b2042f8ec6b6
|
||||
github.com/docker/libnetwork 4725f2163fb214a6312f3beae5991f838ec36326 # bump_18.09 branch
|
||||
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
|
||||
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
|
||||
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
|
||||
@ -47,7 +47,7 @@ github.com/sean-/seed e2103e2c35297fb7e17febb81e49b312087a2372
|
||||
github.com/hashicorp/go-sockaddr 6d291a969b86c4b633730bfc6b8b9d64c3aafed9
|
||||
github.com/hashicorp/go-multierror fcdddc395df1ddf4247c69bd436e84cfa0733f7e
|
||||
github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870
|
||||
github.com/docker/libkv 1d8431073ae03cdaedb198a89722f3aab6d418ef
|
||||
github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b
|
||||
github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25
|
||||
github.com/vishvananda/netlink b2de5d10e38ecce8607e6b438b6d174f389a004e
|
||||
|
||||
@ -59,13 +59,13 @@ github.com/coreos/etcd v3.2.1
|
||||
github.com/coreos/go-semver v0.2.0
|
||||
github.com/ugorji/go f1f1a805ed361a0e078bb537e4ea78cd37dcf065
|
||||
github.com/hashicorp/consul v0.5.2
|
||||
github.com/boltdb/bolt fff57c100f4dea1905678da7e90d92429dff2904
|
||||
github.com/miekg/dns v1.0.7
|
||||
github.com/ishidawataru/sctp 07191f837fedd2f13d1ec7b5f885f0f3ec54b1cb
|
||||
go.etcd.io/bbolt v1.3.1-etcd.8
|
||||
|
||||
# get graph and distribution packages
|
||||
github.com/docker/distribution 83389a148052d74ac602f5f1d62f86ff2f3c4aa5
|
||||
github.com/vbatts/tar-split v0.10.2
|
||||
github.com/vbatts/tar-split v0.11.0
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1
|
||||
|
||||
# get go-zfs packages
|
||||
@ -74,9 +74,13 @@ github.com/pborman/uuid v1.0
|
||||
|
||||
google.golang.org/grpc v1.12.0
|
||||
|
||||
# This does not need to match RUNC_COMMIT as it is used for helper packages but should be newer or equal
|
||||
github.com/opencontainers/runc 20aff4f0488c6d4b8df4d85b4f63f1f704c11abd
|
||||
github.com/opencontainers/runtime-spec d810dbc60d8c5aeeb3d054bd1132fab2121968ce # v1.0.1-43-gd810dbc
|
||||
# The version of runc should match the version that is used by the containerd
|
||||
# version that is used. If you need to update runc, open a pull request in
|
||||
# the containerd project first, and update both after that is merged.
|
||||
# This commit does not need to match RUNC_COMMIT as it is used for helper
|
||||
# packages but should be newer or equal.
|
||||
github.com/opencontainers/runc 96ec2177ae841256168fcf76954f7177af9446eb
|
||||
github.com/opencontainers/runtime-spec 5684b8af48c1ac3b1451fa499724e30e3c20a294 # v1.0.1-49-g5684b8a
|
||||
github.com/opencontainers/image-spec v1.0.1
|
||||
github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
|
||||
|
||||
@ -114,23 +118,24 @@ github.com/googleapis/gax-go v2.0.0
|
||||
google.golang.org/genproto 694d95ba50e67b2e363f3483057db5d4910c18f9
|
||||
|
||||
# containerd
|
||||
github.com/containerd/containerd v1.2.0-beta.2
|
||||
github.com/containerd/containerd 9754871865f7fe2f4e74d43e2fc7ccd237edcbce # v1.2.2
|
||||
github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
|
||||
github.com/containerd/continuity d3c23511c1bf5851696cba83143d9cbcd666869b
|
||||
github.com/containerd/cgroups 5e610833b72089b37d0e615de9a92dfc043757c2
|
||||
github.com/containerd/continuity 004b46473808b3e7a4a3049c20e4376c91eb966d
|
||||
github.com/containerd/cgroups dbea6f2bd41658b84b00417ceefa416b979cbf10
|
||||
github.com/containerd/console c12b1e7919c14469339a5d38f2f8ed9b64a9de23
|
||||
github.com/containerd/go-runc edcf3de1f4971445c42d61f20d506b30612aa031
|
||||
github.com/containerd/cri 0d5cabd006cb5319dc965046067b8432d9fa5ef8 # release/1.2 branch
|
||||
github.com/containerd/go-runc 5a6d9f37cfa36b15efba46dc7ea349fa9b7143c3
|
||||
github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40
|
||||
github.com/containerd/ttrpc 94dde388801693c54f88a6596f713b51a8b30b2d
|
||||
github.com/containerd/ttrpc 2a805f71863501300ae1976d29f0454ae003e85a
|
||||
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef
|
||||
|
||||
# cluster
|
||||
github.com/docker/swarmkit cfa742c8abe6f8e922f6e4e920153c408e7d9c3b
|
||||
github.com/docker/swarmkit c66ed60822d3fc3bf6e17a505ee79014f449ef05 # bump_v18.09 branch
|
||||
github.com/gogo/protobuf v1.0.0
|
||||
github.com/cloudflare/cfssl 1.3.2
|
||||
github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2
|
||||
github.com/google/certificate-transparency-go v1.0.20
|
||||
golang.org/x/crypto a2144134853fc9a27a7b1e3eb4f19f1a76df13c9
|
||||
golang.org/x/crypto 0709b304e793a5edb4a2c0145f281ecdc20838a4
|
||||
golang.org/x/time fbb02b2291d28baffd63558aa44b4b56f178d650
|
||||
github.com/hashicorp/go-memdb cb9a474f84cc5e41b273b20c6927680b2a8776ad
|
||||
github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git
|
||||
@ -143,8 +148,8 @@ github.com/prometheus/client_model fa8ad6fec33561be4280a8f0514318c79d7f6cb6
|
||||
github.com/prometheus/common ebdfc6da46522d58825777cf1f90490a5b1ef1d8
|
||||
github.com/prometheus/procfs abf152e5f3e97f2fafac028d2cc06c1feb87ffa5
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.0
|
||||
github.com/pkg/errors 839d9e913e063e28dfd0e6c7b7512793e0a48be9
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus 6b7015e65d366bf3f19b2b2a000a831940f0f7e0
|
||||
github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d # v0.8.0
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
||||
|
||||
# cli
|
||||
github.com/spf13/cobra v0.0.3
|
||||
@ -155,7 +160,7 @@ github.com/Nvveen/Gotty a8b993ba6abdb0e0c12b0125c603323a71c7790c https://github.
|
||||
# metrics
|
||||
github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18
|
||||
|
||||
github.com/opencontainers/selinux b29023b86e4a69d1b46b7e7b4e2b6fda03f0b9cd
|
||||
github.com/opencontainers/selinux b6fa367ed7f534f9ba25391cc2d467085dbb445a
|
||||
|
||||
|
||||
# archive/tar (for Go 1.10, see https://github.com/golang/go/issues/24787)
|
||||
|
||||
Reference in New Issue
Block a user