Commit graph

36419 commits

Author SHA1 Message Date
Sebastiaan van Stijn
26413ede57
Update containerd runtime 1.2.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-14 04:45:26 +01:00
Yong Tang
0111ee7087
Merge pull request #38717 from thaJeztah/update_containerd_1.2.3
Update containerd to 1.2.3
2019-02-12 15:58:12 -08:00
Tõnis Tiigi
a327428bdb
Merge pull request #38716 from thaJeztah/bump_runc_cve_2019-5736
Update runc to 6635b4f (fix CVE-2019-5736)
2019-02-12 13:51:37 -08:00
Sebastiaan van Stijn
c4763e02d1
Update containerd to 1.2.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-12 14:39:27 +01:00
Sebastiaan van Stijn
f03698b69a
Update runc to 6635b4f (fix CVE-2019-5736)
- Fixes a vulnerability in runc that allows a container escape (CVE-2019-5736)
  6635b4f0c6,
- Includes security fix for `runc run --no-pivot` (`DOCKER_RAMDISK=1`):
  28a697cce3
  (NOTE: the vuln is attackable only when `DOCKER_RAMDISK=1` is set && seccomp is disabled)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-12 14:17:22 +01:00
Tianon Gravi
6800954050
Merge pull request #38677 from tiborvass/fix-validate
hack: no need to git fetch in CI
2019-02-11 07:03:00 -08:00
Akihiro Suda
f18cf23e97
Merge pull request #38692 from Microsoft/jjh/runtime-spec
Vendor opencontainers/runtime-spec 29686dbc
2019-02-11 15:24:42 +09:00
Yong Tang
98dcded647
Merge pull request #38701 from thaJeztah/bump_gorilla_mux
Bump gorilla/mux to 1.7.0 (remove gorilla/context)
2019-02-10 15:13:20 -08:00
Sebastiaan van Stijn
477eeef60c
Bump gorilla/mux to 1.7.0
This release drops support for Go < 1.7, and removes the gorilla/context
dependency (which was needed for older Go versions).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-09 16:23:55 +01:00
Brian Goff
832ce62cb2
Merge pull request #38693 from tiborvass/fix-timeout-bug
hack: Have TIMEOUT take -test.count into account when testing for flakiness
2019-02-08 14:10:36 -08:00
Tibor Vass
42dcfc894a hack: Have TIMEOUT take -test.count into account when testing for flakiness
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-02-08 18:36:31 +00:00
John Howard
9f1b2b7031 Vendor opencontainers/runtime-spec 29686dbc
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-02-07 18:46:38 -08:00
Brian Goff
e063099f91 Completely remove d.NewClient from testing tools
Favor `d.NewClientT` instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-02-07 16:07:02 -08:00
Sebastiaan van Stijn
e6fe7f8f29
Merge pull request #38685 from yongtang/go-vet
Fix go-vet issue
2019-02-07 12:14:44 +01:00
Sebastiaan van Stijn
611b23c1a0
Merge pull request #38580 from andrey-ko/fix-restart
Pass in network IDs during restart
2019-02-07 08:46:16 +01:00
Yong Tang
86312a4732 Fix go-vet issue
This fix fixes the following issue with `go vet`:
```
$ go tool vet cmd/dockerd/daemon.go
cmd/dockerd/daemon.go:163: the cancel function is not used on all paths (possible context leak)
cmd/dockerd/daemon.go:167: this return statement may be reached without using the cancel var defined on line 163
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-02-06 23:30:28 +00:00
Brian Goff
c63a2b7619
Merge pull request #38678 from Microsoft/jjh/lcowpushspace
LCOW: Don't fail image push when files have spaces
2019-02-06 15:25:39 -08:00
Vincent Demeester
f8e29fdd68
Merge pull request #38679 from AkihiroSuda/rootlesskit-030alpha1
bump up rootlesskit (fix armv7 compilation failure)
2019-02-06 09:40:31 +01:00
Brian Goff
6501a8ff90
Merge pull request #38684 from tonistiigi/vpnkit-restore
hack: restore bundling vpnkit on amd64
2019-02-06 00:06:04 -08:00
Yong Tang
61da822eeb
Merge pull request #38683 from tonistiigi/ptrace-seccomp-update
seccomp: review update for ptrace support
2019-02-06 11:41:45 +08:00
Yong Tang
2c79d3520a
Merge pull request #38681 from Microsoft/jjh/hcsshim086
Vendor Microsoft/hcsshim @ v0.8.6
2019-02-06 11:41:34 +08:00
Tonis Tiigi
20e8572a4c hack: restore bundling vpnkit on amd64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-05 18:21:30 -08:00
Brian Goff
f091a8dd62
Merge pull request #38680 from Microsoft/jjh/dumpduterr
Windows CI: Dump possible panic log
2019-02-05 15:21:39 -08:00
Tonis Tiigi
e76380b67b seccomp: review update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-05 12:02:41 -08:00
John Howard
07742515fb Vendor Microsoft/hcsshim @ v0.8.6
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-02-05 09:52:31 -08:00
John Howard
bc80e8df3e Windows CI: Dump possible panic log
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-02-05 09:17:40 -08:00
Akihiro Suda
bcc4c03092 bump up rootlesskit (fix armv7 compilation failure)
https://github.com/rootless-containers/rootlesskit/issues/41

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-05 23:02:32 +09:00
Justin Cormack
1603af9689
Merge pull request #38137 from tonistiigi/seccomp-ptrace
seccomp: allow ptrace(2) for 4.8+ kernels
2019-02-05 13:47:43 +00:00
Tibor Vass
feb70fd5c9 hack: no need to git fetch in CI
CIs are assumed to do a git fetch and git merge before running tests.
Therefore, no need for a git fetch inside our validate scripts in CI.

If VALIDATE_ORIGIN_BRANCH is set, then git fetch is skipped and
VALIDATE_ORIGIN_BRANCH is used in validate scripts.

Otherwise, behavior is unchanged.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-02-05 02:54:50 +00:00
Sebastiaan van Stijn
20383d504b Add support for using Configs as CredentialSpecs in services
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-04 15:29:33 -06:00
Drew Erny
04995fa7c7 Add CredentialSpec from configs support
Signed-off-by: Drew Erny <drew.erny@docker.com>
2019-02-04 14:52:01 -06:00
John Howard
2c8522b0a3 LCOW:Enable image push when files have spaces
Signed-off-by: John Howard <jhoward@microsoft.com>

Reported internally at Microsoft through VSO#19696554.
Using the solution from https://groups.google.com/forum/#!topic/Golang-Nuts/DpldsmrhPio
to quote file name and escape single quotes (https://play.golang.org/p/ntk8EEGjfk)

Simple repro steps are something like:

On an ubuntu box run something like
```
docker run -d --rm -p 5000:5000 registry:latest
hostname-I to get the ip address
```

On Windows start the daemon adding `--insecure-registry 10.124.186.18:5000`
(or whatever the IP address from above was)

```
docker run -it alpine sh
/ # echo bar > "with space"​
/ # echo foo > 'single quote space'
/ # exit

docker ps -a
docker commit <containerid>
(note the first few of the image id)
docker tag <first few> 10.124.186.18:5000/test
docker push 10.124.186.18:5000/test
```

Resulting error when pushing the image:

```
PS E:\docker\build\19696554> docker push 10.124.186.18:5000/simpletest2
The push refers to repository [10.124.186.18:5000/simpletest2]​
d328d7f5f277: Pushing [==================================================>]  74.24kB/74.24kB​
503e53e365f3: Layer already exists​
svm.runProcess: command cat /tmp/d59/single quote space failed with exit code 1​
PS E:\docker\build\19696554>
```

After this change pushing the image:
```
PS E:\docker\build\19696554> docker push 10.124.186.18:5000/simpletest2
The push refers to repository [10.124.186.18:5000/simpletest2]
d328d7f5f277: Pushing [==================================================>]  74.24kB/74.24kB
503e53e365f3: Layer already exists
latest: digest: sha256:b9828a2d2a3d2421a4c342f48b7936714b3d8409dc32c103da5f3fb13b54bdbf size: 735
PS E:\docker\build\19696554>
```
2019-02-04 12:07:58 -08:00
Vincent Demeester
e7a9a7cdbc
Merge pull request #35355 from x1022as/unless-stop
fix unless-stopped unexpected behavior
2019-02-04 10:28:23 +01:00
Vincent Demeester
8e06006717
Merge pull request #37296 from yusuf-gunaydin/lcow_limits
Implemented memory and CPU limits for LCOW.
2019-02-04 10:28:03 +01:00
Sebastiaan van Stijn
53460047e4
Refactor pkg/sysinfo
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-04 00:38:12 +01:00
Sebastiaan van Stijn
93d994e29c
Merge pull request #38050 from AkihiroSuda/rootless
Allow running dockerd as a non-root user (Rootless mode)
2019-02-03 23:27:03 +01:00
Akihiro Suda
ec87479b7e allow running dockerd in an unprivileged user namespace (rootless mode)
Please refer to `docs/rootless.md`.

TLDR:
 * Make sure `/etc/subuid` and `/etc/subgid` contain the entry for you
 * `dockerd-rootless.sh --experimental`
 * `docker -H unix://$XDG_RUNTIME_DIR/docker.sock run ...`

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-04 00:24:27 +09:00
Yusuf Tarık Günaydın
86bd2e9864 Implemented memory and CPU limits for LCOW.
Signed-off-by: Yusuf Tarık Günaydın <yusuf_tarik@hotmail.com>
2019-02-02 13:02:23 +03:00
Brian Goff
50e63adf30
Merge pull request #38574 from StefanScherer/improve-no-matching-manifest-error
Improve 'no matching manifest' error message
2019-02-01 21:03:37 -08:00
Tibor Vass
b17188be39
Merge pull request #38673 from thaJeztah/fix_proto_capitalization
Bump SwarmKit to fix proto capitalization
2019-02-01 15:57:16 -08:00
Deng Guangxing
8e293be4ba fix unless-stopped unexpected behavior
fix https://github.com/moby/moby/issues/35304.

Signed-off-by: dengguangxing <dengguangxing@huawei.com>
2019-02-01 15:03:17 -08:00
Sebastiaan van Stijn
b462bba1b0
Bump SwarmKit to fix proto capitalization
This brings in a single fix; swarmkit#2813 where a field inadvertedly
used incorrect capitalization.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-01 22:22:37 +01:00
Tianon Gravi
d440fea460
Merge pull request #38655 from thaJeztah/override_validate
Allow overriding repository and branch in validate scripts
2019-02-01 08:43:06 -08:00
Sebastiaan van Stijn
acf08532a7
Merge pull request #38520 from thaJeztah/fix_update_status_check
Bump SwarmKit to 1a0ebd43b2d156983a695f90e56f4ecba6ced902
2019-02-01 15:47:34 +01:00
Sebastiaan van Stijn
94429d4078
Remove use of serviceSpecIsUpdated
It's no longer needed with the latest swarmkit changes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-01 01:35:41 +01:00
Sebastiaan van Stijn
0e60e48134
Bump swarmkit to 1a0ebd43b2d156983a695f90e56f4ecba6ced902
Full diff: 8af8c420f4...1a0ebd43b2

relevant changes:

- swarmkit#2771 Allow using Configs as CredentialSpecs
- swarmkit#2804 Make Service.UpdateStatus non-ambiguous
- swarmkit#2805 Refactor condition in restart supervisor
- swarmkit#2780 api: add BindOptions.NonRecursive
  - related to moby#38003
- swarmkit#2790 Fix possible panic if NetworkConfig is nil
- swarmkit#2797 Include old error-message for backward compatibility
  - related to swarmkit#2779 / moby#38140 / moby#38142

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-01 01:35:12 +01:00
Yong Tang
87903f2fb5
Merge pull request #38609 from kwojcicki/enhancement/38518-docker_info_builder_version
Adding builder version
2019-02-01 07:04:11 +08:00
Sebastiaan van Stijn
8a43b7bb99
Merge pull request #38570 from thaJeztah/keep_your_head_up
Add HEAD support for /_ping endpoint
2019-01-31 21:54:58 +01:00
Sebastiaan van Stijn
fc4a40b510
Merge pull request #38658 from thaJeztah/use_stable_cli
Use 17.06 stable channel for CLI used in CI
2019-01-31 18:58:55 +01:00
Sebastiaan van Stijn
7e7e100be0
Add HEAD support for /_ping endpoint
Monitoring systems and load balancers are usually configured to use HEAD
requests for health monitoring. The /_ping endpoint currently does not
support this type of request, which means that those systems have fallback
to GET requests.

This patch adds support for HEAD requests on the /_ping endpoint.

Although optional, this patch also returns `Content-Type` and `Content-Length`
headers in case of a HEAD request; Refering to RFC 7231, section 4.3.2:

    The HEAD method is identical to GET except that the server MUST NOT
    send a message body in the response (i.e., the response terminates at
    the end of the header section).  The server SHOULD send the same
    header fields in response to a HEAD request as it would have sent if
    the request had been a GET, except that the payload header fields
    (Section 3.3) MAY be omitted.  This method can be used for obtaining
    metadata about the selected representation without transferring the
    representation data and is often used for testing hypertext links for
    validity, accessibility, and recent modification.

    A payload within a HEAD request message has no defined semantics;
    sending a payload body on a HEAD request might cause some existing
    implementations to reject the request.

    The response to a HEAD request is cacheable; a cache MAY use it to
    satisfy subsequent HEAD requests unless otherwise indicated by the
    Cache-Control header field (Section 5.2 of [RFC7234]).  A HEAD
    response might also have an effect on previously cached responses to
    GET; see Section 4.3.5 of [RFC7234].

With this patch applied, either `GET` or `HEAD` requests work; the only
difference is that the body is empty in case of a `HEAD` request;

    curl -i --unix-socket /var/run/docker.sock http://localhost/_ping
    HTTP/1.1 200 OK
    Api-Version: 1.40
    Cache-Control: no-cache, no-store, must-revalidate
    Docker-Experimental: false
    Ostype: linux
    Pragma: no-cache
    Server: Docker/dev (linux)
    Date: Mon, 14 Jan 2019 12:35:16 GMT
    Content-Length: 2
    Content-Type: text/plain; charset=utf-8

    OK

    curl --head -i --unix-socket /var/run/docker.sock http://localhost/_ping
    HTTP/1.1 200 OK
    Api-Version: 1.40
    Cache-Control: no-cache, no-store, must-revalidate
    Content-Length: 0
    Content-Type: text/plain; charset=utf-8
    Docker-Experimental: false
    Ostype: linux
    Pragma: no-cache
    Server: Docker/dev (linux)
    Date: Mon, 14 Jan 2019 12:34:15 GMT

The client is also updated to use `HEAD` by default, but fallback to `GET`
if the daemon does not support this method.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-31 18:18:24 +01:00