Compare commits

..

2777 Commits

Author SHA1 Message Date
0950f0f1fa Merge pull request #617 from andrewhsu/1809beta1
[18.09] bump ver 18.09.9-beta1
2019-08-16 13:19:44 -07:00
abda7e1227 bump ver 18.09.9-beta1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-08-15 22:16:47 +00:00
6e21b66959 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-15 05:25:17 +00:00
f01d171480 Merge pull request #320 from dani-docker/18.09-bk-3945401
[18.09 backport] do not stop health check before sending signal
Upstream-commit: 808ed023b27b0c6b0cefdbb2024735d7fb656a27
Component: engine
2019-08-14 18:35:13 -07:00
15819d7be9 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-08-14 21:24:02 +00:00
fb5f4260fc Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-14 21:23:52 +00:00
9e36dcdcdf Merge component 'cli' from git@github.com:docker/cli 18.09 2019-08-14 21:00:45 +00:00
fc7f115476 Skip TestHealthKillContainer on Windows
This test is failing on Windows currently:

```
11:59:47 --- FAIL: TestHealthKillContainer (8.12s)
11:59:47     health_test.go:57: assertion failed: error is not nil: Error response from daemon: Invalid signal: SIGUSR1
``

That test was added recently in https://github.com/moby/moby/pull/39454, but
rewritten in a commit in the same PR:
f8aef6a92f

In that rewrite, there were some changes:

- originally it was skipped on Windows, but the rewritten test doesn't have that skip:

    ```go
    testRequires(c, DaemonIsLinux) // busybox doesn't work on Windows
    ```

- the original test used `SIGINT`, but the new one uses `SIGUSR1`

Analysis:

- The Error bubbles up from: 8e610b2b55/pkg/signal/signal.go (L29-L44)
- Interestingly; `ContainerKill` should validate if a signal is valid for the given platform, but somehow we don't hit that part; f1b5612f20/daemon/kill.go (L40-L48)
- Windows only looks to support 2 signals currently 8e610b2b55/pkg/signal/signal_windows.go (L17-L26)
- Upstream Golang looks to define `SIGINT` as well; 77f9b2728e/src/runtime/defs_windows.go (L44)
- This looks like the current list of Signals upstream in Go; 3b58ed4ad3/windows/types_windows.go (L52-L67)

```go
const (
	// More invented values for signals
	SIGHUP  = Signal(0x1)
	SIGINT  = Signal(0x2)
	SIGQUIT = Signal(0x3)
	SIGILL  = Signal(0x4)
	SIGTRAP = Signal(0x5)
	SIGABRT = Signal(0x6)
	SIGBUS  = Signal(0x7)
	SIGFPE  = Signal(0x8)
	SIGKILL = Signal(0x9)
	SIGSEGV = Signal(0xb)
	SIGPIPE = Signal(0xd)
	SIGALRM = Signal(0xe)
	SIGTERM = Signal(0xf)
)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit eeaa0b30d47e6b9dac8d8ea2ced6d5ce44c24463)
Signed-off-by: Dani Louca <dani.louca@docker.com>
Upstream-commit: f481d4c02366093b337e9aebfbbf23b1ff3968fe
Component: engine
2019-08-14 16:44:11 -04:00
288b1eb562 Fixing integration test
Signed-off-by: Dani Louca <dani.louca@docker.com>
Upstream-commit: 614daf117112e8c9576967764281cc6fe617bbb2
Component: engine
2019-08-14 16:44:11 -04:00
7bdaea25a0 Move kill health test to integration
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit f8aef6a92f5961f2615ada37b7d108774a0821e0)
Signed-off-by: Dani Louca <dani.louca@docker.com>
Upstream-commit: 4cad9dd9a496bc186d8990d0135145fb3234ccc1
Component: engine
2019-08-14 16:44:11 -04:00
a5049e1961 do not stop health check before sending signal
Docker daemon always stops healthcheck before sending signal to a
container now. However, when we use "docker kill" to send signals
other than SIGTERM or SIGKILL to a container, such as SIGINT,
daemon still stops container health check though container process
handles the signal normally and continues to work.

Signed-off-by: Ruilin Li <liruilin4@huawei.com>
(cherry picked from commit da574f93432e600fda561da5e6983e7f69b364a9)
Signed-off-by: Dani Louca <dani.louca@docker.com>
Upstream-commit: afee55c3740644be40882d883d8287782f2bc6c2
Component: engine
2019-08-14 16:44:11 -04:00
9be56f00bc Merge pull request #372 from thaJeztah/18.09_bump_golang_1.11.13
Merged with https://github.com/seemethere/unir
Upstream-commit: ae78e685cc2ac288933544f59872aace68a425c9
Component: packaging
2019-08-14 19:19:15 +00:00
d5def67d68 Merge pull request #2045 from thaJeztah/18.09_bump_golang_1.11.13
[18.09] Bump golang 1.11.13 (CVE-2019-9512, CVE-2019-9514)
Upstream-commit: 1752eb3626
Component: cli
2019-08-14 11:54:37 -07:00
d0f7c1a7ee Merge pull request #323 from thaJeztah/18.09_bump_golang_1.11.13
[18.09] Bump golang 1.11.13 (CVE-2019-9512, CVE-2019-9514)
Upstream-commit: c8c12d8b6a9efd01de9ea5b98df3061c3c97fd39
Component: engine
2019-08-14 11:54:09 -07:00
673a03c73a Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-14 17:24:01 +00:00
7dcd3db960 Merge pull request #324 from thaJeztah/18.09_backport_harden_TestClientWithRequestTimeout
[18.09 backport] Harden TestClientWithRequestTimeout
Upstream-commit: c88e4f77aaefa1278da5867845e5e9a60b73370f
Component: engine
2019-08-14 08:48:55 -07:00
76709cc970 Harden TestClientWithRequestTimeout
DeadlineExceeded now implements a TimeOut() function,
since dc4427f372

Check for this interface, to prevent possibly incorrect failures;

```
00:16:41 --- FAIL: TestClientWithRequestTimeout (0.00s)
00:16:41     client_test.go:259: assertion failed:
00:16:41         --- context.DeadlineExceeded
00:16:41         +++ err
00:16:41         :
00:16:41         	-: context.deadlineExceededError{}
00:16:41         	+: &net.OpError{Op: "dial", Net: "tcp", Addr: s"127.0.0.1:49294", Err: &poll.TimeoutError{}}
00:16:41
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7816c532374ad9461b78b2166922bcd21a3405f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 43978cbc7da889e5ea0513ce98aa8f3acaa907ba
Component: engine
2019-08-14 15:21:04 +02:00
3eb1c8ac82 Adjust tests for changes in Go 1.12.8 / 1.11.13
For now, just verifying that an error is returned, but not checking the
error message itself, because those are not under our control, and may
change with different Go versions.

```
=== Failed
=== FAIL: opts TestParseDockerDaemonHost (0.00s)
    hosts_test.go:87: tcp tcp:a.b.c.d address expected error "Invalid bind address format: tcp:a.b.c.d" return, got "parse tcp://tcp:a.b.c.d: invalid port \":a.b.c.d\" after host" and addr
    hosts_test.go:87: tcp tcp:a.b.c.d/path address expected error "Invalid bind address format: tcp:a.b.c.d/path" return, got "parse tcp://tcp:a.b.c.d/path: invalid port \":a.b.c.d\" after host" and addr

=== FAIL: opts TestParseTCP (0.00s)
    hosts_test.go:129: tcp tcp:a.b.c.d address expected error Invalid bind address format: tcp:a.b.c.d return, got parse tcp://tcp:a.b.c.d: invalid port ":a.b.c.d" after host and addr
    hosts_test.go:129: tcp tcp:a.b.c.d/path address expected error Invalid bind address format: tcp:a.b.c.d/path return, got parse tcp://tcp:a.b.c.d/path: invalid port ":a.b.c.d" after host and addr
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit de1523d221)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: feb68f9055
Component: cli
2019-08-14 10:21:33 +02:00
4443ce1c21 Bump golang 1.11.13 (CVE-2019-9512, CVE-2019-9514)
go1.11.13 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.11.13 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.13

- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
  net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
  clients could be remotely made to allocate an unlimited amount of memory, until the program
  crashes. Servers will now close connections if the send queue accumulates too many control
  messages.
  The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
  Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
  This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
  net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
  suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
  in certain applications. Note that URLs with invalid, not numeric ports will now return an error
  from url.Parse.
  The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
  Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
  and reporting this issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9a7c1a1e5f0858ac54f1c7577c4fca8665f70496
Component: packaging
2019-08-14 03:22:12 +02:00
4a2e3c4a9b Bump golang 1.11.13 (CVE-2019-9512, CVE-2019-9514)
go1.11.13 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.11.13 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.13

- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
  net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
  clients could be remotely made to allocate an unlimited amount of memory, until the program
  crashes. Servers will now close connections if the send queue accumulates too many control
  messages.
  The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
  Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
  This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
  net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
  suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
  in certain applications. Note that URLs with invalid, not numeric ports will now return an error
  from url.Parse.
  The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
  Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
  and reporting this issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aed09dc7eb
Component: cli
2019-08-14 03:07:24 +02:00
52a6588aca Adjust tests for changes in Go 1.12.8 / 1.11.13
```
00:38:11 === Failed
00:38:11 === FAIL: opts TestParseDockerDaemonHost (0.00s)
00:38:11     hosts_test.go:87: tcp tcp:a.b.c.d address expected error "Invalid bind address format: tcp:a.b.c.d" return, got "parse tcp://tcp:a.b.c.d: invalid port \":a.b.c.d\" after host" and addr
00:38:11     hosts_test.go:87: tcp tcp:a.b.c.d/path address expected error "Invalid bind address format: tcp:a.b.c.d/path" return, got "parse tcp://tcp:a.b.c.d/path: invalid port \":a.b.c.d\" after host" and addr
00:38:11
00:38:11 === FAIL: opts TestParseTCP (0.00s)
00:38:11     hosts_test.go:129: tcp tcp:a.b.c.d address expected error Invalid bind address format: tcp:a.b.c.d return, got parse tcp://tcp:a.b.c.d: invalid port ":a.b.c.d" after host and addr
00:38:11     hosts_test.go:129: tcp tcp:a.b.c.d/path address expected error Invalid bind address format: tcp:a.b.c.d/path return, got parse tcp://tcp:a.b.c.d/path: invalid port ":a.b.c.d" after host and addr
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 683766613a8c1dca8f95b19ddb7e083bb3aef266)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 64c958a587ff3835d1bacc573e9db3d400dbb0ad
Component: engine
2019-08-14 02:53:27 +02:00
c38c41a97d Bump golang 1.11.13 (CVE-2019-9512, CVE-2019-9514)
go1.11.13 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.11.13 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.13

- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
  net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
  clients could be remotely made to allocate an unlimited amount of memory, until the program
  crashes. Servers will now close connections if the send queue accumulates too many control
  messages.
  The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
  Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
  This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
  net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
  suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
  in certain applications. Note that URLs with invalid, not numeric ports will now return an error
  from url.Parse.
  The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
  Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
  and reporting this issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d122605850fca5df1ff8babe7ee9f1dfed2a335b
Component: engine
2019-08-14 02:39:26 +02:00
a19edf5eec Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-13 21:23:33 +00:00
1032eb22c6 Merge pull request #318 from kolyshkin/18.09-journald
[18.09] backport journald reading fixes (ENGCORE-941)
Upstream-commit: 9348f454fc4a5402d8314122c6e914b1b22ad0ea
Component: engine
2019-08-13 11:48:18 -07:00
fa72affe21 journald/read: fix/unify errors
1. Use "in-place" variables for if statements to limit their scope to
   the respectful `if` block.

2. Report the error returned from sd_journal_* by using CErr().

3. Use errors.New() instead of fmt.Errorf().

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 20a0e58a794cfb9b1a1f757d222248e22555f7f0)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: b32bc11a00a82584138ae78e083930918dcb0b36
Component: engine
2019-08-09 16:42:14 -07:00
9cbc290f81 journald: fix for --tail 0
From the first glance, `docker logs --tail 0` does not make sense,
as it is supposed to produce no output, but `tail -n 0` from GNU
coreutils is working like that, plus there is even a test case
(`TestLogsTail` in integration-cli/docker_cli_logs_test.go).

Now, something like `docker logs --follow --tail 0` makes total
sense, so let's make it work.

(NOTE if --tail is not used, config.Tail is set to -1)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit dd4bfe30a8ac1b31630310090dc36ae3d9253444)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 4427414624c56c459431d3dbbde81f3396cb02b0
Component: engine
2019-08-09 16:42:08 -07:00
4cf778b28f journald/read: avoid piling up open files
If we take a long time to process log messages, and during that time
journal file rotation occurs, the journald client library will keep
those rotated files open until sd_journal_process() is called.

By periodically calling sd_journal_process() during the processing
loop we shrink the window of time a client instance has open file
descriptors for rotated (deleted) journal files.

This code is modelled after that of journalctl [1]; the above explanation
as well as the value of 1024 is taken from there.

[v2: fix CErr() argument]

[1] https://github.com/systemd/systemd/blob/dc16327c48d/src/journal/journalctl.c#L2676
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b73fb8fd5d521081c92b5c2cce334c21b2e0ff5f)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 48160719f2c5734b513aec7cedbbca0c72f4a085
Component: engine
2019-08-09 16:42:05 -07:00
9928ca93a8 journald/read: simplify/fix followJournal()
TL;DR: simplify the code, fix --follow hanging indefinitely

Do the following to simplify the followJournal() code:

1. Use Go-native select instead of C-native polling.

2. Use Watch{Producer,Consumer}Gone(), eliminating the need
to have journald.closed variable, and an extra goroutine.

3. Use sd_journal_wait(). In the words of its own man page:

> A synchronous alternative for using sd_journal_get_fd(),
> sd_journal_get_events(), sd_journal_get_timeout() and
> sd_journal_process() is sd_journal_wait().

Unfortunately, the logic is still not as simple as it
could be; the reason being, once the container has exited,
journald might still be writing some logs from its internal
buffers onto journal file(s), and there is no way to
figure out whether it's done so we are guaranteed to
read all of it back. This bug can be reproduced with
something like

> $ ID=$(docker run -d busybox seq 1 150000); docker logs --follow $ID
> ...
> 128123
> $

(The last expected output line should be `150000`).

To avoid exiting from followJournal() early, add the
following logic: once the container is gone, keep trying
to drain the journal until there's no new data for at
least `waitTimeout` time period.

Should fix https://github.com/docker/for-linux/issues/575

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f091febc942859ffbc881f3a3aa327366603ae65)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: be568f93432ed1399a0aacca5fbd2c1046ccbc85
Component: engine
2019-08-09 16:42:01 -07:00
5451d79b29 Call sd_journal_get_fd() earlier, only if needed
1. The journald client library initializes inotify watch(es)
during the first call to sd_journal_get_fd(), and it make sense
to open it earlier in order to not lose any journal file rotation
events.

2. It only makes sense to call this if we're going to use it
later on -- so add a check for config.Follow.

3. Remove the redundant call to sd_journal_get_fd().

NOTE that any subsequent calls to sd_journal_get_fd() return
the same file descriptor, so there's no real need to save it
for later use in wait_for_data_cancelable().

Based on earlier patch by Nalin Dahyabhai <nalin@redhat.com>.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 981c01665bcb2c9fc5e555c5b976995f31c2a6b4)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 349e199eab5337f03b442f38720293143e1b1fca
Component: engine
2019-08-09 16:42:01 -07:00
f41cfd8115 journald/read: avoid being blocked on send
In case the LogConsumer is gone, the code that sends the message can
stuck forever. Wrap the code in select case, as all other loggers do.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 79039720c8b7352691350bd56be3cc226d67f205)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 56a8a516127a2630c3a68ab31c416f223b91e9df
Component: engine
2019-08-09 16:41:55 -07:00
84d802ab7f journald/read: simplify walking backwards
In case Tail=N parameter is requested, we need to show N lines.
It does not make sense to walk backwards one by one if we can
do it at once. Now, if Since=T is also provided, make sure we
haven't jumped too far (before T), and if we did, move forward.

The primary motivation for this was to make the code simpler.

This also fixes a tiny bug in the "since" implementation.

Before this commit:
> $ docker logs -t --tail=6000 --since="2019-03-10T03:54:25.00" $ID | head
> 2019-03-10T03:54:24.999821000Z 95981

After:
> $ docker logs -t --tail=6000 --since="2019-03-10T03:54:25.00" $ID | head
> 2019-03-10T03:54:25.000013000Z 95982

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ff3cd167ea4d089b7695a263ba2fc4caa0a0750c)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 2a124db7da440f1efd4c2957320d8b25d9d9ce36
Component: engine
2019-08-09 16:41:49 -07:00
6cf4b69ae9 journald/read: simplify code
Minor code simplification.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit e8f6166791c097deb15c39f8dddf6f97be65b224)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 1d336dc53bd7bf5941596ffeb253d102de609a51
Component: engine
2019-08-09 16:41:49 -07:00
baee58e4ef Small journal cleanup
Clean up a deferred function call in the journal reading logic.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
(cherry picked from commit 1ada3e85bf89201910c28f2ff6892c00cee0f137)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: e700930ca521d0c004b6a3ed8bdd35a2d538aa15
Component: engine
2019-08-09 16:41:49 -07:00
ea64a5cc52 daemon/logger/journald: simplify readers field
As in other similar drivers (jsonlog, local), use a set
(i.e. `map[whatever]struct{}`), making the code simpler.

While at it, make sure we remove the reader from the set
after calling `ProducerGone()` on it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b2b169f13f681cd0d591ccb06d6cfff97933db77)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: fe85c72a2eac4cbf249d2c4c754684bb447eefdd
Component: engine
2019-08-09 16:41:45 -07:00
fe6fcc100e Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-09 06:19:04 +00:00
66137d693e Merge pull request #292 from thaJeztah/18.09_backport_fix_more_grpc_sizes
[18.09 backport] Fix more grpc list message sizes
Upstream-commit: ba48878e960ff906e51353d094a5a0eb12517740
Component: engine
2019-08-08 22:53:18 -07:00
60537190f7 Merge pull request #307 from thaJeztah/18.09_bump_swarmkit
[18.09] bump swarmkit to 142a73731c850daf24d32001aa2358b6ffe36eab (bump_v18.09)
Upstream-commit: af1b34f4fcc2f409207b04459aed4403c6408293
Component: engine
2019-08-08 22:53:05 -07:00
b2aab70f62 Merge branch '18.09' of github.com:docker/docker-ce into 18.09 2019-08-08 21:23:40 +00:00
c377d43c10 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-08 21:23:29 +00:00
620ac32710 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-08 21:03:17 +00:00
e884c7277d Merge pull request #295 from thaJeztah/18.09_backport_chroot_unsupported
[18.09 backport] Add realChroot for non linux/windows
Upstream-commit: 09431f90c89781b1a8051b1cbad563a821f470cc
Component: engine
2019-08-08 13:02:33 -07:00
2cf3e1d4d8 Add realChroot for non linux/windows
3029e765e241ea2b5249868705dbf9095bc4d529 broke compilation on
non-Linux/Windows systems.
This change fixes that.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 34d5b8867fe83403a6998d043a32a49e087f2477)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d0808b92aec7ff1b0e790625e2e6518eb8c014a0
Component: engine
2019-08-08 18:16:28 +02:00
b306313e71 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-08-08 05:02:47 +00:00
66b09eef75 Fix more grpc list message sizes
There are a few more places, apparently, that List operations against
Swarm exist, besides just in the List methods. This increases the max
received message size in those places.

Signed-off-by: Drew Erny <drew.erny@docker.com>
(cherry picked from commit a84a78e9767d82abd4744dad9ce4fb3f64141a8f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 41da428d065ab15fd2d8aba1fbd0d0056136a43b
Component: engine
2019-08-08 04:14:12 +02:00
bf0a90a741 Merge pull request #1984 from thaJeztah/18.09_backport_bump_credential_helpers
[18.09 backport] bump docker-credential-helpers v0.6.3
Upstream-commit: f3af74c18c
Component: cli
2019-08-08 04:02:26 +02:00
4c06d0c561 bump docker-credential-helpers v0.6.3
full diff: https://github.com/docker/docker-credential-helpers/compare/v0.6.2...v0.6.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 64f0ae4252)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ea2b474196
Component: cli
2019-08-08 03:41:34 +02:00
b4a6e45a34 bump docker-credential-helpers v0.6.2
full diff: 5241b46610...8a9f93a99f

includes:

- docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err)
- docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized
  - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command
- docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain
- docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f6a4c76fbb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 24dcc56123
Component: cli
2019-08-08 03:41:31 +02:00
cf72c3cbc1 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-08 01:23:20 +00:00
18c65b780b bump swarmkit to 142a73731c850daf24d32001aa2358b6ffe36eab (bump_v18.09)
full diff: 19e791fd6d...142a73731c

included:

- docker/swarmkit#2872 [19.03 backport] Only update non-terminal tasks on node removal
  - backport of docker/swarmkit#2867 Only update non-terminal tasks on node removal

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7fcfdbaab6d8c6a2d55ad7b72a851c5e92b360ac
Component: engine
2019-08-08 03:10:03 +02:00
de55a58445 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-08-08 01:00:41 +00:00
5f64ad11cc Merge pull request #2021 from thaJeztah/18.09_backport_fix_e2e
[18.09 backport] Disable TLS for e2e docker-in-docker daemon
Upstream-commit: 31c078b66d
Component: cli
2019-08-07 17:29:10 -07:00
33b4c4329e Merge pull request #308 from thaJeztah/18.09_backport_prevent_network_attach_panic
[18.09 backport] Prevent panic on network attach
Upstream-commit: f9bf841ff59e163e19182468b80d6d84736afdc2
Component: engine
2019-08-08 01:22:53 +02:00
1cd70cd7b6 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-08-07 21:23:09 +00:00
b3a954110b Merge pull request #302 from kolyshkin/18.09-go-1.11.12
[18.09] Bump Go to  1.11.12
Upstream-commit: 3618280391a523ec762492a0c8cb58e6eae8867f
Component: engine
2019-08-07 14:12:56 -07:00
4b562b93fe Prevent panic on network attach
In situations where `container.NetworkSettings` was not nil, but
`container.NetworkSettings.Networks` was, a panic could occur:

```
2019-06-10 15:26:50.548309 I | http: panic serving @: assignment to entry in nil map
goroutine 1376 [running]:
net/http.(*conn).serve.func1(0xc4211068c0)
	/usr/local/go/src/net/http/server.go:1726 +0xd2
panic(0x558939d7e1e0, 0x55893a0c4410)
	/usr/local/go/src/runtime/panic.go:502 +0x22d
github.com/docker/docker/daemon.(*Daemon).updateNetworkSettings(0xc42090c5a0, 0xc420fb6fc0, 0x55893a101140, 0xc4210e0540, 0xc42112aa80, 0xc4217d77a0, 0x0)
	/go/src/github.com/docker/docker/daemon/container_operations.go:275 +0x40e
github.com/docker/docker/daemon.(*Daemon).updateNetworkConfig(0xc42090c5a0, 0xc420fb6fc0, 0x55893a101140, 0xc4210e0540, 0xc42112aa80, 0x55893a101101, 0xc4210e0540, 0x0)
	/go/src/github.com/docker/docker/daemon/container_operations.go:683 +0x219
github.com/docker/docker/daemon.(*Daemon).connectToNetwork(0xc42090c5a0, 0xc420fb6fc0, 0xc420e8290f, 0x40, 0xc42112aa80, 0x558937eabd01, 0x0, 0x0)
	/go/src/github.com/docker/docker/daemon/container_operations.go:728 +0x1cb
github.com/docker/docker/daemon.(*Daemon).ConnectToNetwork(0xc42090c5a0, 0xc420fb6fc0, 0xc420e8290f, 0x40, 0xc42112aa80, 0x0, 0x0)
	/go/src/github.com/docker/docker/daemon/container_operations.go:1046 +0x2b3
github.com/docker/docker/daemon.(*Daemon).ConnectContainerToNetwork(0xc42090c5a0, 0xc4214ca580, 0x40, 0xc420e8290f, 0x40, 0xc42112aa80, 0x2, 0xe600000000000001)
	/go/src/github.com/docker/docker/daemon/network.go:450 +0xa1
github.com/docker/docker/api/server/router/network.(*networkRouter).postNetworkConnect(0xc42121bbc0, 0x55893a0edee0, 0xc420de7cb0, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600, 0xc420de7980, 0x5589394707cc, 0x5)
	/go/src/github.com/docker/docker/api/server/router/network/network_routes.go:278 +0x330
github.com/docker/docker/api/server/router/network.(*networkRouter).(github.com/docker/docker/api/server/router/network.postNetworkConnect)-fm(0x55893a0edee0, 0xc420de7cb0, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600, 0xc420de7980, 0x558937fd89dc, 0x558939f2cec0)
	/go/src/github.com/docker/docker/api/server/router/network/network.go:37 +0x6b
github.com/docker/docker/api/server/middleware.ExperimentalMiddleware.WrapHandler.func1(0x55893a0edee0, 0xc420de7cb0, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600, 0xc420de7980, 0x55893a0edee0, 0xc420de7cb0)
	/go/src/github.com/docker/docker/api/server/middleware/experimental.go:26 +0xda
github.com/docker/docker/api/server/middleware.VersionMiddleware.WrapHandler.func1(0x55893a0edee0, 0xc420de7a70, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600, 0xc420de7980, 0x0, 0x0)
	/go/src/github.com/docker/docker/api/server/middleware/version.go:62 +0x401
github.com/docker/docker/pkg/authorization.(*Middleware).WrapHandler.func1(0x55893a0edee0, 0xc420de7a70, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600, 0xc420de7980, 0x0, 0x558939640868)
	/go/src/github.com/docker/docker/pkg/authorization/middleware.go:59 +0x7ab
github.com/docker/docker/api/server/middleware.DebugRequestMiddleware.func1(0x55893a0edee0, 0xc420de7a70, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600, 0xc420de7980, 0x55893a0edee0, 0xc420de7a70)
	/go/src/github.com/docker/docker/api/server/middleware/debug.go:53 +0x4b8
github.com/docker/docker/api/server.(*Server).makeHTTPHandler.func1(0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600)
	/go/src/github.com/docker/docker/api/server/server.go:141 +0x19a
net/http.HandlerFunc.ServeHTTP(0xc420e0c0e0, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600)
	/usr/local/go/src/net/http/server.go:1947 +0x46
github.com/docker/docker/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc420ce5950, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600)
	/go/src/github.com/docker/docker/vendor/github.com/gorilla/mux/mux.go:103 +0x228
github.com/docker/docker/api/server.(*routerSwapper).ServeHTTP(0xc421078330, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600)
	/go/src/github.com/docker/docker/api/server/router_swapper.go:29 +0x72
net/http.serverHandler.ServeHTTP(0xc420902f70, 0x55893a0ec2e0, 0xc4207f0e00, 0xc420173600)
	/usr/local/go/src/net/http/server.go:2697 +0xbe
net/http.(*conn).serve(0xc4211068c0, 0x55893a0ede20, 0xc420d81440)
	/usr/local/go/src/net/http/server.go:1830 +0x653
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2798 +0x27d
```

I have not been able to reproduce the situation, but preventing a panic should
not hurt.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 651e694508563e6fb3e8f5d7037641cc136b2c44)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2af0647e9735873e096241e361836c49b963667e
Component: engine
2019-08-07 20:45:19 +02:00
148e98951f Merge pull request #311 from kolyshkin/18.09-quota-map
[18.09 backport] projectquota: protect concurrent map access (ENGCORE-920)
Upstream-commit: ebb8bfca60f19348401b9be8510d5c3d89aeaf02
Component: engine
2019-08-07 20:43:13 +02:00
91c3416349 Pin Dockerfile to -stretch variant
The Golang base images switch to buster, which causes some breakage
in networking and packages that are no  longer available; (`btrfs-tools`
is now an empty package, and `libprotobuf-c0-dev` is gone).

Some of out tests also start faiilng on stretch, and will have to be
investigated further;

```
15:13:06 --- FAIL: TestRenameAnonymousContainer (3.37s)
15:13:06     rename_test.go:168: assertion failed: 0 (int) != 1 (inspect.State.ExitCode int): container a7fe866d588d65f353f42ffc5ea5288e52700384e1d90850e9c3d4dce8657666 exited with the wrong exitcode:

15:13:38 --- FAIL: TestHostnameDnsResolution (2.23s)
15:13:38     run_linux_test.go:128: assertion failed:
15:13:38         --- ←
15:13:38         +++ →
15:13:38         @@ -1 +1,2 @@
15:13:38         +ping: bad address 'foobar'
15:13:38
15:13:38
15:13:38     run_linux_test.go:129: assertion failed: 0 (int) != 1 (res.ExitCode int)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
 (cherry picked from commit ed672bb523cb255d0b2b79837d9c45a7c3255000)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 3c1bc29b2c372d0f1e37dc8aac33cdc01b623aa0
Component: engine
2019-08-06 23:03:49 -07:00
2c36982642 Windows: fix Golang version checks for GO_VERSION build-arg
This check was used to make sure we don't bump Go versions independently
(Linux/Windows). The Dockerfile switched to using a build-arg to allow
overriding the Go version, which rendered this check non-functional.

It also fails if Linux versions use a specific variant of the image;

08:41:31 ERROR: Failed 'ERROR: Mismatched GO versions between Dockerfile and Dockerfile.windows. Update your PR to ensure that both files are updated and in sync. ${GO_VERSION}-stretch ${GO_VERSION}' at 07/20/2019 08:41:31
08:41:31 At C:\gopath\src\github.com\docker\docker\hack\ci\windows.ps1:448 char:9
08:41:31 +         Throw "ERROR: Mismatched GO versions between Dockerfile and D ...
08:41:31 +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This patch fixes the check by looking for the value of `GO_VERSION` instead
of looking at the `FROM` line (which is harder to parse).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4fa57a8191b1d23c6466725b688519f83c0ac5dd)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a2d32c5654a206954fd0d9a5fd08abd8c03d4523
Component: engine
2019-08-06 23:03:49 -07:00
c0f1e37bd9 Dockerfile.windows: trim .0 from Go versions
This was an oversight when changing the Dockerfile to use a build-arg;
the Windows Dockerfile downloads the Go binaries, which never have a
trailing `.0`.

This patch makes sure that the trailing zero (if any) is removed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c5bd6e3dc7680d6c683496f63dafb1f30f87eaa7)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 8f1a27c51f93698b5fe17f0fb043f47794e11cca
Component: engine
2019-08-06 23:03:49 -07:00
05c0875eab Dockerfile: use GO_VERSION build-arg for overriding Go version
This allows overriding the version of Go without making modifications in the
source code, which can be useful to test against multiple versions.

For example:

    make GO_VERSION=1.13beta1 shell

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c6281bc4383b7f9eab617fd73601e8594c93365b)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Conflicts:
 * Dockerfile, Dockerfile.e2e, Dockerfile.simple, Dockerfile.windows:
   (due to Go version difference, missing CROSS etc.)
Upstream-commit: d9ba337adb0c3880acd34ffe9b0a15717990876b
Component: engine
2019-08-06 23:03:22 -07:00
eae77154b3 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-08-07 01:25:09 +00:00
b494c289b9 [18.09] bump golang 1.11.12 (#364)
[18.09] bump golang 1.11.12
Upstream-commit: 4ff284459622c0610017e68df53fc4e55363ed8d
Component: packaging
2019-08-06 15:19:25 -07:00
ff2d7c542f Pin Golang images to debian stretch variant
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1310e3974e8193745ce70cd74a20ab9d2151b8ac)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 32cdb89aac13e9af7446891eab8fb1aa54c22034
Component: packaging
2019-08-06 23:37:11 +02:00
51307aca80 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-08-06 21:00:46 +00:00
ad8524e828 Merge pull request #2015 from kolyshkin/18.09-golang-1.11.12
[18.09] Bump Go to 1.11.12
Upstream-commit: 0feb4080ba
Component: cli
2019-08-06 22:56:56 +02:00
018dd5e3eb projectquota: protect concurrent map access
Protect access to q.quotas map, and lock around changing nextProjectID.

Techinically, the lock in findNextProjectID() is not needed as it is
only called during initialization, but one can never be too careful.

Fixes: 52897d1c092 ("projectquota: utility class for project quota controls")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1ac0a66a64a906911d0708cd0e5fa397a2f0b595)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7027bb9bedae63879c1e41894739ba0ea2deedc1
Component: engine
2019-08-06 12:04:23 -07:00
542fc26354 stats: avoid cgo in collector
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit cf104d85c35947c25dcd86cef19aa97fe31e4bbd)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a83a1dcbeaa1aef3f99c71a0b2d88552d45ac444
Component: engine
2019-08-01 15:09:40 -07:00
920f2a46aa copy: allow non-cgo build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 230a55d337f67a2850fd3206500c5c2a89f9e2e7)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 1da22d7201f5fdedf3c6732163819d56a7571414
Component: engine
2019-08-01 15:09:40 -07:00
36678eaf72 quota: add noncgo build tag
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 186cd7cf4a4d3a02ca7e7a18d6d923245f3187b0)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 0dd47afda5c3d7e83f6b7b8766634e8bcacb041a
Component: engine
2019-08-01 15:09:40 -07:00
37de227743 Disable TLS for e2e docker-in-docker daemon
The docker-in-docker image now enables TLS by default (added in
docker-library/docker#166), which complicates testing in our
environment, and isn't needed for the tests we're running.

This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to
disable TLS.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b1a3c1aad1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9c8ac0a123
Component: cli
2019-07-29 17:09:53 -07:00
20900a1c29 e2e: use stable-dind image for testing
The edge channel is deprecated and no longer updated

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 08fd6dd63c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a88330d9dd
Component: cli
2019-07-29 17:09:50 -07:00
356502dd2c Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-27 05:17:06 +00:00
f8da0365c2 Merge pull request #305 from tonistiigi/cve-2019-14271-1809
[18.09] Initialize nss libraries in Glibc so that the dynamic libraries are l…
Upstream-commit: 8ff992ae26ecedb7b80ee71be902d0fbc0879861
Component: engine
2019-07-26 19:54:17 -07:00
fbde297068 Initialize nss libraries in Glibc so that the dynamic libraries are loaded in the host environment not in the chroot from untrusted files.
See also OpenVZ a3f732ef75/src/enter.c (L227-L234)

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit a316b10dab79d9298b02c7930958ed52e0ccf4e4)
Upstream-commit: 706204124878a97142be511c0c46bcc16b43b0bd
Component: engine
2019-07-26 13:34:35 -07:00
20fccac6f6 Dockerfile: Use APT_MIRROR for security.debian.org as well
The fastly cdn mirror we're using also mirrors the debian security
repository;

```
Welcome to deb.debian.org (fastly instance)!

This is deb.debian.org. This service provides mirrors for the following Debian archive repositories:

/debian/
/debian-debug/
/debian-ports/
/debian-security/
The server deb.debian.org does not have packages itself, but the name has SRV records in DNS that let apt in stretch and later find places.
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c8f43b5f6f7c83cfb5570f7f013c7efaa430d285)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Conflicts:
 * Dockerfile (GO_VERSION value differs, and CROSS (#39010) is absent)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 6e603e957eec3a46db4d8d69c3a7946c4d2e9c59
Component: engine
2019-07-26 12:40:28 -07:00
6622522ad6 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-25 21:03:51 +00:00
b74e2311ef Merge pull request #301 from thaJeztah/18.09_bump_libnetwork2
[18.09] bump libnetwork 55685ba49593e67f5e1c8180539379b16736c25e (18.09 branch)
Upstream-commit: e8c623b37e1bd82c9affd149427e892906549fd1
Component: engine
2019-07-25 12:53:04 -07:00
3cef44a1c0 Dockerfile.e2e: simplify apk calls
As of Alpine Linux 3.3 (or 3.2?) there exists a new --no-cache
option for apk. It allows users to install packages with an index
that is updated and used on-the-fly and not cached locally.

This avoids the need to use --update and remove /var/cache/apk/*
when done installing packages.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 3b44dd66a4b316049df86521c491b50466d9b55d)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a4ae2af0e59018a309d4bc71ced729b34e906564
Component: engine
2019-07-25 09:22:10 -07:00
53720a99f3 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-24 01:03:20 +00:00
37f88aed06 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-07-24 00:37:03 +00:00
0f4d86716a Bump Go to 1.11.12
go1.11.12 (released 2019/07/08) includes fixes to the compiler and the linker.
See the Go 1.11.12 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.12

Full diff: https://github.com/golang/go/compare/go1.11.11...go1.11.12

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: f8eb0d84d32b427805b1d7afee815375f92fe2ee
Component: packaging
2019-07-23 16:37:25 -07:00
66bb1728c9 Merge pull request #1961 from thaJeztah/18.09_format_vendor
[18.09 backport] bump gotest.tools 2.3.0, and reformat vendor.conf
Upstream-commit: 62f123fbd2
Component: cli
2019-07-23 16:33:19 -07:00
fda0f4da05 vendor.conf: reserve space for downstream projects
This helps merge conflicts in situations where downstream
projects have additional dependencies.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8c5460a2cc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7b3d023163
Component: cli
2019-07-23 16:01:57 -07:00
f3bbdf63ec bump gotest.tools v2.3.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c8d685457b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 32c4d8c40f
Component: cli
2019-07-23 16:01:52 -07:00
59f528c717 Sort vendor.conf alphabetically
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 773a91f9e9
Component: cli
2019-07-23 16:01:48 -07:00
a77c898b5d Reformat vendor.conf and pin all deps by git-sha
To make it better readable, and to encourage pinning
by sha, but "align" to a tagged release.

similar to 6026ce4a8b (#1822)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1764ffafca
Component: cli
2019-07-23 16:01:45 -07:00
8d1fd8dfed Bump to gotest.tools v2.2.0
I would like to use the regex matcher

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 986196e3e3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c1c3add698
Component: cli
2019-07-23 16:01:41 -07:00
f21fe83c94 Merge pull request #1959 from thaJeztah/18.09_backport_bump_docker_licensing
[18.09 backport] bump docker/licensing to 9781369abdb5281cdc07a2a446c6df01347ec793
Upstream-commit: e298714728
Component: cli
2019-07-23 15:59:32 -07:00
561749fec0 Merge pull request #1971 from thaJeztah/18.09_backport_skip_windows_permissions_check
[18.09 backport] Windows: skip permissions check on key
Upstream-commit: 1de93b845b
Component: cli
2019-07-23 15:58:01 -07:00
0bebf6af46 Merge pull request #1994 from thaJeztah/18.09_backport_cross_platform_bind
[18.09 backport] Detect Windows absolute paths on non-Windows CLI
Upstream-commit: 3d0a1f66eb
Component: cli
2019-07-23 15:56:25 -07:00
2c0e36c7d9 Bump Go to 1.11.12
go1.11.12 (released 2019/07/08) includes fixes to the compiler and the linker.
See the Go 1.11.12 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.12

Full diff: https://github.com/golang/go/compare/go1.11.11...go1.11.12

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: bad2df59f4b949549bc5591c17dee477e83adfad
Component: engine
2019-07-23 15:39:57 -07:00
63b8b89aea Bump Go to 1.11.12
go1.11.12 (released 2019/07/08) includes fixes to the compiler and the linker.
See the Go 1.11.12 milestone on our issue tracker for details:

 https://github.com/golang/go/issues?q=milestone%3AGo1.11.12

Full diff: https://github.com/golang/go/compare/go1.11.11...go1.11.12

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: e065aa2798
Component: cli
2019-07-23 15:31:36 -07:00
379d3f1f44 Merge pull request #168 from thaJeztah/18.09_backport_bump_golang_1.11
[18.09 backport] Bump Golang to 1.11.11
Upstream-commit: 241a7fc265f97989fa8cd9054f40acc1f066dd4d
Component: engine
2019-07-23 15:22:23 -07:00
02e521708b Merge pull request #1709 from thaJeztah/18.09_backport_bump_golang_1.11
[18.09 backport] bump Golang 1.11.11, and some makefile improvements
Upstream-commit: 5f4a501c27
Component: cli
2019-07-23 15:21:43 -07:00
c9d036b71b bump libnetwork 55685ba49593e67f5e1c8180539379b16736c25e (18.09 branch)
full diff: e7933d41e7...55685ba495

changes included:

- docker/libnetwork#2382 Backporting PR 2069 to bump_18.09
  - backport of https://github.com/docker/libnetwork#2069 Rolling back the port configs if failed to programIngress()
- docker/libnetwork#2363 [18.09] align dependencies with engine 18.09
- docker/libnetwork#2400 [18.09 backport] Fix TestValidRemoteDriver GetCapabilities errors
- docker/libnetwork#2391 [18.09 backport] Correctly clean up --config-only networks
  - backport of docker/libnetwork#2373
  - fixes moby/moby#35101
- docker/libnetwork#2392 [18.09 backport] remove gosimple - package is gone and it's not important

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a3767c7e9803f0a595a07b0548e99d60e861062
Component: engine
2019-07-23 15:16:58 -07:00
8cd45c2679 Merge pull request #1793 from thaJeztah/18.09_backport_fix_circle_vendor_flakiness
[18.09 backport] CircleCI: Increase no-output timeout to 15 minutes for vendoring
Upstream-commit: 7969d87630
Component: cli
2019-07-23 14:27:08 -07:00
2edbd754c6 Merge pull request #2002 from thaJeztah/18.09_backport_docs
[18.09 backport] assorted docs and completion script fixes
Upstream-commit: 642235d082
Component: cli
2019-07-23 14:14:55 -07:00
0dd43dd87f Merge pull request #613 from andrewhsu/1809ga
[18.09] bump ver 18.09.8
2019-07-17 10:03:56 -07:00
ef17941184 Merge branch '18.09' of github.com:docker/docker-ce into 18.09 2019-07-17 17:02:13 +00:00
4d26fa95ad Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-17 17:01:58 +00:00
6c4ac5b4bf bump ver 18.09.8
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-07-17 17:01:48 +00:00
8b3c3fd2fd Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-17 16:50:12 +00:00
67476cf36f Merge pull request #298 from thaJeztah/18.09_backport_scrub
[18.09 backport] DebugRequestMiddleware: unconditionally scrub data field
Upstream-commit: 456712c5b8d9d92c047f6a7d7cff270527ecac28
Component: engine
2019-07-17 09:09:51 -07:00
b48ef8cdca DebugRequestMiddleware: Remove path handling
Path-specific rules were removed, so this is no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 530e63c1a61b105a6f7fc143c5acb9b5cd87f958)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f8a0f26843bc5aff33cf9201b75bd4bdbb48a3ad)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a11c3098a3d5106b2d7c90d971c9300099556a49
Component: engine
2019-07-17 17:24:44 +02:00
3b1e458374 DebugRequestMiddleware: unconditionally scrub data field
Commit 77b8465d7e68ca102d7aae839c7b3fe0ecd28398 added a secret update
endpoint to allow updating labels on existing secrets. However, when
implementing the endpoint, the DebugRequestMiddleware was not updated
to scrub the Data field (as is being done when creating a secret).

When updating a secret (to set labels), the Data field should be either
`nil` (not set), or contain the same value as the existing secret. In
situations where the Data field is set, and the `dockerd` daemon is
running with debugging enabled / log-level debug, the base64-encoded
value of the secret is printed to the daemon logs.

The docker cli does not have a `docker secret update` command, but
when using `docker stack deploy`, the docker cli sends the secret
data both when _creating_ a stack, and when _updating_ a stack, thus
leaking the secret data if the daemon runs with debug enabled:

1. Start the daemon in debug-mode

        dockerd --debug

2. Initialize swarm

        docker swarm init

3. Create a file containing a secret

        echo secret > my_secret.txt

4. Create a docker-compose file using that secret

        cat > docker-compose.yml <<'EOF'
        version: "3.3"
        services:
          web:
            image: nginx:alpine
            secrets:
              - my_secret
        secrets:
          my_secret:
            file: ./my_secret.txt
        EOF

5. Deploy the stack

        docker stack deploy -c docker-compose.yml test

6. Verify that the secret is scrubbed in the daemon logs

        DEBU[2019-07-01T22:36:08.170617400Z] Calling POST /v1.30/secrets/create
        DEBU[2019-07-01T22:36:08.171364900Z] form data: {"Data":"*****","Labels":{"com.docker.stack.namespace":"test"},"Name":"test_my_secret"}

7. Re-deploy the stack to trigger an "update"

        docker stack deploy -c docker-compose.yml test

8. Notice that this time, the Data field is not scrubbed, and the base64-encoded secret is logged

        DEBU[2019-07-01T22:37:35.828819400Z] Calling POST /v1.30/secrets/w3hgvwpzl8yooq5ctnyp71v52/update?version=34
        DEBU[2019-07-01T22:37:35.829993700Z] form data: {"Data":"c2VjcmV0Cg==","Labels":{"com.docker.stack.namespace":"test"},"Name":"test_my_secret"}

This patch modifies `maskSecretKeys` to unconditionally scrub `Data` fields.
Currently, only the `secrets` and `configs` endpoints use a field with this
name, and no other POST API endpoints use a data field, so scrubbing this
field unconditionally will only scrub requests for those endpoints.

If a new endpoint is added in future where this field should not be scrubbed,
we can re-introduce more fine-grained (path-specific) handling.

This patch introduces some change in behavior:

- In addition to secrets, requests to create or update _configs_ will
  now have their `Data` field scrubbed. Generally, the actual data should
  not be interesting for debugging, so likely will not be problematic.
  In addition, scrubbing this data for configs may actually be desirable,
  because (even though they are not explicitely designed for this purpose)
  configs may contain sensitive data (credentials inside a configuration
  file, e.g.).
- Requests that send key/value pairs as a "map" and that contain a
  key named "data", will see the value of that field scrubbed. This
  means that (e.g.) setting a `label` named `data` on a config, will
  scrub/mask the value of that label.
- Note that this is already the case for any label named `jointoken`,
  `password`, `secret`, `signingcakey`, or `unlockkey`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7ce4be93ae8edd2da62a588e01c67313a4aba0c)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 73db8c77bfb2d0cbdf71ce491f3d3e66c9dd5be6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 32b40c53662e733b4627b0b303c71b52484a31f4
Component: engine
2019-07-17 17:24:35 +02:00
2294bf630c TestMaskSecretKeys: use subtests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 32d70c7e21631224674cd60021d3ec908c2d888c)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit ebb542b3f88d7f5551f6b6e1d8d2774a2c166409)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1371b11749854515289abe6bcc0c1b0759ea7a5b
Component: engine
2019-07-17 17:24:23 +02:00
16da52903d TestMaskSecretKeys: add more test-cases
Add tests for

- case-insensitive matching of fields
- recursive masking

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit db5f811216e70bcb4a10e477c1558d6c68f618c5)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 18dac2cf32faeaada3bd4e8e2bffa576ad4329fe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 310770b6deae3ff2f244654b8e84c14576e38493
Component: engine
2019-07-17 17:24:14 +02:00
1a64b8a4d1 Prevent bash process substitution error in cygwin
Signed-off-by: Matteo Orefice <matteo.orefice@bites4bits.software>
(cherry picked from commit 0b49495b1d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0dff33436c
Component: cli
2019-07-12 16:18:41 +02:00
025a808cd4 fix: docker login autocomplete for zsh
Changed `--user` to `--username`

Signed-off-by: Rohan Verma <hello@rohanverma.net>
(cherry picked from commit 1dc756e8df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 048af5b37b
Component: cli
2019-07-12 16:10:24 +02:00
87dd848fb9 Add bash completion for events --filter node
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit c1639e1e42)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7ee8241f71
Component: cli
2019-07-12 16:09:59 +02:00
d352de241a docs: add info for events backlog and scope
1. Adds `docker events` description info on the two scope types of events.
2. Adds `docker events` note in two places about backlog limit of event log.

Further info and background info in Issue 727

Signed-off-by: Bret Fisher <bret@bretfisher.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 988b9a0d96)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 74d51dc13b
Component: cli
2019-07-12 16:08:23 +02:00
45c60750ea Detect Windows absolute paths on non-Windows CLI
When deploying a stack using a relative path as bind-mount
source in the compose file, the CLI converts the relative
path to an absolute path, relative to the location of the
docker-compose file.

This causes a problem when deploying a stack that uses
an absolute Windows path, because a non-Windows client will
fail to detect that the path (e.g. `C:\somedir`) is an absolute
path (and not a relative directory named `C:\`).

The existing code did already take Windows clients deploying
a Linux stack into account (by checking if the path had a leading
slash). This patch adds the reverse, and adds detection for Windows
absolute paths on non-Windows clients.

The code used to detect Windows absolute paths is copied from the
Golang filepath package;
1d0e94b1e1/src/path/filepath/path_windows.go (L12-L65)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d6dd08d568)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a757fad956
Component: cli
2019-07-10 23:39:41 +02:00
6b835ba41a Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-07-10 01:01:54 +00:00
531574846b [18.09 backport] require container-selinux >= 2.74 (#352)
[18.09 backport] require container-selinux >= 2.74
Upstream-commit: 2dfffcfb076dccf33ac345fb3475bc349d68459d
Component: packaging
2019-07-09 12:40:17 -10:00
29233058d5 Bump golang 1.11.11
go1.11.11 (released 2019/06/11) includes a fix to the crypto/x509 package.
See the Go 1.11.11 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.11

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f33c398df1eabda69ca05ff6c5c45351790a8696
Component: packaging
2019-07-08 11:33:07 +02:00
cd1b18d66d Bump Golang 1.11.5 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a86dd09775725e0ea79bcc25613879d09d11ba0c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f571ca6a512ac099bdb5a8cd4c44f6256b60fa70
Component: packaging
2019-07-08 11:32:04 +02:00
19cae1634a Bump Golang 1.11.3 (CVE-2018-16875)
go1.11.3 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.11.3 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 517a30b48d7b483e27eb3c3328356a8e83272988)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 17565b93d361b1b189962b3e98c431316a7cc628
Component: packaging
2019-07-08 11:31:50 +02:00
5033fdcda8 Revert "[18.09] Bump Golang 1.10.8 (CVE-2019-6486)"
This reverts commit 9aec27794cc1e702bd9b9f3ac476695fc0d522a4.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e05230d281769067cc4e9224218f25634f5b894a
Component: packaging
2019-07-08 11:31:25 +02:00
d9a98a0f86 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-07-06 21:01:21 +00:00
3c597067b9 [18.09] switch to balenalib/rpi-raspbian because resin/rpi-raspb… (#359)
[18.09] switch to balenalib/rpi-raspbian because resin/rpi-raspbian is deprecated
Upstream-commit: e8cb60baf6abb7b2cd50c9991056891be462b839
Component: packaging
2019-07-06 07:48:51 -10:00
b69692140e Merge component 'cli' from git@github.com:docker/cli 18.09 2019-07-04 00:46:01 +00:00
2f1c550ef2 Merge pull request #1978 from thaJeztah/18.09_backport_fix_rollback_config_interpolation
[18.09 backport] Fix Rollback config type interpolation
Upstream-commit: ec2ecc1c8b
Component: cli
2019-07-03 23:09:20 +02:00
5f9904bac8 Rollback config type interpolation on fields "parallelism" and "max_failure_ratio" were missing, as it uses the same type as update_config.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit efdf36fa81)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 23c88a8311
Component: cli
2019-07-03 19:20:08 +02:00
88031e7c4e switch to balenalib/rpi-raspbian because resin/rpi-raspbian is deprecated
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7ab3b5c11a0426117580b14e1b170b192945af1d
Component: packaging
2019-07-03 00:33:52 +02:00
2d0083d657 Merge pull request #611 from andrewhsu/1809ga
[18.09] bump ver 18.09.7
2019-06-27 10:13:33 -07:00
f53f261a1d bump ver 18.09.7
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-06-27 16:55:22 +00:00
52d814f953 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-06-27 01:02:59 +00:00
ba3d612d8c Merge pull request #355 from thaJeztah/18.09_backport_remove_pkcs11
[18.09 backport] Remove the pkcs11 tag, was a holdover from cli
Upstream-commit: cc243930f1600d0a1a5621afe4bd3abe9c299c11
Component: packaging
2019-06-26 12:32:09 -10:00
df56d66f46 Remove the pkcs11 tag, was a holdover from cli
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 76f7249ca4695f58cee9773cb8b8036e698c576b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 095a4c109d5ba3444ace84e53f363eb4855e57d2
Component: packaging
2019-06-26 01:01:03 +02:00
0ac05a6a78 require container-selinux >= 2.74
version 2.9 is really old; this sets the same minimal version
as is used for the containerd.io package

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a246b19b0723d41a8e58ff42d3af52fd57a7e94d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 95dea749d4cb7e474194bbe209f052e94da5df2e
Component: packaging
2019-06-26 00:48:50 +02:00
a0b40b8b45 Windows: skip permissions check on key
This code was attempting to check Linux file permissions
to determine if the key was accessible by other users, which
doesn't work, and therefore prevented users on Windows
to load keys.

Skipping this check on Windows (correspinding tests
were already skipped).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 15d361fd77)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6be8fce6f8
Component: cli
2019-06-25 12:53:54 +02:00
e97b22c15d Merge pull request #610 from andrewhsu/1809rc1
[18.09] bump ver 18.09.7-rc1
2019-06-20 17:29:08 -07:00
28ef26b589 bump ver 18.09.7-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-06-20 22:48:21 +00:00
f7c2b93be6 bump docker/licensing to 9781369abdb5281cdc07a2a446c6df01347ec793
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5ac07c795f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 667aef15b0
Component: cli
2019-06-20 13:56:10 +02:00
30a5b4621e Bump golang 1.11.11
go1.11.11 (released 2019/06/11) includes a fix to the crypto/x509 package.
See the Go 1.11.11 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.11

full diff: https://github.com/golang/go/compare/go1.11.10...go1.11.11

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a14e6cafbc02cfd82c97dc517ac15db5677065bb
Component: engine
2019-06-20 11:24:36 +02:00
b1062d6c8f Bump Golang 1.11.10
go1.11.10 (released 2019/05/06) includes fixes to the runtime and the linker.
See the Go 1.11.10 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.10

Full diff: https://github.com/golang/go/compare/go1.11.9...go1.11.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 79ae84c43b8d6a49aae29b804c3945ae4791f887
Component: engine
2019-06-20 11:24:31 +02:00
d33dcb4a15 Dockerfile.e2e bump alpine 3.9
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: eaa4fa999257ab37e988d38d35a2c6433e614de2
Component: engine
2019-06-20 11:24:28 +02:00
b972fd2f05 Bump Golang 1.11.9
Full diff: https://github.com/golang/go/compare/go1.11.5...go1.11.9

go1.11.6 (released 2019/03/14) includes fixes to cgo, the compiler, linker,
runtime, go command, and the crypto/x509, encoding/json, net, and net/url
packages. See the Go 1.11.6 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.11.6

go1.11.7 (released 2019/04/05) includes fixes to the runtime and the net
packages. See the Go 1.11.7 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.11.7

go1.11.8 (released 2019/04/08) was accidentally released without its
intended fix. It is identical to go1.11.7, except for its version number.
The intended fix is in go1.11.9.

go1.11.9 (released 2019/04/11) fixes an issue where using the prebuilt
binary releases on older versions of GNU/Linux led to failures when linking
programs that used cgo. Only Linux users who hit this issue need to update.

See golang/go#31293 for details

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2cc1df06ee264ab5d1769bd4aae9e417feda9402
Component: engine
2019-06-20 11:24:25 +02:00
bd129e88cf Bump Golang 1.11.5 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 20b34412dc8a3099f658545e8504e1fc1326b3cb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4add22cc49057ec58284ba12afbf5a7c3c290805
Component: engine
2019-06-20 11:24:22 +02:00
3835dde0f7 Switch Dockerfile.e2e to alpine 3.8
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7c8dcebd300262c9f98d92777dd9aab6d4e26f10)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 15148160ec0e63a7e7faab01bfbe99f6951ba313
Component: engine
2019-06-20 11:24:20 +02:00
b4d88fd07d Bump Golang 1.11.4
go1.11.4 (released 2018/12/14) includes fixes to cgo, the compiler, linker,
runtime, documentation, go command, and the net/http and go/types packages. It
includes a fix to a bug introduced in Go 1.11.3 that broke go get for import
path patterns containing "...".

See the Go 1.11.4 milestone for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.4+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3770f386477e5eea4e6ba02516393a1edd5cd28b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e05367a1ba3cbf2cd7f99fef73908b900b57b929
Component: engine
2019-06-20 11:24:17 +02:00
b71651c1b7 Bump Golang 1.11.3 (CVE-2018-16875)
go1.11.13 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.11.3 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6b7c093b0de21d574ce120aee891e60187749174)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 19d37c9a337e82e0e8ce0ff28271739e8ec78e83
Component: engine
2019-06-20 11:24:14 +02:00
5da3533485 Bump Golang to 1.11.2
Includes fixes to the compiler, linker, documentation, go command, and the
database/sql and go/types packages. See the Go 1.11.2 milestone on the issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e80ee5206e6e62521c8149381d06bbb0bea88169)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f9a71f917f0979742b1d7ee606fb596e873d773c
Component: engine
2019-06-20 11:24:11 +02:00
5a61d5bd74 Bump Golang 1.11.1
go1.11.1 (released 2018/10/01) includes fixes to the compiler,
documentation, go command, runtime, and the crypto/x509, encoding/json,
go/types, net, net/http, and reflect packages.

See the Go 1.11.1 milestone on our issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0347751117513312be72e8b0d03f32319027f145)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6b397d155bf464a94fa05620a485d969edf42393
Component: engine
2019-06-20 11:24:09 +02:00
28b6a8ea45 vendor: bump etcd deps
As per https://github.com/etcd-io/etcd/blob/fa57f7fbc787b4/Gopkg.lock

List of packages required by subset of etcd used is provided by:

go list -f '{{join .Deps "\n"}}' \
 github.com/docker/docker/vendor/github.com/coreos/etcd/... \
 | grep -F . | grep -v coreos/etcd | sort | uniq

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 7008ac01fa4dbde9a069cc647a09c982f3648fc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c4bf0803154de1b26ee3437c7fd9307722e2a5e4
Component: engine
2019-06-20 11:24:06 +02:00
f8bdbb2a11 vendor: bump etcd to v3.3.9
...and use ugorji/go 1.1.1

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit a77a2a406cd3303a4fd5ccbfbeccde8a9014dbcb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a1e8eee6ff19078c94727a57296c6ae8f94c2be6
Component: engine
2019-06-20 11:24:03 +02:00
8764c9c9c4 Bump vndr
We can do that now as we're no longer carrying archive/tar.
Note that latest vndr removes vendor/ subdir so we don't have to,
thus the change in hack/validate/vendor.

While at it, re-run a new vndr version to make sure everything
that should be there is.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ce858feb6ac124b3a42400b857e480ef98710164)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2f2588f137f642b0c1520e8a41ec731040d0b336
Component: engine
2019-06-20 11:24:00 +02:00
abcb9e9f1f Bump golang to 1.11.0
It's that time of year again! Go 1.11 is released, time to use it.

This commit also

* removes our archive/tar fork, since upstream archive/tar
  is fixed for static builds, and osusergo build tag is set.

* removes ENV GO_VERSION from Dockerfile as it's not needed
  anymore since PR #37592 is merged.

[v2: switch to beta2]
[v3: switch to beta3]
[v4: rc1]
[v5: remove ENV GO_VERSION as PR #37592 is now merged]
[v6: rc2]
[v7: final!]
[v8: use 1.11.0]
[v9: back to 1.11]
[v8: use 1.11.0]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 10fd0516b9f9f04d0f0e2c0755e704303f1a487f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ebf396050d6e977df2669d5e7d3f38098719f7c2
Component: engine
2019-06-20 11:23:57 +02:00
bad43bbc06 hack/make.ps1: remove the .0 suffix from go version
We would like to use a version with .0 suffix (like 1.11.0) in
Dockerfile, so that once a .1 version is out (like 1.11.1) we
won't accidentally switch to it.

Unfortunately it's not possible to use .0 suffix currently
as it breaks the check in make.ps1. This patch fixes that.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8ad648b59a2993156586458cc9ff8dcbc89b86e4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dc5371b4134dd6474a467308da85daaa27914a64
Component: engine
2019-06-20 11:23:54 +02:00
0f2b4bb0cf Dockerfile.simple: simplify by using golang img
Instead of installing golang from sources, it's easier to use
golang image which is based on Debian Stretch.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 32a23311033dc5bfdfbc80c54a159cc92990efd2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2e82d410bef320096e316ef7a3db8797694f88fe
Component: engine
2019-06-20 11:23:51 +02:00
c3d5a3ae2a Revendor ugorji/go
To include the following backported fix:

https://github.com/kolyshkin/ugorji-go/commit/1cf431c13dec46596

which should fix this:

> 13:40:53 vendor/github.com/ugorji/go/codec/gen-helper.generated.go:1:
> possible malformed +build comment%!(EXTRA []interface {}=[])

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 09921ca33fb1cdb7648143e787a2a6222d844eb0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ca9d80ea6a07f54b6171cd3cb1a5125948fd5fdc
Component: engine
2019-06-20 11:23:48 +02:00
d02918ddb2 Format code with gofmt -s from go-1.11beta1
This should eliminate a bunch of new (go-1.11 related) validation
errors telling that the code is not formatted with `gofmt -s`.

No functional change, just whitespace (i.e.
`git show --ignore-space-change` shows nothing).

Patch generated with:

> git ls-files | grep -v ^vendor/ | grep .go$ | xargs gofmt -s -w

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9b0097a69900009ab5c2480e047952cba60462a7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ee28567c7066368207a947e02c6242db7a4adb16
Component: engine
2019-06-20 11:23:45 +02:00
d70605fb20 Merge branch '18.09' of github.com:docker/docker-ce into 18.09 2019-06-20 05:00:56 +00:00
8aad3d72e2 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-06-20 05:00:41 +00:00
3bc33de395 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-06-20 04:59:41 +00:00
31e95a598d Merge pull request #286 from thaJeztah/18.09_backport_cp_slash_fix
[18.09 backport] Fix docker cp when container source path is /
Upstream-commit: c513a4c6c2989445efb75f84b5f62440d1a7bf0c
Component: engine
2019-06-19 18:40:54 -07:00
a3dc56fc6f Merge component 'engine' from git@github.com:docker/engine 18.09 2019-06-18 20:59:34 +00:00
819288aa31 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-06-18 20:36:57 +00:00
6e8fdfff42 Merge pull request #195 from thaJeztah/18.09_backport_makefile_and_test_changes
[18.09 backport] Makefile and test changes
Upstream-commit: bad2185b9909c5083cdaf673d2d84a707d1927b9
Component: engine
2019-06-18 10:33:53 -07:00
83a77ecc35 Merge pull request #196 from thaJeztah/18.09_backport_plugin_partial
[18.09 backport] Adds PartialLogMetadata to encode protobuf for logger plugins
Upstream-commit: 10b63ee8ba1b51d4740f1bbb92be7bfe375d9ed3
Component: engine
2019-06-18 10:27:44 -07:00
2f921c9ec1 Merge pull request #203 from thaJeztah/18.09_backport_gcr_workaround
[18.09 backport] builder: add workaround for gcr auth issue
Upstream-commit: 6b2d2eb653e7e634852fad4fbf4ea0df86868109
Component: engine
2019-06-18 10:20:39 -07:00
ab19839d16 Merge pull request #221 from thaJeztah/18.09_backport_swarmnanocpu
[18.09 backport] Switch swarmmode services to NanoCpu
Upstream-commit: d1a30309de3f9e13d78779976e28ce52dfebdf2f
Component: engine
2019-06-18 10:09:46 -07:00
909fa7d737 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-06-18 17:08:14 +00:00
c211b6a944 Merge pull request #186 from thaJeztah/18.09_backport_bump_cgroups
[18.09 backport] update containerd/cgroups 4994991857f9b0ae8dc439551e8bebdbb4bf66c1
Upstream-commit: af585fc188292c56d6df8f6cd557ba0e59947054
Component: engine
2019-06-18 10:02:21 -07:00
1e7ba22582 Merge pull request #190 from thaJeztah/18.09_backport_mirrors_validation
[18.09 backport] daemon: fix mirrors validation
Upstream-commit: a43a4ab30ec789a31ee3a14118bf02b7cc54cff0
Component: engine
2019-06-18 10:01:17 -07:00
728c223f90 Merge pull request #273 from thaJeztah/18.09_backport_entropy_cannot_be_saved
[18.09 backport] Entropy cannot be saved
Upstream-commit: 0ab832439e8ae2810e7a7ab2e2d7860bb6f45789
Component: engine
2019-06-18 10:00:05 -07:00
afc04c47ed Merge pull request #265 from thaJeztah/18.09_backport_do_not_order_uid_gid_mappings
[18.09 backport] Stop sorting uid and gid ranges in id maps
Upstream-commit: 047143abc38294668b1680c46e8ea0868838beb0
Component: engine
2019-06-18 09:56:53 -07:00
138981a207 Enable buildkit for Makefile build target
This is set only if it is not already set.
This should give a little speedup to CI builds.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 1275a001a68722494d090d5beca6749a83710cc2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e64cd6abed308a26d9048d4d0e4c52207c2ad5df
Component: engine
2019-06-18 17:53:32 +01:00
1247206ab1 hack: Have TIMEOUT take -test.count into account when testing for flakiness
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 42dcfc894a64e9b4c1751b21db1537b3b68a36d8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a9c1bfc1b1cd94968b399ffdddef4b908a722bb3
Component: engine
2019-06-18 17:53:24 +01:00
00d14a4862 CI: Introduce flaky test finder
comparing PR commit(s) to HEAD of moby/moby master branch and if founds
new (or renamed) integration tests will run stress tests for them.

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 8a8fd37f6fb53716cb4b3a7e93e1e3cf385927e2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e5c0923b277055c977994ebfdc689346c3104a16
Component: engine
2019-06-18 17:53:21 +01:00
fbaec0bb9e Makefile: make help: fix newline wrapping, and missing targets
This patch;

- adds support for multiple newlines
- removes the 1-space indentation of wrapped lines
- allows numerical characters in targets (0-9)

Given these targets:

```Makefile
.PHONY: foobar
foobar: ## runs the foobar lorum ipsum.\nand so pn\nand so on
	echo foobar

.PHONY: e2e-tests
e2e-tests: ## runs the end-to-end tests
	echo e2e-tests
```

Before this change, the output of `make help` was

```
foobar               runs the foobar lorum ipsum.
                      and so pn\nand so on
```

After this change, the output is:

```
foobar               runs the foobar lorum ipsum.
                     and so pn
                     and so on
e2e-tests            runs the end-to-end tests
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 202c9d8c98614e7cce2017f5c99d3d783fe8b509)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 733b86683f347f922affc714d305d9f03fe9b47e
Component: engine
2019-06-18 17:53:17 +01:00
e6d06f7160 Use BuildKit to skip source code COPY if BIND_DIR set
build the final stage of the Dockerfile (including COPY ...) if no BIND_DIR
is used.
if BIND_DIR is used, build the dev stage, thus skipping the COPY.

Original author: @thaJeztah

Signed-off-by: Mohammad Nasirifar <farnasirim@gmail.com>
(cherry picked from commit e6d7df2e5d313800414b955e10a26d6687e7a1bf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e5a039169f389120be3fbc2a9db45ef8bc99eae5
Component: engine
2019-06-18 17:53:12 +01:00
7e0220b6d6 Allow to override the Makefile's DOCKER_MOUNT variable
Through the env variable of the same name.

The idea here is pretty simple: I/O perf on native mounted disks
on non-Linux (notably Mac OS) is just terrible, thus making it
a real pain to develop: one has to choose between re-building
the image after every single change (eg to run a test) or just
work directly inside the same container (eg with vim, but even then
one would have to re-configure their dev container every time
it gets destroyed - containers, after all, are not supposed to
be long-lived).

Allowing to override `DOCKER_MOUNT` makes it easy for everyone
to decide what their volume/syncing strategy is; for example
one can choose to use [docker-sync](https://github.com/EugenMayer/docker-sync)

This patch won't change anything for anyone who doesn't
set the `DOCKER_MOUNT` env variable in their environment.

Signed-off-by: Jean Rouge <jer329@cornell.edu>
(cherry picked from commit aea6fdf3d340835a1b0af208839ce42ace3a5b89)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ecc423df7fde7f0edc963f03d70da133f03bb63c
Component: engine
2019-06-18 17:53:08 +01:00
36954599b4 go {build,test}: rm -i option, add go cache volume
Looks like -i (together with DOCKER_INCREMENTAL_BINARY etc)
were used to get faster incremental builds.

Nowdays (since Go 1.10) this is no longer the case, as
go build cache is used [1]. Here's a quote:

> You do not have to use "go test -i" or "go build -i" or
> "go install" just to get fast incremental builds. We will
> not have to teach new users those workarounds anymore.
> Everything will just be fast.

To enable go cache between builds, add a volume for /root/.cache.

[1] https://groups.google.com/forum/#!msg/golang-dev/qfa3mHN4ZPA/X2UzjNV1BAAJ

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit bdcd81d3301a053eefc320de16ac842ec47ed459)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0f190f798f7b9f90bd008fe8fb0fc087ec965642
Component: engine
2019-06-18 17:53:03 +01:00
b083df35c8 Merge pull request #1842 from thaJeztah/18.09_bump_buildkit_18.09
[18.09 backport] bump buildkit 05766c5c21a1e528eeb1c3522b2f05493fe9ac47 (docker-18.09 branch)
Upstream-commit: 3a749342a3
Component: cli
2019-06-18 09:49:42 -07:00
800f827460 Merge pull request #199 from thaJeztah/18.09_backport_fix_panic_on_empty_dockerfile
[18.09 backport] fix panic on empty dockerfile
Upstream-commit: 70399c41d321651121a4eb2775c4e7f63796426f
Component: engine
2019-06-18 09:49:05 -07:00
6cdb81566e Merge pull request #202 from thaJeztah/18.09_backport_update_docker_py
[18.09 backport] Update docker-py to 3.7.0
Upstream-commit: 5749d5ae7967038eecd974767142d27652bbbc2f
Component: engine
2019-06-18 09:46:14 -07:00
14405a174e Merge pull request #230 from thaJeztah/18.09_backport_windows_tag
[18.09 backport] Consider WINDOWS_BASE_IMAGE_TAG override when setting Windows base image for tests
Upstream-commit: bb54c5bf2a3ab1c698fda6b3d67773d25755ae45
Component: engine
2019-06-18 09:44:44 -07:00
aa8e14244e Merge pull request #236 from thaJeztah/18.09_backport_thanks_brian_now_im_hungry
[18.09 backport] Fix error handling for bind mount spec parser.
Upstream-commit: 41fbd152739faa225db8c9913e34c663b9202101
Component: engine
2019-06-18 09:43:19 -07:00
28df654a77 Merge pull request #194 from thaJeztah/18.09_backport_bump_containerd_v1.2.6
[18.09 backport] Bump containerd v1.2.6, runc v1.0.0-rc8
Upstream-commit: 3bacaaded9e086ec06fc335146eda614e1110570
Component: engine
2019-06-18 09:41:42 -07:00
b0ff7b744e integration: have container.Create call compile
For reference on why this is needed:
https://github.com/docker/engine/pull/280#issuecomment-502056661

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8f4b96f19e64b96df9d8c43208cefb113715ccbf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 584c0857ab21895e62feac686448085113c6c977
Component: engine
2019-06-18 17:28:54 +01:00
be6d997b5e Merge pull request #205 from thaJeztah/18.09_backport_remove_stale_lb_ep
[18.09 backport] Remove a network during task SHUTDOWN instead of REMOVE
Upstream-commit: 605119d7b0c3b3dff7ff41b2da8e50fcaff8bae5
Component: engine
2019-06-18 09:25:24 -07:00
6532144af4 pkg/archive: keep walkRoot clean if source is /
Previously, getWalkRoot("/", "foo") would return "//foo"
Now it returns "/foo"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 7410f1a859063d4ed3d8fca44f27bdde4c2cb5a3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8677bbe3f31a8e4516e1ba413ce1063c803ea10c
Component: engine
2019-06-18 14:44:26 +01:00
36f18a1f78 daemon: fix docker cp when container source is /
Before 7a7357da, archive.TarResourceRebase was being used to copy files
and folders from the container. That function splits the source path
into a dirname + basename pair to support copying a file:
if you wanted to tar `dir/file` it would tar from `dir` the file `file`
(as part of the IncludedFiles option).

However, that path splitting logic was kept for folders as well, which
resulted in weird inputs to archive.TarWithOptions:
if you wanted to tar `dir1/dir2` it would tar from `dir1` the directory
`dir2` (as part of IncludedFiles option).

Although it was weird, it worked fine until we started chrooting into
the container rootfs when doing a `docker cp` with container source set
to `/` (cf 3029e765).

The fix is to only do the path splitting logic if the source is a file.

Unfortunately, 7a7357da added support for LCOW by duplicating some of
this subtle logic. Ideally we would need to do more refactoring of the
archive codebase to properly encapsulate these behaviors behind well-
documented APIs.

This fix does not do that. Instead, it fixes the issue inline.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 171538c190ee3a1a8211946ab8fa78cdde54b47a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 70a837138aa1c5c0260a005b470ac0c5717984b4
Component: engine
2019-06-18 14:44:15 +01:00
9f18b94c1b add more tests
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 02f1eb89a42b4a9e91a8c80c213f7dc3193c75b9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c820334ff3e048d1207a63ba9d5b9d11e38f649d
Component: engine
2019-06-18 14:44:04 +01:00
2bf8bffc5b Add test for copying entire container rootfs
CID=$(docker create alpine)
docker cp $CID:/ out

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 6db9f1c3d6e9ad634554cacaf197a435efcf8833)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8fd0d71d7e4b03a815f2fb86b19ef2a71a1b7ce0
Component: engine
2019-06-18 14:43:49 +01:00
a3041ba7dd Test: dockerfiles with no instructions are detected
Signed-off-by: Natasha Jarus <linuxmercedes@gmail.com>
(cherry picked from commit 18c7e8b927928654a67ce5d6637e42932fc3e7df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cd084b23f7c3ca38c5d9c15ec16e119d25e5d7af
Component: engine
2019-06-18 13:44:08 +01:00
a439056531 Convert parse errors to more informative format
- Wrap parse errors in errdefs.InvalidParameters
- Include dockerfile in error names

Signed-off-by: Natasha Jarus <linuxmercedes@gmail.com>
(cherry picked from commit 64466b0cd9ff36dc3f123a3a68eae438ac9e8e60)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7eb0e6a095ac71bfe3e3419cef7d5867fef55f20
Component: engine
2019-06-18 13:44:04 +01:00
cbbe578ba2 bump buildkit 05766c5c21a1e528eeb1c3522b2f05493fe9ac47 (docker-18.09 branch)
- moby/buildkit#952 [18.09 backport] Have parser error on dockerfiles without instructions
  - backport of moby/buildkit#771 Have parser error on dockerfiles without instructions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a1d76e0585c498f5167b28b9909fd8c88fd3370d
Component: engine
2019-06-18 13:43:59 +01:00
0addc7f6c5 Update docker-py to 3.7.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c0c05affc79b199248b457af16fff61c305b7623)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b92e9e9da9519efa38d8a5927af668413cf81cd7
Component: engine
2019-06-18 13:42:20 +01:00
932cc247c5 Entropy cannot be saved
Remove non cryptographic randomness.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 2df693e533e904f432c59279c07b2b8cbeece4f0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 292b43b15b68cd4b64bfc7b89452dc19ddf2cf48
Component: engine
2019-06-18 13:38:50 +01:00
8642bba6c4 Network not deleted after stack is removed
Make sure adapter.removeNetworks executes during task Remove
adapter.removeNetworks was being skipped for cases when
isUnknownContainer(err) was true after adapter.remove was executed

This fix eliminates the nil return case forcing the function
to continue executing unless there is a true error

Fixes https://github.com/moby/moby/issues/39225

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit 70fa7b6a3fd9aaada582ae02c50710f218b54d1a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 75887d37e1ddbef579e239ff0b1b7a2508e486fd
Component: engine
2019-06-18 13:34:02 +01:00
ac643ab134 Remove a network during task SHUTDOWN instead of REMOVE to
make sure the LB sandbox is removed when a service is updated
with a --network-rm option

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit 680d0ba4abfb00c8ac959638c72003dba0826b46)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 280b8dff7df137dd21fcf27cacf6d12ed531770a
Component: engine
2019-06-18 13:33:58 +01:00
e00a39ba2b Move serviceRunningTasksCount to integration/internal/swarm
This fix moves multiple places of serviceRunningTasksCount
to one location in integration/internal/swarm, so that
code duplication could be removed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit e485a60e2bcc59860f387c94f6afaa0130ea7040)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c087f681d40332bd7d158baf615c03f6a72274f1
Component: engine
2019-06-18 13:33:14 +01:00
e91395081e integration: Corrected service update tests logic
Tests which will re-deploy containers uses function serviceIsUpdated() to
make sure that service update really reached state UpdateStateCompleted.

Tests which will not re-deploy container uses function
serviceSpecIsUpdated to make sure that service version is increased.

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit b868ada474b5c214ed9bddb792dd36f794dc1fa6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ccc1abea092a54d99dec51345ef9303b4629572d
Component: engine
2019-06-18 13:33:06 +01:00
9d41ea2d82 integration: wait for service update to be completed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8edcd4c3cd294bf276ffbe29bc58afbb006593b8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2ae0365c99627343d001a24e171fba2aa0fea791
Component: engine
2019-06-18 13:33:02 +01:00
29d8b5118f migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit be151a73f0c0f362ff9775d2ff4d32329c01b8ba)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4fe4e891723569fde7703747903289883db1dec0
Component: engine
2019-06-18 13:32:59 +01:00
be5597cd97 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-06-17 21:01:25 +00:00
630cd7d11b Merge pull request #257 from thaJeztah/18.09_backport_increase_swarmkit_grpc
[18.09 backport] Increase max recv gRPC message size for nodes and secrets
Upstream-commit: ce2e2b672a7a3510419cb2706edab3fd7f12fd6c
Component: engine
2019-06-17 12:31:27 -07:00
d25b6ea6fd Merge pull request #244 from thaJeztah/18.09_backport_fix_copying
[18.09 backport] image: do actual RootFS.DiffIDs copying in Clone()
Upstream-commit: 423f39ab05d121e1aeb6e59732386fb50c17f49b
Component: engine
2019-06-17 12:30:32 -07:00
2bfd8549de Merge pull request #218 from thaJeztah/18.09_backport_EDGE374_TestDaemonNoSpaceLeftOnDeviceError
[18.09 backport] explicitly set filesystem type for mount to avoid 'invalid argument' error on arm
Upstream-commit: 51ebfcbe423c679f06cfb37f7e6be565e0955639
Component: engine
2019-06-17 12:28:35 -07:00
eae44d6a4c Merge pull request #223 from thaJeztah/18.09_backport_devno
[18.09 backport] bugfix: fetch the right device number which great than 255
Upstream-commit: b236a1e78d35a62b164d00f4e19f59a556da8831
Component: engine
2019-06-17 12:27:17 -07:00
1b706a11a2 Merge pull request #276 from thaJeztah/18.09_backport_enable_new_integration_tests_for_win
[18.09 backport] Enable integrations API tests for Windows CI
Upstream-commit: 49a4899c79f740e5a8e19df62ea341be9d5200be
Component: engine
2019-06-17 12:26:34 -07:00
75aeb78955 Merge pull request #242 from thaJeztah/18.09_swagger_fixes
[18.09 backport] Swagger fixes
Upstream-commit: 556456701d1bd69a20f62d68d22257b8a6ad71c0
Component: engine
2019-06-17 12:24:38 -07:00
6a5e7a9ed6 Merge pull request #263 from thaJeztah/18.09_backport_39290alternate
[18.09 backport] Windows: Don't attempt detach VHD for R/O layers
Upstream-commit: ab9db72ae809597b5fb7a9e245f18fa3f99857ec
Component: engine
2019-06-17 12:23:41 -07:00
7551e66a79 Merge pull request #250 from thaJeztah/18.09_backport_fix_fix_win_tmp
[18.09 backport] Windows CI - Corrected LOCALAPPDATA location
Upstream-commit: d86fe18fc243c9d505403d50264a6db90e68e721
Component: engine
2019-06-17 12:23:09 -07:00
3317a78c8e Merge pull request #237 from thaJeztah/18.09_backport_remove_TestSearchCmdOptions
[18.09 backport] Remove TestSearchCmdOptions test
Upstream-commit: 87c3750877aec0288945231af20362edc26c7a70
Component: engine
2019-06-17 12:16:19 -07:00
b488dc3c6e Merge pull request #246 from thaJeztah/18.09_backport_log-daemon-exit-before-tests-finish
[18.09 backport] Ensure all integration daemon logging happens before test exit
Upstream-commit: 08f6e9c14fd0de408db93914058d75df5b32ac67
Component: engine
2019-06-17 12:15:43 -07:00
a99bdf7fc2 Merge pull request #269 from thaJeztah/18.09_backport_test_fixes
[18.09 backport] Harden TestPsListContainersFilterExited
Upstream-commit: 6799eea8c80b506aeae54c1331b4b2ad834920bd
Component: engine
2019-06-17 12:15:02 -07:00
20e962774c Merge pull request #233 from thaJeztah/18.09_backport_update_seccomp_test_for_aarch64
[18.09 backport] Update TestRunWithDaemonDefaultSeccompProfile for ARM64
Upstream-commit: 6809464a6395699b687fa0f0dfa190aa1d6d6547
Component: engine
2019-06-17 12:13:46 -07:00
0fafb25ad4 Merge pull request #245 from thaJeztah/18.09_backport_allow_version_overwrite
[18.09 backport] Add ability to override the version in make.ps1
Upstream-commit: f07e4693278434c112870d30d80ad984bc79e527
Component: engine
2019-06-17 12:11:50 -07:00
1cd53e2273 Merge pull request #243 from thaJeztah/18.09_skip_test_info_warnings
[18.09 backport] Skip TestInfoAPIWarnings on remote daemons
Upstream-commit: 8ec9dcfad74d349f62233c9ba053535dbd6f1405
Component: engine
2019-06-17 12:11:14 -07:00
422c678575 Merge pull request #262 from kolyshkin/18.09-backport-aufs-lock
[18.09 backport ENGCORE-830] aufs optimizations #39107
Upstream-commit: 95d8b395a981bf09e9c10eac06efed9ed44ee456
Component: engine
2019-06-17 11:57:12 -07:00
0e2a6eacdc Merge pull request #248 from thaJeztah/18.09_backport_aufs_fixes
[18.09 backport ENGCORE-830] layer store optimizations
Upstream-commit: 6b1354c52b94b7ace081d8e36abf71f6056d75f8
Component: engine
2019-06-17 11:56:50 -07:00
2db111a869 bump runc binary v1.0.0-rc8
full diff: 029124da7a...425e105d5a

- opencontainers/runc#2043 Vendor in latest selinux code for keycreate errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4bc310c11babd2aa635eb08a5bbc198f96bc19b3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1a1bf23d17e44d22ebec2b1d0e38329bd35b0127
Component: engine
2019-06-14 13:42:53 +02:00
0c07852c42 Update runc 029124da7af7360afa781a0234d1b083550f797c
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
(cherry picked from commit d43a41d7af7c4858e4b2ed41775c34b92cd35179)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ce875b746bdcc37ff1c92dc181c78ba619d02d24
Component: engine
2019-06-14 13:42:46 +02:00
927d42432e Update containerd v1.2.6
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
(cherry picked from commit 8092cfb6e7396e0c5fc319b86ce9dca2246210f2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ae2ec3fbe75886d8d73f93c46ced33258d86929
Component: engine
2019-06-14 13:42:42 +02:00
dd8eddb4df Bump golang 1.11.11
go1.11.11 (released 2019/06/11) includes a fix to the crypto/x509 package.
See the Go 1.11.11 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.11

full diff: https://github.com/golang/go/compare/go1.11.10...go1.11.11

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9bd840b234
Component: cli
2019-06-14 12:55:09 +02:00
692e7c8cb9 Bump Golang 1.11.10
go1.11.10 (released 2019/05/06) includes fixes to the runtime and the linker.
See the Go 1.11.10 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.10

Full diff: https://github.com/golang/go/compare/go1.11.9...go1.11.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b8fe5cea3d
Component: cli
2019-06-14 12:53:40 +02:00
0e0ce7c2e9 Bump Golang 1.11.9
go1.11.9 (released 2019/04/11) fixes an issue where using the prebuilt
binary releases on older versions of GNU/Linux led to failures when linking
programs that used cgo. Only Linux users who hit this issue need to update.

See golang/go#31293 for details

Full diff: https://github.com/golang/go/compare/go1.11.8...go1.11.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1b3ed84535
Component: cli
2019-06-14 12:53:34 +02:00
26819ff0ff [18.09] Bump Golang 1.11.7
go1.11.7 (released 2019/04/05) includes fixes to the runtime and the net
packages. See the Go 1.11.7 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.11.7

Full diff: https://github.com/golang/go/compare/go1.11.6...go1.11.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 85a73e440e
Component: cli
2019-06-14 12:53:31 +02:00
4e4eee19c9 Bump Golang 1.11.6
go1.11.6 (released 2019/03/14) includes fixes to cgo, the compiler, linker,
runtime, go command, and the crypto/x509, encoding/json, net, and net/url
packages. See the Go 1.11.6 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1500105975)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9959062d9a
Component: cli
2019-06-14 12:53:27 +02:00
7bdc68cd32 Bump Golang 1.11.5 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e9d1d3b07)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dcc8f14cad
Component: cli
2019-06-14 12:53:24 +02:00
73bc01b037 Bump Golang 1.11.4 (includes fix for CVE-2018-16875)
go1.11.4 (released 2018/12/14) includes fixes to cgo, the compiler, linker,
runtime, documentation, go command, and the net/http and go/types packages. It
includes a fix to a bug introduced in Go 1.11.3 that broke go get for import
path patterns containing "...".

See the Go 1.11.4 milestone for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.4+label%3ACherryPickApproved

go1.11.3 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.11.3 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit deaf6e13ab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a378a00954
Component: cli
2019-06-14 12:53:21 +02:00
f03dd88c90 Bump Go to 1.11.2
go1.11.2 (released 2018/11/02) includes fixes to the compiler, linker,
documentation, go command, and the database/sql and go/types packages.

See the milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 58f0bfcf51)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 534c774fab
Component: cli
2019-06-14 12:53:18 +02:00
71c0f34060 Use a go build cache to speed up builds.
With a docker build cache already primed with the build image I am seeing
`time make build -f docker.Makefile DOCKER_BUILDKIT=1 GO_BUILD_CACHE=n` takes
more than 1 minute.

By contrast `time make build -f docker.Makefile DOCKER_BUILDKIT=1
GO_BUILD_CACHE=y` takes less than 10s with a hot cache irrespective of whether
the source tree has changed

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit d5de8358f0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c1c4b46f29
Component: cli
2019-06-14 12:53:15 +02:00
93eb5300f8 build: Add a fmt target which runs gofmt on all files.
Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 7c8ee78eaf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: db7875928c
Component: cli
2019-06-14 12:53:10 +02:00
1b195edabf Do not patch Dockerfiles in CI
When building the Dockerfiles for development, those images are mainly used to
create a reproducible build-environment. The source code is bind-mounted into
the image at runtime; there is no need to create an image with the actual
source code, and copying the source code into the image would lead to a new
image being created for each code-change (possibly leading up to many "dangling"
images for previous code-changes).

However, when building (and using) the development images in CI, bind-mounting
is not an option, because the daemon is running remotely.

To make this work, the circle-ci script patched the Dockerfiles when CI is run;
adding a `COPY` to the respective Dockerfiles.

Patching Dockerfiles is not really a "best practice" and, even though the source
code does not and up in the image, the source would still be _sent_ to the daemon
for each build (unless BuildKit is used).

This patch updates the makefiles, circle-ci script, and Dockerfiles;

- When building the Dockerfiles locally, pipe the Dockerfile through stdin.
  Doing so, prevents the build-context from being sent to the daemon. This speeds
  up the build, and doesn't fill up the Docker "temp" directory with content that's
  not used
- Now that no content is sent, add the COPY instructions to the Dockerfiles, and
  remove the code in the circle-ci script to "live patch" the Dockerfiles.

Before this patch is applied (with cache):

```
$ time make -f docker.Makefile build_shell_validate_image
docker build -t docker-cli-shell-validate -f ./dockerfiles/Dockerfile.shellcheck .
Sending build context to Docker daemon     41MB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

2.75 real         0.45 user         0.56 sys
```

After this patch is applied (with cache)::

```
$ time make -f docker.Makefile build_shell_validate_image
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t docker-cli-shell-validate -
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

0.33 real         0.07 user         0.08 sys
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 166856ab1b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 206ea57da8
Component: cli
2019-06-14 12:53:07 +02:00
19a658ee39 gofmt with go-1.11
gofmt/goimports changed some heuristics in 1.11 and the code is now
formatted slightly differently.

No functional change, just whitespace.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 906c2d161a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: edbc0e0613
Component: cli
2019-06-14 12:53:04 +02:00
d81b1cb7eb Bump Go to 1.11.1
Release notes: https://golang.org/doc/devel/release.html#go1.11

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9412739186)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dbd66addb9
Component: cli
2019-06-14 12:53:01 +02:00
38a4a307e2 scripts/build/osx: set CXX, too
In case go build will see a need to call C++ (rather than C)
compiler, CXX env var need to be properly set (to osxcross wrapper).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ee461303f9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f9a42a4024
Component: cli
2019-06-14 12:52:58 +02:00
ff6fb95074 cli/registry: fix a Debugf statement
Fix this warning from go-1.11

> cli/registry/client/fetcher.go:234: Debugf format %s has arg
> repoEndpoint of wrong type client.repositoryEndpoint

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 51848bf3bb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a13ec91543
Component: cli
2019-06-14 12:52:55 +02:00
c82a61bcb3 Enable integrations API tests for Windows CI
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 2f22247cad9237d255a4b541a974705802abdad8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 69503ef832fed199e28ccfd731281a4e439a8eeb
Component: engine
2019-06-12 10:15:29 +02:00
223d3e0c75 fix: fix lack of copyUIDGID in swagger.yaml
Signed-off-by: Zhang Yue <zy675793960@yeah.net>
Signed-off-by: zhangyue <zy675793960@yeah.net>
(cherry picked from commit a4f828cb8905f42c8b8975ce88e4d7aa8cd9bf74)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 705cc95eb1247c1983c39477f2ecf5cb4eb5edbb
Component: engine
2019-06-07 14:38:39 +02:00
861c5d670e API: Set format of body parameter in operation PutContainerArchive to "binary"
Signed-off-by: Dominic Tubach <dominic.tubach@to.com>
(cherry picked from commit fa6f63e79b60d971460ee1fb8d449bdccc66cdfe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c3bf976a20ae18b628247088ff9935ce615337b8
Component: engine
2019-06-07 14:38:27 +02:00
3e919def47 Update docs to remove restriction of tty resize
Signed-off-by: Adam Dobrawy <naczelnik@jawnosc.tk>
(cherry picked from commit 4898f493d86129684c29d6cdfc6f65b49eb2ed29)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2d1aa033a38e6a8b44b4a55a9285ebd80908e725
Component: engine
2019-06-07 14:38:21 +02:00
02856b256b API: Move "x-nullable: true" from type PortBinding to type PortMap
Currently the API spec would allow `"443/tcp": [null]`, but what should
be allowed is `"443/tcp": null`
Signed-off-by: Dominic Tubach <dominic.tubach@to.com>
(cherry picked from commit 32b5d296ea5d392c28affe2854b9d4201166bc27)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3ee1e060fc9a31844064035cc3e8b76fddb8b341
Component: engine
2019-06-07 14:38:18 +02:00
f29ee03a99 API: Change type of RemotrAddrs to array of strings in operation SwarmJoin
Signed-off-by: Dominic Tubach <dominic.tubach@to.com>
(cherry picked from commit d5f6bdb027596b44244a6ce50555664b3a5ee4a7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d359834555628f67693cdf7eda246835b659a41c
Component: engine
2019-06-07 14:38:16 +02:00
2271e6653d Harden TestPsListContainersFilterExited
This test runs on a daemon also used by other tests
so make sure we don't get failures if another test
doesn't cleanup or is running in parallel.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 915acffdb4cf95b934dd9872c1f54ea4487819b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 05599804157a38db2eda84d3e8060a879b755ab7
Component: engine
2019-06-07 14:32:51 +02:00
0041943819 aufs: retry auplink flush
Running a bundled aufs benchmark sometimes results in this warning:

> WARN[0001] Couldn't run auplink before unmount /tmp/aufs-tests/aufs/mnt/XXXXX  error="exit status 22" storage-driver=aufs

If we take a look at what aulink utility produces on stderr, we'll see:

> auplink:proc_mnt.c:96: /tmp/aufs-tests/aufs/mnt/XXXXX: Invalid argument

and auplink exits with exit code of 22 (EINVAL).

Looking into auplink source code, what happens is it tries to find a
record in /proc/self/mounts corresponding to the mount point (by using
setmntent()/getmntent_r() glibc functions), and it fails.

Some manual testing, as well as runtime testing with lots of printf
added on mount/unmount, as well as calls to check the superblock fs
magic on mount point (as in graphdriver.Mounted(graphdriver.FsMagicAufs, target)
confirmed that this record is in fact there, but sometimes auplink
can't find it. I was also able to reproduce the same error (inability
to find a mount in /proc/self/mounts that should definitely be there)
using a small C program, mocking what `auplink` does:

```c
 #include <stdio.h>
 #include <err.h>
 #include <mntent.h>
 #include <string.h>
 #include <stdlib.h>

int main(int argc, char **argv)
{
	FILE *fp;
	struct mntent m, *p;
	char a[4096];
	char buf[4096 + 1024];
	int found =0, lines = 0;

	if (argc != 2) {
		fprintf(stderr, "Usage: %s <mountpoint>\n", argv[0]);
		exit(1);
	}

	fp = setmntent("/proc/self/mounts", "r");
	if (!fp) {
		err(1, "setmntent");
	}
	setvbuf(fp, a, _IOLBF, sizeof(a));
	while ((p = getmntent_r(fp, &m, buf, sizeof(buf)))) {
		lines++;
		if (!strcmp(p->mnt_dir, argv[1])) {
			found++;
		}
	}
	printf("found %d entries for %s (%d lines seen)\n", found, argv[1], lines);
	return !found;
}
```

I have also wrote a few other C proggies -- one that reads
/proc/self/mounts directly, one that reads /proc/self/mountinfo instead.
They are also prone to the same occasional error.

It is not perfectly clear why this happens, but so far my best theory
is when a lot of mounts/unmounts happen in parallel with reading
contents of /proc/self/mounts, sometimes the kernel fails to provide
continuity (i.e. it skips some part of file or mixes it up in some
other way). In other words, this is a kernel bug (which is probably
hard to fix unless some other interface to get a mount entry is added).

Now, there is no real fix, and a workaround I was able to come up
with is to retry when we got EINVAL. It usually works on the second
attempt, although I've once seen it took two attempts to go through.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ae431b10a9508e2bf3b1782e9d435855e3e13977)
Upstream-commit: c303e63ca6c3d25d29b8992451898734fa6e4e7c
Component: engine
2019-06-05 11:51:00 -07:00
c70089ebb3 aufs.Cleanup: optimize
Do not use filepath.Walk() as there's no requirement to recursively
go into every directory under mnt -- a (non-recursive) list of
directories in mnt is sufficient.

With filepath.Walk(), in case some container will fail to unmount,
it'll go through the whole container filesystem which is both
excessive and useless.

This is similar to commit f1a459229724f5e8e440b49f ("devmapper.shutdown:
optimize")

While at it, raise the priority of "unmount error" message from debug
to a warning. Note we don't have to explicitly add `m` as unmount error (from
pkg/mount) will have it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8fda12c6078ed5c86be0822a7a980c6fbc9220bf)
Upstream-commit: b85d4a4f09badf40201ef7fcbd5b930de216190d
Component: engine
2019-06-05 11:51:00 -07:00
3b8f3b67f2 aufs: optimize lots of layers case
In case there are a big number of layers, so that mount data won't fit
into a single memory page (4096 bytes on most platforms, which is good
enough for about 40 layers, depending on how long graphdriver root path
is), we supply additional layers with O_REMOUNT, as described in aufs
documentation.

Problem is, the current implementation does that one layer at a time
(i.e. there is one mount syscall per each additional layer).

Optimize the code to supply as many layers as we can fit in one page
(basically reusing the same code as for the original mount).

Note, per aufs docs, "[a]t remount-time, the options are interpreted
in the given order, e.g. left to right" so we should be good.

Tested on an image with ~100 layers.

Before (35 syscalls):
> [pid 22756] 1556919088.686955 mount("none", "/mnt/volume_sfo2_09/docker-aufs/aufs/mnt/a86f8c9dd0ec2486293119c20b0ec026e19bbc4d51332c554f7cf05d777c9866", "aufs", 0, "br:/mnt/volume_sfo2_09/docker-au"...) = 0 <0.000504>
> [pid 22756] 1556919088.687643 mount("none", "/mnt/volume_sfo2_09/docker-aufs/aufs/mnt/a86f8c9dd0ec2486293119c20b0ec026e19bbc4d51332c554f7cf05d777c9866", 0xc000c451b0, MS_REMOUNT, "append:/mnt/volume_sfo2_09/docke"...) = 0 <0.000105>
> [pid 22756] 1556919088.687851 mount("none", "/mnt/volume_sfo2_09/docker-aufs/aufs/mnt/a86f8c9dd0ec2486293119c20b0ec026e19bbc4d51332c554f7cf05d777c9866", 0xc000c451ba, MS_REMOUNT, "append:/mnt/volume_sfo2_09/docke"...) = 0 <0.000098>
> ..... (~30 lines skipped for clarity)
> [pid 22756] 1556919088.696182 mount("none", "/mnt/volume_sfo2_09/docker-aufs/aufs/mnt/a86f8c9dd0ec2486293119c20b0ec026e19bbc4d51332c554f7cf05d777c9866", 0xc000c45310, MS_REMOUNT, "append:/mnt/volume_sfo2_09/docke"...) = 0 <0.000266>

After (2 syscalls):
> [pid 24352] 1556919361.799889 mount("none", "/mnt/volume_sfo2_09/docker-aufs/aufs/mnt/8e7ba189e347a834e99eea4ed568f95b86cec809c227516afdc7c70286ff9a20", "aufs", 0, "br:/mnt/volume_sfo2_09/docker-au"...) = 0 <0.001717>
> [pid 24352] 1556919361.801761 mount("none", "/mnt/volume_sfo2_09/docker-aufs/aufs/mnt/8e7ba189e347a834e99eea4ed568f95b86cec809c227516afdc7c70286ff9a20", 0xc000dbecb0, MS_REMOUNT, "append:/mnt/volume_sfo2_09/docke"...) = 0 <0.001358>

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit d58c434bffef76e48bff75ede290937874488dd3)
Upstream-commit: 75488521735325e4564e66d9cf9c2b1bc1c2c64b
Component: engine
2019-06-05 11:51:00 -07:00
5ada897229 aufs: add lock around mount
Apparently there is some kind of race in aufs kernel module code,
which leads to the errors like:

[98221.158606] aufs au_xino_create2:186:dockerd[25801]: aufs.xino create err -17
[98221.162128] aufs au_xino_set:1229:dockerd[25801]: I/O Error, failed creating xino(-17).
[98362.239085] aufs au_xino_create2:186:dockerd[6348]: aufs.xino create err -17
[98362.243860] aufs au_xino_set:1229:dockerd[6348]: I/O Error, failed creating xino(-17).
[98373.775380] aufs au_xino_create:767:dockerd[27435]: open /dev/shm/aufs.xino(-17)
[98389.015640] aufs au_xino_create2:186:dockerd[26753]: aufs.xino create err -17
[98389.018776] aufs au_xino_set:1229:dockerd[26753]: I/O Error, failed creating xino(-17).
[98424.117584] aufs au_xino_create:767:dockerd[27105]: open /dev/shm/aufs.xino(-17)

So, we have to have a lock around mount syscall.

While at it, don't call the whole Unmount() on an error path, as
it leads to bogus error from auplink flush.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 5cd62852fa199f272b542d828c8c5d1db427ea53)
Upstream-commit: bb4b9fe29eba57ed71d8105ec0e5dacc8e72129e
Component: engine
2019-06-05 11:51:00 -07:00
5db6e4ad9b aufs: aufsMount: better errors for unix.Mount()
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 5873768dbe3be2733874b8cf68cb492817f81a94)
Upstream-commit: 4ab3020e8df18b5c12c668df6ef3e21b648ce04b
Component: engine
2019-06-05 11:51:00 -07:00
4fdc82012a aufs: use mount.Unmount
1. Use mount.Unmount() which ignores EINVAL ("not mounted") error,
and provides better error diagnostics (so we don't have to explicitly
add target to error messages).

2. Since we're ignoring "not mounted" error, we can call
multiple unmounts without any locking -- but since "auplink flush"
is still involved and can produce an error in logs, let's keep
the check for fs being mounted (it's just a statfs so should be fast).

2. While at it, improve the "can't unmount" error message in Put().

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 4beee98026feabe4f4f0468215b8fd9b56f90d5e)
Upstream-commit: 5b68d00abc4cad8b707a9a01dde9a420ca6eb995
Component: engine
2019-06-05 11:51:00 -07:00
a829a04518 aufs: remove extra locking
Both mount and unmount calls are already protected by fine-grained
(per id) locks in Get()/Put() introduced in commit fc1cf1911bb
("Add more locking to storage drivers"), so there's no point in
having a global lock in mount/unmount.

The only place from which unmount is called without any locking
is Cleanup() -- this is to be addressed in the next patch.

This reverts commit 824c24e6802ad3ed7e26b4f16e5ae81869b98185.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f93750b2c4d5f6144f0790ffa89291da3c097b80)
Upstream-commit: 701939112efc71a0c867a626f0a56df9c56030db
Component: engine
2019-06-05 11:51:00 -07:00
e03614a156 aufs: get rid of mount()
The function is not needed as it's just a shallow wrapper around
unix.Mount().

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 2f98b5f51fb0a21e1bd930c0e660c4a7c4918aa5)
Upstream-commit: 023b63a0f276b79277c1c961d8c98d4d5b39525d
Component: engine
2019-06-05 11:51:00 -07:00
c81448bb56 pkg/mount: wrap mount/umount errors
The errors returned from Mount and Unmount functions are raw
syscall.Errno errors (like EPERM or EINVAL), which provides
no context about what has happened and why.

Similar to os.PathError type, introduce mount.Error type
with some context. The error messages will now look like this:

> mount /tmp/mount-tests/source:/tmp/mount-tests/target, flags: 0x1001: operation not permitted

or

> mount tmpfs:/tmp/mount-test-source-516297835: operation not permitted

Before this patch, it was just

> operation not permitted

[v2: add Cause()]
[v3: rename MountError to Error, document Cause()]
[v4: fixes; audited all users]
[v5: make Error type private; changes after @cpuguy83 reviews]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 65331369617e89ce54cc9be080dba70f3a883d1c)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7f1c6bf5a745c8faeba695d3556dff4c4ff5f473
Component: engine
2019-06-05 11:50:50 -07:00
a76550469d Stop sorting uid and gid ranges in id maps
Moby currently sorts uid and gid ranges in id maps. This causes subuid
and subgid files to be interpreted wrongly.

The subuid file

```
> cat /etc/subuid
jonas:100000:1000
jonas:1000:1
```

configures that the container uids 0-999 are mapped to the host uids
100000-100999 and uid 1000 in the container is mapped to uid 1000 on the
host. The expected uid_map is:

```
> docker run ubuntu cat /proc/self/uid_map
         0     100000       1000
      1000       1000          1
```

Moby currently sorts the ranges by the first id in the range. Therefore
with the subuid file above the uid 0 in the container is mapped to uid
100000 on host and the uids 1-1000 in container are mapped to the uids
1-1000 on the host. The resulting uid_map is:

```
> docker run ubuntu cat /proc/self/uid_map
         0       1000          1
         1     100000       1000
```

The ordering was implemented to work around a limitation in Linux 3.8.
This is fixed since Linux 3.9 as stated on the user namespaces manpage
[1]:

> In the initial implementation (Linux 3.8), this requirement was
> satisfied by a simplistic implementation that imposed the further
> requirement that the values in both field 1 and field 2 of successive
> lines must be in ascending numerical order, which prevented some
> otherwise valid maps from being created.  Linux 3.9 and later fix this
> limitation, allowing any valid set of nonoverlapping maps.

This fix changes the interpretation of subuid and subgid files which do
not have the ids of in the numerical order for each individual user.
This breaks users that rely on the current behaviour.

The desired mapping above - map low user ids in the container to high
user ids on the host and some higher user ids in the container to lower
user on host - can unfortunately not archived with the current
behaviour.

[1] http://man7.org/linux/man-pages/man7/user_namespaces.7.html

Signed-off-by: Jonas Dohse <jonas@dohse.ch>
(cherry picked from commit c4628d79d26c47bfbac9a3b22d684ee5fd78973c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 601f11300ed9995ae1d9117a52fd38b3e86563d8
Component: engine
2019-06-05 14:46:31 +02:00
bb4beac3ed Windows: Don't attempt detach VHD for R/O layers
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 293c74ba79f0008f48073985507b34af59b45fa6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 91f5be57af815df372371e1e989d00963ce4d02f
Component: engine
2019-06-05 14:45:21 +02:00
e213748382 pkg/mount: refactor Unmount()
It has been pointed out that we're ignoring EINVAL from umount(2)
everywhere, so let's move it to a lower-level function. Also, its
implementation should be the same for any UNIX incarnation, so
let's consolidate it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 90be078fe59a8cfeff2bcc5dc2f34a00309837b6)
Upstream-commit: 47c51447e1b6dacf92b40574f6f929958ca9d621
Component: engine
2019-06-04 15:22:52 -07:00
51371cb252 fix typo
Signed-off-by: Omri Shiv <Omri.Shiv@teradata.com>
(cherry picked from commit fe1083d4622658e9e5bf7319d0f94873019fced2)
Upstream-commit: b941f081523cce7defafd4457f380442e10fa345
Component: engine
2019-06-04 15:22:46 -07:00
6f78462c1a UnmountIpcMount: simplify
As standard mount.Unmount does what we need, let's use it.

In addition, this adds ignoring "not mounted" condition, which
was previously implemented (see PR#33329, commit cfa2591d3f26)
via a very expensive call to mount.Mounted().

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 77bc327e24a60791fe7e87980faf704cf7273cf9)
Upstream-commit: 893b24b80db170279d5c9532ed508a81c328de5e
Component: engine
2019-06-04 15:21:22 -07:00
c38f3f8cb2 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-06-04 19:28:43 +00:00
0e24f5bcda Merge pull request #253 from thaJeztah/18.09_backport_root_dir_on_copy
[18.09 backport] Pass root to chroot to for chroot Tar/Untar (CVE-2018-15664)
Upstream-commit: 72797601723f6a8847027a1abbd1a3cea2667718
Component: engine
2019-06-04 11:20:10 -07:00
741575eb38 Increase max recv gRPC message size for nodes and secrets
Increases the max recieved gRPC message size for Node and Secret list
operations. This has already been done for the other swarm types, but
was not done for these.

Signed-off-by: Drew Erny <drew.erny@docker.com>
(cherry picked from commit a0903e1fa3eca32065c7dbfda8d1e0879cbfbb8f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a987f31fbc42526bf2cccf1381066f075b18dfe0
Component: engine
2019-06-03 23:01:33 +02:00
7432dfa749 Add chroot for tar packing operations
Previously only unpack operations were supported with chroot.
This adds chroot support for packing operations.
This prevents potential breakouts when copying data from a container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 3029e765e241ea2b5249868705dbf9095bc4d529)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 61e0459053c359e322b8d5c017e855f616fd34c0
Component: engine
2019-06-03 18:55:00 +02:00
23dc194c07 Pass root to chroot to for chroot Untar
This is useful for preventing CVE-2018-15664 where a malicious container
process can take advantage of a race on symlink resolution/sanitization.

Before this change chrootarchive would chroot to the destination
directory which is attacker controlled. With this patch we always chroot
to the container's root which is not attacker controlled.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit d089b639372a8f9301747ea56eaf0a42df24016a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 155939994f453559676656bc4b05635e83ebef56
Component: engine
2019-06-03 18:54:52 +02:00
edfabc9b63 Windows CI - Corrected LOCALAPPDATA location
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 61815f676391ca24bbbdf3cebcb47cefad404035)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d0beadc90cc797d9a05d29b880a3c8ece5f8bca8
Component: engine
2019-06-03 11:25:17 +02:00
eb642be989 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-05-29 05:01:11 +00:00
976198fed5 Merge pull request #219 from thaJeztah/18.09_backport_pull_progress_fix
[18.09 backport] builder-next: call stopprogress on download error
Upstream-commit: 532777f1ec3948333fe611f7dba5dfe144e9d267
Component: engine
2019-05-28 18:16:29 -07:00
54fc4d2158 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-05-28 16:59:41 +00:00
86dd4d5860 Merge pull request #227 from joeabbey/18.09_backport_NilIPToZero
[18.09] Backport Forcing a nil IP specified in PortBindings to IPv4 zero (0.0.0.0).
Upstream-commit: c882c0011f0857da5e8cef1ea48e0aa80019abf1
Component: engine
2019-05-28 10:32:21 -04:00
e0456faac2 layer: protect from same-name races
As pointed out by Tonis, there's a race between ReleaseRWLayer()
and GetRWLayer():

```
----- goroutine 1 -----               ----- goroutine 2 -----
ReleaseRWLayer()
  m := ls.mounts[l.Name()]
  ...
  m.deleteReference(l)
  m.hasReferences()
  ...                                 GetRWLayer()
  ...                                   mount := ls.mounts[id]
  ls.driver.Remove(m.mountID)
  ls.store.RemoveMount(m.name)          return mount.getReference()
  delete(ls.mounts, m.Name())
-----------------------               -----------------------
```

When something like this happens, GetRWLayer will return
an RWLayer without a storage. Oops.

There might be more races like this, and it seems the best
solution is to lock by layer id/name by using pkg/locker.

With this in place, name collision could not happen, so remove
the part of previous commit that protected against it in
CreateRWLayer (temporary nil assigmment and associated rollback).

So, now we have
* layerStore.mountL sync.Mutex to protect layerStore.mount map[]
  (against concurrent access);
* mountedLayer's embedded `sync.Mutex` to protect its references map[];
* layerStore.layerL (which I haven't touched);
* per-id locker, to avoid name conflicts and concurrent operations
  on the same rw layer.

The whole rig seems to look more readable now (mutexes use is
straightforward, no nested locks).

Reported-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit af433dd200f8287305b1531d5058780be36b7e2e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1ebe324c6a481de86a5b84494057a639773624f1
Component: engine
2019-05-25 22:34:47 +02:00
8b3a1bef0d layer/CreateRWLayerByGraphID: remove
This is an additon to commit 1fea38856a ("Remove v1.10 migrator")
aka PR #38265. Since that one, CreateRWLayerByGraphID() is not
used anywhere, so let's drop it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b4e9b507655e7dbdfb44d4ee284dcd658b859b3f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1576eaba3357b7aab5121b51b9ebc34e731082fe
Component: engine
2019-05-25 22:34:39 +02:00
89f76f3cc6 layer: optimize layerStore mountL
Goroutine stack analisys shown some lock contention
while doing massively (100 instances of `docker rm`)
parallel image removal, with many goroutines waiting
for the mountL mutex. Optimize it.

With this commit, the above operation is about 3x
faster, with no noticeable change to container
creation times (tested on aufs and overlay2).

kolyshkin@:
- squashed commits
- added description
- protected CreateRWLayer against name collisions by
temporary assiging nil to ls.mounts[name], and treating
nil as "non-existent" in all the other functions.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 05250a4f0094e6802dd7d338d632ea632d0c7e34)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 78cbf4d1388a4eef155f08da0d2422e3a2cad11f
Component: engine
2019-05-25 22:34:30 +02:00
d6aaa8daf1 layer: protect mountedLayer.references
Add a mutex to protect concurrent access to mountedLayer.references map.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f73b5cb4e8b9a23ad6700577840582d66017a733)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb80a60be2a9236b0db27222310f568e1d3fba11
Component: engine
2019-05-25 22:34:21 +02:00
38b3e62527 Ensure all integration daemon logging happens before test exit
As of Go 1.12, the `testing` package panics if a goroutine logs to a
`testing.T` after the relevant test has completed. This was not
documented as a change at all; see the commit
95d06ab6c982f58b127b14a52c3325acf0bd3926 in the Go repository for the
relevant change.

At any point in the integration tests, tests could panic with the
message "Log in goroutine after TEST_FUNCTION has completed". This was
exacerbated by less direct logging I/O, e.g. running `make test` with
its output piped instead of attached to a TTY.

The most common cause of panics was that there was a race condition
between an exit logging goroutine and the `StopWithError` method:
`StopWithError` could return, causing the calling test method to return,
causing the `testing.T` to be marked as finished, before the goroutine
could log that the test daemon had exited. The fix is simple: capture
the result of `cmd.Wait()`, _then_ log, _then_ send the captured
result over the `Wait` channel. This ensures that the message is
logged before `StopWithError` can return, blocking the test method
so that the target `testing.T` is not marked as finished.

Signed-off-by: Daniel Sweet <danieljsweet@icloud.com>
(cherry picked from commit 7546322e994c4a23ea3cae0cf0a2a8019de12c03)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b2168eec8b37619a1d28d0bb44cf052d4f9883c7
Component: engine
2019-05-25 22:19:56 +02:00
8a99913336 Add ability to override the version in make.ps1
Checks for environment variable VERSION if it exists then it sets dockerVersion to VERSION

Signed-off-by: corbin-coleman <corbin.coleman@docker.com>
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit edc639e99f21d0dd814581858d02787c23ba1599)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 238951ac3a78a8517d7764de0f48b8ded28441e2
Component: engine
2019-05-25 22:15:41 +02:00
7f53e08190 image: do actual RootFS.DiffIDs copying in Clone()
append(newRoot.DiffIDs) without element does nothing,
so it's probably not what was intended. Changed code
to perform a slice copying instead.

Fixes #38834.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
(cherry picked from commit 3429e9993085520ac902fef2ef6aabd57080bd36)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1c755a73bfd63f63d6fe3363d8237f9db634633d
Component: engine
2019-05-25 22:11:07 +02:00
0c1bb16a07 Skip TestInfoAPIWarnings on remote daemons
This test starts a new daemon, which will fail when testing
against a remote daemon;

    --- FAIL: TestInfoAPIWarnings (0.00s)
        info_test.go:53: failed to start daemon with arguments [-H=0.0.0.0:23756 -H=unix:///tmp/docker-integration/d5153ebcf89ef.sock] : [d5153ebcf89ef] could not find docker binary in $PATH: exec: "dockerd": executable file not found in $PATH

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 056840c2a644cc37f91392103f5c3ae05d14a695)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5e024a2fcd10585611ab1ea792d0256c6477c87c
Component: engine
2019-05-25 22:06:36 +02:00
9a388b1aa0 Remove TestSearchCmdOptions test
This test is dependent on the search results returned by Docker Hub, which
can change at any moment, and causes this test to be unpredictable.

Removing this test instead of trying to catch up with Docker Hub any time
the results change, because it's effectively testing Docker Hub, and not
the daemon.

Unit tests are already in place to test the core functionality of the daemon,
so it should be safe to remove this test.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 21e662c77468d1e3fc4efaa049021e2ad0e49b4d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0d052bc40e908f1f596b0f16840b4e93fc6a9ec2
Component: engine
2019-05-23 10:55:50 +02:00
b6938b488f Fix error handling for bind mount spec parser.
Errors were being ignored and always telling the user that the path
doesn't exist even if it was some other problem, such as a permission
error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ebcef288343698dd86ff307f5b9c58aa52ce9fdd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0ac09de395d61d8cecdd6496aa3fb9ceb174f295
Component: engine
2019-05-23 01:12:00 +02:00
76f4d953bb Update TestRunWithDaemonDefaultSeccompProfile for ARM64
`chmod` is a legacy syscall, and not present on arm64, which
caused this test to fail.

Add `fchmodat` to the profile so that this test can run both
on x64 and arm64.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4bd8964b23f616a1aef63ea0acebbdc4b6ea90e6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1b642b8c45a734d4c2d9af2f6849289db556d003
Component: engine
2019-05-22 13:32:46 +02:00
2cb70024b7 Consider WINDOWS_BASE_IMAGE_TAG override when setting Windows base image for tests
Signed-off-by: Deep Debroy <ddebroy@docker.com>
(cherry picked from commit 15419d7ba09bb48dec59c73af51a0fd005eeb460)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fed2792d8570d50bb36572286dd84b23dd7fc08d
Component: engine
2019-05-21 17:02:37 +02:00
e6f07d611b [18.09] Backport Forcing a nil IP specified in PortBindings to IPv4 zero (0.0.0.0).
Signed-off-by: Joe Abbey <joe.abbey@gmail.com>
Upstream-commit: 73d06e603ef2704c317c3f41a06c40aa67b164ec
Component: engine
2019-05-21 08:31:55 -04:00
6752cc9f2f int-cli/TestSearchCmdOptions: fail earlier
Sometimes this test fails (allegedly due to problems with Docker Hub),
but it fails later than it should, for example:

> 01:20:34.845 assertion failed: expression is false: strings.Count(outSearchCmdStars, "[OK]") <= strings.Count(outSearchCmd, "[OK]"): The quantity of images with stars should be less than that of all images: <...>

This, with non-empty list of images following, means that the initial
`docker search busybox` command returned not enough results. So, add
a check that `docker search busybox` returns something.

While at it,
 * raise the number of stars to 10;
 * simplify check for number of lines (no need to count [OK]'s);
 * improve error message.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 4f80a1953d66265d9a1cbf4e172b8fa58e3e403a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8a369c735b2bf07da53275fe9fe61d429320f233
Component: engine
2019-05-21 12:50:36 +02:00
8852e9cdc4 bugfix: fetch the right device number which great than 255
Signed-off-by: frankyang <yyb196@gmail.com>
(cherry picked from commit b9f31912deb511e732763e4fa5ecd0208b104eb2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e4cf15b4f51b3b6ef380dbfe5061568bc84eece1
Component: engine
2019-05-21 12:12:48 +02:00
64a3cdad96 Switch swarmmode services to NanoCpu
Today `$ docker service create --limit-cpu` configures a containers
`CpuPeriod` and `CpuQuota` variables, this commit switches this to
configure a containers `NanoCpu` variable instead.

Signed-off-by: Olly Pomeroy <olly@docker.com>
(cherry picked from commit 8a60a1e14a5e98b7ed0fbea57369615a766a1ae9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 675f4256ae2b85556b4243da44ff627900660463
Component: engine
2019-05-21 11:16:59 +02:00
88cbe50698 builder-next: call stopprogress on download error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 91a57f3e7f5ed569f7b9d97d14de11bb324bb8e0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 77e30108bda9e3369edf33737d8b57c20594ec64
Component: engine
2019-05-20 15:26:49 +02:00
19e1ffb349 explicitly set filesystem type for mount to avoid 'invalid argument' error on arm
Signed-off-by: Jim Ehrismann <jim.ehrismann@docker.com>
(cherry picked from commit d7de1a8b9fffd90f9f6a81a28d28637dd2e3cda6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 51086aad82d7ed9bfaa504b52db7da8ed7d09032
Component: engine
2019-05-17 17:18:48 +02:00
b82179cd36 builder-next: fix gcr workaround token cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit cfce0acd332d7536f85356f99b99a920be6cda87)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7e4c2474c7858879bcdfa089ee82f311b0d71fe8
Component: engine
2019-05-07 15:54:12 -07:00
c9f96feac5 builder: add workaround for gcr auth issue
GCR does not currently support 401 response from blob endpoints.
This detects the case where no manifest requests have been
performed for the current resolver and does a dummy request
to enable authorization.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit bcd8298c35f53f79b42c6e089e8da114ddb5c57e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 21cce932b05a4b979359624668f7f09e83dc90cd
Component: engine
2019-05-07 15:38:48 -07:00
481bc77156 Merge pull request #602 from andrewhsu/1809ga
[18.09] bump ver 18.09.6
2019-05-03 18:58:04 -07:00
6528618694 bump ver 18.09.6
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-05-02 18:26:28 +00:00
669cb1c454 Merge pull request #601 from andrewhsu/1809rc1
[18.09] bump ver 18.09.6-rc1
2019-05-01 00:11:50 -07:00
e045956084 bump ver 18.09.6-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-05-01 07:08:57 +00:00
315e9a942d Merge component 'engine' from git@github.com:docker/engine 18.09 2019-04-23 21:01:20 +00:00
89a08e8974 Merge pull request #201 from andrewhsu/ln
[18.09] bump libnetwork 872f0a8
Upstream-commit: d2cfbce3f3b0e028562fc03178851a1c170099b5
Component: engine
2019-04-23 13:17:26 -07:00
bccb447c5e bump libnetwork 872f0a83c98add6cae255c8859e29532febc0039 (18.09 branch)
full diff: c9029898e3...872f0a83c9

- docker/libnetwork#2354 [18.09 backport] Cleanup the cluster provider when the agent is closed
  - backport of docker/libnetwork#2307 Fix for problem where agent is stopped and does not restart
  - fixes docker/for-linux#495 Docker swarm overlay networking not working after --force-new-cluster
- docker/libnetwork#2369 [18.09 BACKPORT] Pick a random host port if the user does not specify a host port
  - backport of docker/libnetwork#2368 (windows) Pick a random host port if the user does not specify a host port

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5354408039681020f9ad6afe4bf696fc90f9ce69
Component: engine
2019-04-23 16:51:31 +00:00
515ec0845e Merge pull request #198 from thaJeztah/18.09_backport_test_updates
[18.09 backport] test-fixes and updates, and fix images filter when use multi reference filter
Upstream-commit: 82a2b8882e5a9dc2ba4389f589ad28dc9cee0d57
Component: engine
2019-04-23 09:49:55 -07:00
3f0e4c75b0 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-04-22 01:06:45 +00:00
a1ca42a629 Merge pull request #191 from thaJeztah/18.09_backport_windows_ci_fixes
[18.09 backport] windows.ps1 fixes
Upstream-commit: e2352b11c7c1459a06dadf8045a7779ffaafa2ad
Component: engine
2019-04-22 00:28:49 +02:00
005488fdc5 bump tonistiigi/fsutil 2862f6bc5ac9b97124e552a5c108230b38a1b0ca
- tonistiigi/fsutil#54 walker: allow enotdir as enoent

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 278d30bceb
Component: cli
2019-04-20 13:22:11 +02:00
dc984ba0ef bump buildkit 05766c5c21a1e528eeb1c3522b2f05493fe9ac47 (docker-18.09 branch)
full diff: 520201006c..05766c5c21

- moby/buildkit#952 [18.09 backport] Have parser error on dockerfiles without instructions
  - backport of moby/buildkit#771 Have parser error on dockerfiles without instructions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 65b28186fc
Component: cli
2019-04-20 13:19:07 +02:00
2bb8a5be97 Use current windows servercore image
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
(cherry picked from commit aad7e9797b2e9a980b28d7d77bc119cb4b7e57dc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 04d0295c0cdfe3e67ab51ca611e3a7dd8a49b668
Component: engine
2019-04-18 18:06:44 +02:00
647deceb07 Improve 'no matching manifest' error
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
(cherry picked from commit 4b9db209fe7ed25736244bd2b56faf43a9f908dd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6099336ae61ca43cafe9420f3188c796cb0812bc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e4bc7d2fc05fcff4817f39e52b34b17a8f56cd9a
Component: engine
2019-04-18 18:05:04 +02:00
461407c57d Migrate some remaining Manifest V1 tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7e65b6978b9137dad8c2bf70c0812e4cb25ff25c
Component: engine
2019-04-18 00:26:43 +02:00
45b389fec8 Replace some checkers and assertions with gotest.tools
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6345208b9b067f19f7792edcc675f59a617a3ca5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9a4d7bb0e25169fa7d48e24777c683587c29c25a
Component: engine
2019-04-17 23:10:05 +02:00
9d8e7a0e24 Remove some checkers to discourage usage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 86f2ac4a6b5b746c3309b57e7e04bdbdb70d46d7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8fcca0be3f31e8296a3ceefcb10acca636673b15
Component: engine
2019-04-17 23:09:59 +02:00
ca79cb7afa Fix typo
Signed-off-by: Hiroyuki Sasagawa <hs19870702@gmail.com>
(cherry picked from commit a28843150a7e926006798369f0ac31f32f028e36)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 45dd95610a26bf4e1995bcc9ad814d60a7f3504a
Component: engine
2019-04-17 23:09:57 +02:00
b175e2d89e TestSwarmContainerEndpointOptions: fix debug
In case of failure, stale out was printed.

Fixes: 6212ea669b4e92b3

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1921753b4b30dcca4fe772e7c1b0bc3f7bb7cd62)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b60ecd32a1d3ba7debf02d15fe346ea5ca607bbd
Component: engine
2019-04-17 23:09:54 +02:00
aa5b904041 TestDaemonRestartIpcMode: modernize
Move the test case from integration-cli to integration.

The test logic itself has not changed, except these
two things:

* the new test sets default-ipc-mode via command line
  rather than via daemon.json (less code);
* the new test uses current API version.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9fd765f07cc08ccc2ea991d21835bf50ece9318b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b228a498d55fcd47c741d51a510a7f5eab0794f7
Component: engine
2019-04-17 23:09:51 +02:00
51a09b5116 integration: add/use WithRestartPolicy
NOTE TestUpdateRestartPolicy is left as is as otherwise
it will decrease its readability.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f664df01d1836686c7a8a917e9da81d56c758d74)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c546aace40872169b03e18f07294d3fbfa3d452
Component: engine
2019-04-17 23:09:48 +02:00
9659d7a8ac integration/internal/container/ops: rm unused code
Since container.Create() already initializes HostConfig
to be non-nil, there is no need for this code. Remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 17022b3ad2d95863e5acd17ebaf943b7761623cc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ed48a92a580b7ccc5c5837c7d802f787000146eb
Component: engine
2019-04-17 23:09:45 +02:00
00e3442134 TestUpdateRestartWithAutoRemove: use WithAutoRemove
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 39eaf1ef9709d79fc50095ee2a0546bd2f565ab2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f9823799281419aae1b30d961d5c719dd6e392e2
Component: engine
2019-04-17 23:09:43 +02:00
2794526c50 Make TestEventsFilterLabels less flaky
This test sometimes failed because the number of events received did not
match the expected number:

    FAIL: docker_cli_events_test.go:316: DockerSuite.TestEventsFilterLabels

    docker_cli_events_test.go:334:
        c.Assert(len(events), checker.Equals, 3)
    ... obtained int = 2
    ... expected int = 3

This patch makes the test more stable, by:

- use a wider range between `--since` and `--until`. These options were set
  so that the client detaches after events were received, but the actual
  range should not matter. Changing the range will cause more events to be
  returned, but we're specifically looking for the container ID's, so this
  should not make a difference for the actual test.
- use `docker create` instead of `docker run` for the containers. the
  containers don't have to be running to trigger an event; using `create`
  speeds up the test.
- check the exit code of the `docker create` to verify the containers were
  succesfully created.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e15c02465c87c82908bcc45b0c1d6bd38f27c32)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 26f7e0a8b08b2890d079d4083735c05377770ca8
Component: engine
2019-04-17 23:09:40 +02:00
463305c389 reduce flakiness of TestSwarmLockUnlockCluster and TestSwarmJoinPromoteLocked
I noticed that this test failed, because the node was in status "pending".

The test checks for the node's status immediately after it was restarted, so
possibly it needs some time to unlock.

    14:07:10 FAIL: docker_cli_swarm_test.go:1128: DockerSwarmSuite.TestSwarmLockUnlockCluster
    ...
    14:07:10 docker_cli_swarm_test.go:1168:
    14:07:10     checkSwarmLockedToUnlocked(c, d)
    14:07:10 docker_cli_swarm_test.go:1017:
    14:07:10     c.Assert(getNodeStatus(c, d), checker.Equals, swarm.LocalNodeStateActive)
    14:07:10 ... obtained swarm.LocalNodeState = "pending"
    14:07:10 ... expected swarm.LocalNodeState = "active"

This patch adds a `waitAndAssert` for the node's status, with a 1 second timeout.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 973ca00d60712ef644b5b37abf7fa01078bb4ade)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 954425f8bdb5db95355cb20be465d248f7c3b1f1
Component: engine
2019-04-17 23:09:37 +02:00
cfd34d85d8 Remove SameHostDaemon, use testEnv.IsLocalDaemon instead
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 43b15e924ffb7790ae087feac7618308a9e4b75e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3304d91f1e69b53e92240fd3c604d178b0601dd5
Component: engine
2019-04-17 23:09:35 +02:00
e887118a6e Remove unused ExperimentalDaemon, NotS390X, NotPausable requirement checks
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 362f737e1ccf9a1c3ac9599f48b10a33fd9b0e08)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 008cc8ee495d5f13d44764e906d92a8999f4c473
Component: engine
2019-04-17 23:09:32 +02:00
80b75da558 integration-cli/Test*Swarm*: use same args on restart
When starting docker daemons for swarm testing, we disable iptables
and use lo for communication (in order to avoid network conflicts).

The problem is, these options are lost on restart, that can lead
to any sorts of network conflicts and thus connectivity issues
between swarm nodes.

Fix this. This does not fix issues with swarm test failures, but
it seems they appear are less often after this one.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 2ed512c7faea938b0b07e69187b8a132e2ecb66a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 553b09684cb68962403ebdc5495fb548364f778f
Component: engine
2019-04-17 23:09:23 +02:00
de3e7fdf71 TestAPISwarmLeaderElection: add some debug
......

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 06afc2d1e6f8c5052af71e8815266d30e29ed664)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b498de10422c4d887c37ff1d51ac320e88151c8
Component: engine
2019-04-17 23:09:20 +02:00
3a2688e1e5 docker_cli_swarm_test: factor out common code
This is repeated 6 times in different tests, with slight
minor variations. Let's factor it out, for clarity.

While at it, simplify the code: instead of more complex
parsing of "docker swarm init|update --autolock" output (1)
and checking if the key is also present in
"docker swarm unlock-key" output (2), get the key
from (2) and check it is present in (1).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 24cbb9897193894f4716583d1861091ab2fa1ae2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ec991ec8371bdba94480c587eea6ea24f3e9d43
Component: engine
2019-04-17 23:09:17 +02:00
d81b3ef73b internal/test/daemon: don't leak timers
A timer is leaking on every daemon start and stop.
Probably nothing major, but given the amount of
daemon starts/stops during tests, it's better to
be accurate about it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 6016520162fdcb19f50d08c4f0b54b06a7a6eac0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 784a89354b118ef68f1f20fb4ff383c6282ea03c
Component: engine
2019-04-17 23:09:14 +02:00
84be354cdf docker_cli_swarm_test.go: rm unused arg
Since commit 17173efbe00 checkSwarmLockedToUnlocked() no longer
require its third argument, so remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 66cb1222d6559e120d9d1a29932aa778aa517894)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2a02a2e9dae0045d550e98fa849aceafc0c41a0e
Component: engine
2019-04-17 23:09:12 +02:00
b4531f8e24 integration-cli: fix netns test cleanup
1. Using MNT_FORCE flag does not make sense for nsfs. Using MNT_DETACH
though might help.

2. When -check.vv is added to TESTFLAGS, there are a lot of messages
like this one:

> unmount of /tmp/dxr/d847fd103a4ba/netns failed: invalid argument

and some like

> unmount of /tmp/dxr/dd245af642d94/netns failed: no such file or directory

The first one means directory is not a mount point, the second one
means it's gone. Do ignore both of these.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 73baee2dcf546b2561bdd9a500b0af08cb62b1be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 90cb9b6545fbf7f91cf3eb427f627a7353ea684f
Component: engine
2019-04-17 23:09:09 +02:00
8c5907db72 TestStartReturnCorrectExitCode: show error
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 0d59f4305cbb1aaae1b0c6aab94c1e5a08b50bfb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d52a18f35215b127bd17e2a2d8cbfd2cb9ede5a3
Component: engine
2019-04-17 23:09:06 +02:00
00a7935f14 Windows: Go1.11: Use long path names in build context (TestBuildSymlinkBreakout)
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit b1b9937bc75f0db9c804838ecce9bb6792a42525)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 533b0f602d10af8fe325c3544a2411f5060a47b8
Component: engine
2019-04-17 23:09:04 +02:00
407b652dce integration-cli: fix TestAttachDetach, rm TestAttachDetachTruncatedID
It looks like the logic of the test became wrong after commit
ae0883c ("Move TestAttachDetach to integration-cli").

The original logic was:
* (a few first steps skipped for clarity)
* send escape sequence to "attach";
* check "attach" is exiting (i.e. escape sequence works);
* check the container is still alive;
* kill the container.

Also, timeouts were big at that time, in the order of seconds.

The logic after the above mentioned commit and until now is:
* ...
* send escape sequence to "attach";
* check the container is running (why shouldn't it?);
* kill the container;
* checks that the "attach" has exited.

So, from the "let's check detach using escape sequence is working"
the test became something like "let's check that attach is gone
once we kill the container".

Let's fix the above test, also increasing the timeout waiting
for attach to exit (which fails from time to time on power CI).

Now, the second test, TestAttachDetachTruncatedID, does the exact
same thing, except it uses a truncated container ID. It does not
seem to be of much value, so let's remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9f3a343a5101ab661a6a97c9e149a0b11ccc320a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 17ae129697c10e9f866ffc253bc211f8912588df
Component: engine
2019-04-17 23:09:01 +02:00
9295462ecc Completely remove d.NewClient from testing tools
Favor `d.NewClientT` instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e063099f918a01891db4389aaa6ba843e5d37fa9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1efe4720feb93c7f47d717001091279636f2039e
Component: engine
2019-04-17 23:08:59 +02:00
3153dc5a37 Remove use of deprecated client.NewClient()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3a4bb96ab74125c95702b818725ba92a27e3a450)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fd6a4681ee906890145556a497a81a914c6aed75
Component: engine
2019-04-17 23:08:56 +02:00
d2f16c6807 Use assert.NilError() instead of assert.Assert()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3449b12cc7eefa8ebd0de6ec8b9803c6ee823af0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 93de0314c7e44d625d791fa14d7316da6d1fc9c7
Component: engine
2019-04-17 23:08:54 +02:00
4e454ab962 Add missing error-check in TestAPISwarmManagerRestore
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2e326eba7040042e7b4e9974ebd46aaa6b03dc4f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 092315055ae1cd24732b913fad53767328b20678
Component: engine
2019-04-17 23:08:51 +02:00
0e40cd84ba Use poll.WaitOn in authz_plugin_test.go
This fix uses poll.WaitOn to replace customerized
implementation in authz_plugin_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0492b0997b2fc739a9a6fe6831145297d8149e55)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cdb40114b4b50bb86e03210186823895e4454653
Component: engine
2019-04-17 23:08:49 +02:00
a6c15caac6 Replace deprecated client.WithDialer()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8d3feccfa9dd0c0b5d866eba982c89f739b5e5b2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c1307fc901fe13e3b45be71638734bf91a7e70f
Component: engine
2019-04-17 23:08:46 +02:00
bfd7f1289c integration-cli: remove deprecated daemonHost() utility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3105ca26dc3dc5273e62dec622b8c40a1ae31b91)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8299d037ca8e2d2d43de56287d31ffb3d9a6ea98
Component: engine
2019-04-17 23:08:44 +02:00
777ce45527 Integration tests: remove some duplicated code, and preserve context
This introduces `NoTasksForService` and `NoTasks` poller checks, that
can be used to check if no tasks are left in general, or for a specific
service.

Some redundant checks were also removed from some tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 56a68c15f8a093b1761e77a74d8b7acdfbcb30a2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8f6421457d3be6280236aa466e533fb32cb4509b
Component: engine
2019-04-17 23:08:41 +02:00
66a128b214 Refactor TestInspectNetwork
Clean up and refactor this test;

- make `serviceRunningTasksCount` to use a `desired-state` filter
- use subtests, and inline the `validNetworkVerbose` checks; also use
  asserts for the individual checks, so that any failure will log exactly
  what failed
- remove helper functions that are no longer needed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 60d93aab2e68b13b3f22c43add4762d3e8108227)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 046352162f1a23f10a05b59e4fac9d932bcd4f35
Component: engine
2019-04-17 23:08:39 +02:00
df3af968c9 Remove code duplication and consolidate networkIsRemoved
This fix removes code duplication and consolidates networkIsRemoved
into one place.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 28b7824caa9c8f1acc0471136a8a4fd80e51f491)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dd20556e037b262473f3f8163dfc7c21e9161c8e
Component: engine
2019-04-17 23:08:37 +02:00
f976c75276 Remove use of deprecated client.NewEnvClient()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c8ff5ecc091278520a890ce58ed891ec354bf6d9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b9102e2a6b4bb79e080e9ce9d46046532df6f152
Component: engine
2019-04-17 23:08:34 +02:00
7c76af2251 Fix some minor wording / issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 263e28a830c7c0ba573f8bb6aa37bee1c3956d22)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a234f6a71c8dcecebf5ee32c6784b47ca97872c
Component: engine
2019-04-17 23:08:32 +02:00
37d514b106 Simplify skip checks
These tests are run on a local Linux daemon only, so no need
to do a platform-check.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 69c0b7e47682a2a7a850122a9a2f711259fbb25a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb6db57acc8a63f7f85fafe4be0cfe7fa929e3a1
Component: engine
2019-04-17 23:08:29 +02:00
ee07b18c8e Only build IPCmode tests on Linux
These tests can only be run on a local Linux daemon, so there's
no need to build them on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 84224935ea78d93e21a21c0e1e0aa3e83a5c7853)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4c0a7efd46d5fb13df7214aface1f291ba356d2
Component: engine
2019-04-17 23:08:26 +02:00
b432f71813 Improve consistency in "skip"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a3948d17d330315c832112bfecfc15d5e19511b1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cdedf9ae3ef586a466bc34b9003def2a19c4b42c
Component: engine
2019-04-17 23:08:23 +02:00
f3a38b2efd Integration: use testenv.APIClient()
A client is already created in testenv.New(), so we can just
as well use that one, instead of creating a new client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0de62d9bbcb92e9b7c73ee4cdef51c2229878e05)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e438d4799d6e233fe631d332973dcac1d977fef6
Component: engine
2019-04-17 23:04:49 +02:00
b202193ebd Don't mix t.Parallel() wth environment.ProtectAll()
`testEnv` is a package-level variable, so protecting / restoring
`testEnv` in parallel will result in "concurrent map write" errors.

This patch removes `t.Parallel()` from tests that use this
functionality (through `defer setupTest(t)()`).

Note that _subtests_ can still be run in parallel, as the defer
will be called after all subtests have completed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4d88a95d6730383624570f8730aa203a56caadc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 05ecb140c4f3c4c7cbb860baa425104fa6f132ea
Component: engine
2019-04-17 21:34:30 +02:00
7f2bfe773c Test: Replace NewClient() with NewClientT()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2cb7b73a1bdbf2e7ea6da7d0c050b303c2c4f5dc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb221587404be76f404062618e7d947f4d1bd39b
Component: engine
2019-04-17 21:34:09 +02:00
c975557150 cli: fix images filter when use multi reference filter
Signed-off-by: zhangyue <zy675793960@yeah.net>
(cherry picked from commit 5007c36d71ac86f5b47b6ba10a5ed6e841807284)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8a614d1b2494b6d2381e157a99ad2736a6038d2d
Component: engine
2019-04-17 21:32:23 +02:00
04efd9ec4a migrated ipc integration tests to integration/container
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
(cherry picked from commit febefb850d12e0ed1c2ab2a25336ece43204ba03)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6a1983ea7564697f18ce2aa1147646906abb97c4
Component: engine
2019-04-17 21:32:18 +02:00
2ee77da805 Fix some typos
Signed-off-by: Xiaoxi He <xxhe@alauda.io>
(cherry picked from commit 5c0d2a0932afb1e9c9e26326a22fdbefa1069463)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0b46144ff726f57640b85e7b24a2443f46eb9e25
Component: engine
2019-04-17 21:32:10 +02:00
183cc3650c Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-04-13 00:59:46 +00:00
d8c7e6f27c Merge component 'engine' from git@github.com:docker/engine 18.09 2019-04-13 00:59:34 +00:00
9f913c7e8c Merge pull request #187 from thaJeztah/18.09_bump_buildkit
[18.09] bump buildkit ed4da8b4a9661f278ae8433056ca37d0727c408b (docker-18.09 branch)
Upstream-commit: 1c4d9ccda690711fbc42cfc93bdd00fe7bc0a3ae
Component: engine
2019-04-12 23:15:11 +02:00
e89bd1ab59 Merge pull request #319 from StefanScherer/add-platform-for-deb-and-rpm-1809
[18.09] Add PLATFORM to deb and rpm builds
Upstream-commit: 33c01db93f4fe71c75b3b1e0d036e7d0987822cc
Component: packaging
2019-04-12 13:36:51 -07:00
e8ff056dbc Merge pull request #595 from andrewhsu/1809ga
[18.09] bump ver 18.09.5 ga
2019-04-10 16:47:39 -07:00
716dfd0d14 bump ver 18.09.5 ga
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-04-10 15:52:33 +00:00
2d86442852 Adds PartialLogMetadata to encode protobuf for logger plugins
Signed-off-by: Alexei Margasov <alexei38@yandex.ru>
(cherry picked from commit 4a9836a20b35968eb931dd53a6e00b81990d8b3f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 722d77e4b76af2b61d8040b3defd52b4d611e032
Component: engine
2019-04-10 03:10:37 +02:00
591f85d1f1 Add PLATFORM to deb and rpm build
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
(cherry picked from commit 119bb518ff5bf382b29971805f5c7ba16f960b21)
Upstream-commit: 6d0273d5c0ffd30c3cefd9caca61595f235dc01e
Component: packaging
2019-04-09 07:34:48 +02:00
351eb87d50 Merge pull request #594 from andrewhsu/1809rc1
[18.09] bump ver 18.09.5-rc1 and update changelog
2019-04-08 19:52:16 -07:00
6535618de5 bump ver 18.09.5-rc1 and update changelog
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-04-09 00:45:30 +00:00
ae0be04ddb Merge component 'engine' from git@github.com:docker/engine 18.09 2019-04-08 16:59:18 +00:00
52cc9db4e0 Merge pull request #192 from mavenugo/18.09_ln_vndr
[18.09 backport] Vendor Libnetwork c902989
Upstream-commit: 50ebe4562dfce3c7dfeeb5c0d2695b23879162c1
Component: engine
2019-04-08 08:09:54 -07:00
e62ff169e1 Vendor Libnetwork c902989
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: a9e2f27bf0bdb335bd1619cccfea889a76c949e5
Component: engine
2019-04-07 09:37:15 -07:00
a4740d20e2 Delete duplicate words
update pull request

Signed-off-by: “xichengliudui” <“liuduidui@beyondcent.com”>
(cherry picked from commit 1d62807db3bcbb3d793a5bb396d17aa62a59537c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 74f9183764f7ce1c54223288addfcdd901c86a27
Component: engine
2019-04-05 20:21:05 +02:00
29951b1046 Windows CI: Dump possible panic log
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit bc80e8df3e6300354305f81a4c0c48b855a1776b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d5a0ffa172a012e388d5b31edf332acc264b39b6
Component: engine
2019-04-05 20:20:54 +02:00
8332f4444c PowerShell: fix "Nuke-Everything" failing to remove images
I noticed this error in CI:

```
20:37:25 INFO: Non-base image count on control daemon to delete is 9
20:37:25 "docker rmi" requires at least 1 argument.
20:37:25 See 'docker rmi --help'.
20:37:25
20:37:25 Usage:  docker rmi [OPTIONS] IMAGE [IMAGE...]
20:37:25
20:37:25 Remove one or more images
```

Which indicated that the PowerShell script managed to find images to delete, but
not actually passing the images to `docker rmi`.

The reason for this failing was that the script attempted to convert the
collection/array to a string, which produces;

```powershell
Write-Output $(docker images --format "{{.Repository}}:{{.ID}}" | `
>>         select-string -NotMatch "windowsservercore" | `
>>         select-string -NotMatch "nanoserver" | `
>>         select-string -NotMatch "docker" `
>>         ).ToString()
System.Object[]
```

Which, when trying to split by the chosen separator (`:`), will return the same;

```powershell
Write-Output "System.Object[]".Split(":")[0]
```

This patch:

- Adds an intermediate variable (`$allImages`) to make the code better readable
- Switches the separator to `#`, to prevent breaking on images pulled from a
  repository with a port in its name (`myregistry:5000/my/image`)
- Switches to use a comma-separated list for `-NotMatch` (for readability)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5580b79813d3a5d2a7b83bcf1607839a5b0f468d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 74fe2c044f56e58356e9f598e5b08d94e676bbd4
Component: engine
2019-04-05 20:20:31 +02:00
8dea19efd5 PowerShell: Go-version check; only select the first match
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 755d3057ab8917c37e33bb5aa60c37cbe51285dd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 431dc221e3a22b9f97d691dffcc815a5998c0a34
Component: engine
2019-04-05 20:20:21 +02:00
09e8b14556 PowerShell: remove aliases, use their real commands instead
This patch replaces PowerShell aliases for their real commands, see https://blogs.technet.microsoft.com/heyscriptingguy/2012/04/21/when-you-should-use-powershell-aliases/

For example;

- use `Get-Location` instead of `pwd`
- use `Set-Location` instead of `cd`
- use `ForEach-Object` instead of the `%` shorthand
- use `Write-Output` instead of `echo`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6130c89ccec5262c25b91b3226a6ef2240bfde3b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4f0911d9122bf73d7efb90a50444cd6e52a09a96
Component: engine
2019-04-05 20:20:11 +02:00
ee1373b5cf PowerShell: move $null to left-hand for comparisons
see https://rencore.com/blog/powershell-null-comparison/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b394d25f03ee6ab615e45aad35e6396efd7d7fea)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 31d99be110c0a19ffc631355bac58bf8a7b068e1
Component: engine
2019-04-05 20:20:02 +02:00
ab9341ba9a PowerShell: fix mixed tabs/spaces
Fixed some mixed/tabs spaces for indentation, and used
tabs for auto-generated Go code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0f8b616c0c8f959ac4b29f29a8716b8cb7ea28fd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 73e5951b2e3c13ce84781d28b08cdc1958fb6224
Component: engine
2019-04-05 20:19:53 +02:00
41f6c45376 daemon: fix mirrors validation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1a0f04e08e2f23a12b8dd2deb7c10c7f4f7d8804)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5dab6096fb7fcfe94acd9145b24eda8640427bb5
Component: engine
2019-04-03 10:36:11 +02:00
f683faf94b Merge component 'cli' from git@github.com:docker/cli 18.09 2019-04-02 08:36:50 +00:00
3778127afa Merge pull request #1795 from thaJeztah/18.09_backport_dialstdio_1736
[18.09 backport] dial-stdio: fix goroutine leakage
Upstream-commit: c89750f836
Component: cli
2019-04-02 10:26:42 +02:00
48166d2ecb Merge pull request #1794 from thaJeztah/18.09_backport_fix_stack_watch
[18.09 backport] Fix the stack informer's selector used to track deployment
Upstream-commit: c805ad2964
Component: cli
2019-04-02 10:24:41 +02:00
4f1c087345 dial-stdio: fix goroutine leakage
Fix #1736

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit f8d4c443ba)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d8c6c830f8
Component: cli
2019-04-02 00:25:24 +02:00
515ac23e13 Fix the stack informer's selector used to track deployment
Old selector was wrong (it watched for the label we applied to child
resources when reconciling the stack, instead of the stack itself)

This should be back-ported to older version of the CLI

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
(cherry picked from commit 8cd74eb33a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f89d05edcb
Component: cli
2019-04-01 18:23:43 +02:00
5827fd03c8 CircleCI: Increase no-output timeout to 15 minutes for vendoring
Vendoring can take some time, depending on network-speed, so
reduce flakiness by increasing the default timeout, to prevent:

    make[1]: Entering directory '/go/src/github.com/docker/cli'
    rm -rf vendor
    bash -c 'vndr |& grep -v -i clone'
    2019/03/18 11:38:26 Collecting initial packages
    Too long with no output (exceeded 10m0s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit dba90e4999)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 90fa621791
Component: cli
2019-03-30 00:45:35 +01:00
8e07ba51b7 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-29 00:59:15 +00:00
2bbe5b06e2 bump buildkit ed4da8b4a9661f278ae8433056ca37d0727c408b (docker-18.09 branch)
brings in moby/buildkit#911 [docker-18.09] llbsolver: fix selectors dedupe
(backport of https://github.com/moby/buildkit/pull/858)

fixes https://github.com/moby/moby/issues/38964

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 083da4862d9c88b3b40d6f4e1b21f6ce76920fd6
Component: engine
2019-03-29 01:41:32 +01:00
d2a29ca9f2 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-29 00:36:51 +00:00
d5e6ddb355 Merge pull request #185 from thaJeztah/18.09_backport_fix_leaking_task_resources
[18.09] bump docker/swarmkit 19e791fd6dc76e8e894cbc99 (18.09 branch)
Upstream-commit: 1046c6371132875d80f287950bb9e9e5cefa8a85
Component: engine
2019-03-28 16:58:46 -07:00
044022b8c7 Merge pull request #1788 from thaJeztah/18.09_backport_annotations
[18.09 backport] fix annotations on --template-driver
Upstream-commit: e1fe8f3c45
Component: cli
2019-03-28 16:50:17 -07:00
8054c5a69b Fix annotation on docker secret create --template-driver
Signed-off-by: Sune Keller <absukl@almbrand.dk>
(cherry picked from commit 217308d96d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 356eda4028
Component: cli
2019-03-29 00:33:02 +01:00
1617714f28 Fix annnotation on docker config create --template-driver
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
(cherry picked from commit 470afe11ed)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 85148aa3f1
Component: cli
2019-03-29 00:32:44 +01:00
ecf545d095 update containerd/cgroups 4994991857f9b0ae8dc439551e8bebdbb4bf66c1
full diff: dbea6f2bd4...4994991857

brings in https://github.com/containerd/cgroups/pull/79 Return ErrCgroupDeleted when no subsystems
relates to https://github.com/containerd/containerd/issues/3133 Custom cgroup path does not work in containerd 1.2.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7392abda03305b35b48c974752d89be2cd513c19)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ad222b36c04ab80e1c40485108c59a112b3771b2
Component: engine
2019-03-29 00:02:40 +01:00
2a10e0280c bump docker/swarmkit 19e791fd6dc76e8e894cbc99b77f946b7d00ebb9 (18.09 branch)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c36238036388eb5ef0b92af7eb8036ee8aadbffd
Component: engine
2019-03-28 22:06:24 +01:00
a11331142f Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-28 20:58:53 +00:00
545a63d20f Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-28 20:36:41 +00:00
7d07a796f3 Merge pull request #1775 from thaJeztah/18.09_backport_ttyexecresize
[18.09 backport] fixes 1492: tty initial size error
Upstream-commit: 19c0311d46
Component: cli
2019-03-28 10:20:48 -07:00
8677ecab79 Merge pull request #1776 from thaJeztah/18.09_backport_upgrade_shellcheck_0.6.0
[18.09 backport] use official shellcheck 0.6.0, and don't patch Dockerfiles in CI
Upstream-commit: 207ff0831d
Component: cli
2019-03-28 10:19:59 -07:00
4c39df1955 Merge pull request #180 from thaJeztah/18.09_backport_fix_net_host_systemd_resolved
[18.09 backport] Fix: network=host using wrong resolv.conf with systemd-resolved
Upstream-commit: 80e10316cd01832a0fe04bc7970569bf86c3e391
Component: engine
2019-03-28 10:17:58 -07:00
feaf3c02f0 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-28 17:00:35 +00:00
eeb745937a Merge pull request #176 from AkihiroSuda/38902-1809
[18.09 backport] builder-next: fix squash
Upstream-commit: 8c0845a508e4e14659c82761aa7ec578d551004b
Component: engine
2019-03-28 09:38:37 -07:00
bd877991d7 Merge pull request #178 from thaJeztah/18.09_backport_exec_spec
[18.09 backport] Use original process spec for execs
Upstream-commit: b4bf217633d7884999b675b8a7b9b81892b46086
Component: engine
2019-03-28 09:37:29 -07:00
f6c192f8d4 Merge pull request #181 from thaJeztah/18.09_backport_fix_stopped_restart_containers
[18.09 backport] Fix stopped containers with restart-policy showing as "restarting"
Upstream-commit: 160b62e7a5375d11519e54009b450a4ad20ef8ba
Component: engine
2019-03-28 09:10:59 -07:00
d14af54266 Merge pull request #591 from andrewhsu/1809ga
[18.09] bump ver 18.09.4
2019-03-27 10:38:27 -07:00
b842af1c2b bump ver 18.09.4
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-03-27 16:50:31 +00:00
fae8ec96bd Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-27 16:36:55 +00:00
1b7a5a4e5a Merge pull request #1778 from thaJeztah/18.09_bump_engine
[18.09] bump engine 200b524eff60a9c95a22bc2518042ac2ff617d07 (18.09 branch)
Upstream-commit: 57b27434ea
Component: cli
2019-03-27 08:28:02 -07:00
b3b20effb4 bump engine 200b524eff60a9c95a22bc2518042ac2ff617d07 (18.09 branch)
relevant changes;

- moby/moby#38006 / docker/engine#114 client: use io.LimitedReader for reading HTTP error
- moby/moby#38634 / docker/engine#167 pkg/archive:CopyTo(): fix for long dest filename
  - fixes docker/for-linux#484 for 18.09
- moby/moby#38944 / docker/engine#183 gitutils: add validation for ref
- moby/moby#37780 / docker/engine#55 pkg/progress: work around closing closed channel panic
  - addresses moby/moby#/37735 pkg/progress: panic due to race on shutdown

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 010c234a0d
Component: cli
2019-03-27 10:08:23 +01:00
7f56899677 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-27 09:03:31 +00:00
356af1ef3e Merge pull request #183 from thaJeztah/18.09_backport_gitutils
[18.09 backport] gitutils: add validation for ref
Upstream-commit: 200b524eff60a9c95a22bc2518042ac2ff617d07
Component: engine
2019-03-27 09:34:06 +01:00
5246b368bf gitutils: add validation for ref
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 723b107ca4fba14580a6cd971e63d8af2e7d2bbe)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit a588898f99d697e5ff481ecb3b273f45410f10e6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 37ec11c8e3a6d1405680b7a309e72087904bcbd4
Component: engine
2019-03-26 23:34:28 +01:00
4dba9e73a5 Update to shellcheck v0.6.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ff107b313a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9a5296c8f1
Component: cli
2019-03-26 14:33:39 +01:00
6006ae7e52 Use official shellcheck image
This patch switches the shellcheck image to use the official image
from Docker Hub.

Note that this does not yet update shellcheck to the latest version (v0.5.x);
Shellcheck v0.4.7 added some new checks, which makes CI currently fail, so will
be done in a follow-up PR. Instead, the v0.4.6 version is used in this PR, which
is closest to the same version as was installed in the image before this change;

```
docker run --rm docker-cli-shell-validate shellcheck --version
ShellCheck - shell script analysis tool
version: 0.4.4
license: GNU General Public License, version 3
website: http://www.shellcheck.net
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 388646eab0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b59752479b
Component: cli
2019-03-26 14:26:45 +01:00
69d2858460 Do not patch Dockerfiles in CI
When building the Dockerfiles for development, those images are mainly used to
create a reproducible build-environment. The source code is bind-mounted into
the image at runtime; there is no need to create an image with the actual
source code, and copying the source code into the image would lead to a new
image being created for each code-change (possibly leading up to many "dangling"
images for previous code-changes).

However, when building (and using) the development images in CI, bind-mounting
is not an option, because the daemon is running remotely.

To make this work, the circle-ci script patched the Dockerfiles when CI is run;
adding a `COPY` to the respective Dockerfiles.

Patching Dockerfiles is not really a "best practice" and, even though the source
code does not and up in the image, the source would still be _sent_ to the daemon
for each build (unless BuildKit is used).

This patch updates the makefiles, circle-ci script, and Dockerfiles;

- When building the Dockerfiles locally, pipe the Dockerfile through stdin.
  Doing so, prevents the build-context from being sent to the daemon. This speeds
  up the build, and doesn't fill up the Docker "temp" directory with content that's
  not used
- Now that no content is sent, add the COPY instructions to the Dockerfiles, and
  remove the code in the circle-ci script to "live patch" the Dockerfiles.

Before this patch is applied (with cache):

```
$ time make -f docker.Makefile build_shell_validate_image
docker build -t docker-cli-shell-validate -f ./dockerfiles/Dockerfile.shellcheck .
Sending build context to Docker daemon     41MB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

2.75 real         0.45 user         0.56 sys
```

After this patch is applied (with cache)::

```
$ time make -f docker.Makefile build_shell_validate_image
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t docker-cli-shell-validate -
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

0.33 real         0.07 user         0.08 sys
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 166856ab1b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8997667aa2
Component: cli
2019-03-26 14:26:01 +01:00
705a3b6133 Fix stopped containers with restart-policy showing as "restarting"
When manually stopping a container with a restart-policy, the container
would show as "restarting" in `docker ps` whereas its actual state
is "exited".

Stopping a container with a restart policy shows the container as "restarting"

    docker run -d --name test --restart unless-stopped busybox false

    docker stop test

    docker ps
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                       PORTS               NAMES
    7e07409fa1d3        busybox             "false"             5 minutes ago       Restarting (1) 4 minutes ago                     test

However, inspecting the same container shows that it's exited:

    docker inspect test --format '{{ json .State }}'
    {
      "Status": "exited",
      "Running": false,
      "Paused": false,
      "Restarting": false,
      "OOMKilled": false,
      "Dead": false,
      "Pid": 0,
      "ExitCode": 1,
      "Error": "",
      "StartedAt": "2019-02-14T13:26:27.6091648Z",
      "FinishedAt": "2019-02-14T13:26:27.689427Z"
    }

And killing the container confirms this;

    docker kill test
    Error response from daemon: Cannot kill container: test: Container 7e07409fa1d36dc8d8cb8f25cf12ee1168ad9040183b85fafa73ee2c1fcf9361 is not running

    docker run -d --name test --restart unless-stopped busybox false

    docker stop test

    docker ps
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                PORTS               NAMES
    d0595237054a        busybox             "false"             5 minutes ago       Restarting (1)       4 minutes ago                       exit

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8c0ecb638705e89746a81fa1320aafaa7ff701b2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00f0b9df0dde80b2c40023b12a29dd476f2a77e2
Component: engine
2019-03-26 14:17:52 +01:00
c992d819e3 Fix: network=host using wrong resolv.conf with systemd-resolved
When running a container in the host's network namespace, the container
gets a copy of the host's resolv.conf (copied to `/etc/resolv.conf` inside
the container).

The current code always used the default (`/etc/resolv.conf`) path on the
host, irregardless if `systemd-resolved` was used or not.

This patch uses the correct file if `systemd-resolved` was detected
to be running.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8364d1c9d590d4266871cd820b76ef12e2b934ed)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 04ae160eca4a8bc134ca9abafa044191b893080b
Component: engine
2019-03-26 12:55:53 +01:00
5978d67dd6 tty initial size error
Signed-off-by: Lifubang <lifubang@acmcoder.com>
Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit 3fbffc682b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bcae2c4408
Component: cli
2019-03-26 12:51:27 +01:00
e4b5243fcd moved integration test TestExportContainerWithOutputAndImportImage from moby/moby to docker/cli.
The integration test TestExportContainerWithOutputAndImportImage in moby/moby is the same as TestExportContainerAndImportImage,
except for the output file option. Adding a unit test to cover the output file option of the export command here allows
the removal of the redundant integration test TestExportContainerWithOutputAndImportImage.

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
(cherry picked from commit fc1e11d46a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 079adf3f23
Component: cli
2019-03-26 12:51:22 +01:00
bb938bc1ef Use original process spec for execs
Fixes #38865

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 7603c22c7365d7d7150597fe396e0707d6e561da)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3d3d7570714a8ab60b979eaba39309b6e8fcf75e
Component: engine
2019-03-26 12:37:59 +01:00
4ff5f20eb8 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-22 00:38:41 +00:00
b13cfeb5ba Merge pull request #1733 from thaJeztah/18.09_backport_dial_stdio_npipe_on_windows
[18.09 backport] dial-stdio: handle connections which lack CloseRead method
Upstream-commit: f6693b0b25
Component: cli
2019-03-21 14:35:47 -07:00
a628600cdc builder-next: fix squash
Tagger was not called for BuildKit-mode.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 7fc0f820ea1e9036a1466ee8ef7a7395b792623f)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 8d87a2a4bc88b235f06e3995bb33f978d7c28cdf
Component: engine
2019-03-21 21:34:49 +09:00
9d6081ed9c Merge pull request #589 from andrewhsu/1809rc1
[18.09] bump ver 18.09.4-rc1
2019-03-20 19:41:10 -07:00
8cf9ea27a2 bump ver 18.09.4-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-03-20 21:51:34 +00:00
246bd21cf4 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-20 21:04:46 +00:00
03f0694b26 Merge pull request #173 from thaJeztah/18.09_backport_bump_containerd_1.2.5
[18.09 backport] Update containerd v1.2.5, runc 2b18fe1d885ee5 binaries
Upstream-commit: 6e2e248bdf537a142eba8a5ef5f5af48d0f11742
Component: engine
2019-03-20 11:01:06 -07:00
6e3f7283c6 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-20 17:03:57 +00:00
026f5ba367 Merge pull request #175 from thaJeztah/18.09_backport_fix_testrunbindmounts
[18.09 backport] Windows (pre RS5) disableTestRunBindMounts
Upstream-commit: 1782e74e54d32a709140cf88545046bc5478e208
Component: engine
2019-03-20 09:27:32 -07:00
b95571e881 Windows (pre RS5) disableTestRunBindMounts
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 9d2e97ac6e20b17477947fc63e70299938606a38)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 91703956dffcf1d9c997aea83f9489a8c768412d
Component: engine
2019-03-20 10:58:15 +01:00
e0edce30c3 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-20 05:12:34 +00:00
6c2f68746d Merge pull request #174 from thaJeztah/18.09_backport_fixrunuserdefaults
[18.09 backport] Windows:Fix TestRunUserDefaults
Upstream-commit: fdaec73c1c284bacfa5927b71bdf84f22b6960ef
Component: engine
2019-03-19 20:10:24 -07:00
90370524f3 Windows:Fix TestRunUserDefaults
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 80fce6d747c5208b42e94ac9e3f22cef28dd8afe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fd4670161de8f9947c524138c477177f935c98f2
Component: engine
2019-03-19 21:18:53 +01:00
40c4e9dcd0 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-18 20:37:25 +00:00
ef970c66f7 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-18 16:37:16 +00:00
38ac401e28 Merge pull request #1744 from thaJeztah/18.09_backport_docs_fixes
[18.09 backport] various docs fixes
Upstream-commit: ed16a3136b
Component: cli
2019-03-18 17:36:26 +01:00
7a40ed937a Merge pull request #1741 from thaJeztah/18.09_backport_fix_plugin_test
[18.09 backport] Fix: plugin-tests discarding current environment
Upstream-commit: e63ac0ea35
Component: cli
2019-03-18 14:47:32 +01:00
e9e7044d89 Add some spaces for cosmetics and readability reasons.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 8401c81b46)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c1a4358ea4
Component: cli
2019-03-18 13:52:13 +01:00
5def8bca28 Add exit status to docker exec manpage
There's little way of knowing what each exit status means at present
because it's not documented. I'm assuming they are the same as docker
run.

Signed-off-by: Eric Curtin <ericcurtin17@gmail.com>
(cherry picked from commit 23670968cc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 27ab7cc3d6
Component: cli
2019-03-18 11:16:13 +01:00
8cae313dd6 Corrected max-file option - was incorrectly spelt as max-files
Signed-off-by: Steve Richards <steve.richards@docker.com>
(cherry picked from commit 04f88005c9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 74bd5f143f
Component: cli
2019-03-18 11:16:11 +01:00
3adaef1e74 Note caveat with detaching using key sequence
This has come up a few times, e.g. https://github.com/moby/moby/issues/20864 and https://github.com/moby/moby/issues/35491

Signed-off-by: Ben Creasy <ben@bencreasy.com>
(cherry picked from commit 767b25fc52)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8dc400713f
Component: cli
2019-03-18 11:16:08 +01:00
d6ea168f88 Fix typos
Signed-off-by: Michael Käufl <docker@c.michael-kaeufl.de>
(cherry picked from commit 0e469c1d1d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 543f9b32ee
Component: cli
2019-03-18 11:16:05 +01:00
0ddc0b1b54 Fix small typo
Noticed a typo in this markdown file: "instead" instead of "in stead"

Signed-off-by: Ryan Wilson-Perkin <ryanwilsonperkin@gmail.com>
(cherry picked from commit 7a9fc782c5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1d314f2227
Component: cli
2019-03-18 11:15:59 +01:00
ab07868a3f Improve docker image rm reference docs
Copies the improved description from the man page
to the online reference docs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 89bc5fbbae)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 275ab1f063
Component: cli
2019-03-18 11:15:57 +01:00
2b74693bae Update process isolation description for older Windows 10 versions
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
(cherry picked from commit 7229920e2e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4f6ab11ff4
Component: cli
2019-03-18 11:15:55 +01:00
8fe68b3c25 Fix some typos in manifest.md
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
(cherry picked from commit abe1bb9757)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 537309a548
Component: cli
2019-03-18 11:15:52 +01:00
0e8ded3923 docs: add missing ID placeholder for docker node ps
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 24018b9ffd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 08714b4579
Component: cli
2019-03-18 11:15:50 +01:00
c81fbf531f docs(metrics-addr): Use port 9323, allocated for Docker in prometheus
Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
(cherry picked from commit 89aa2cf9f6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 789a15bc73
Component: cli
2019-03-18 11:15:48 +01:00
e0cf2f4f92 Fixed typo.
Signed-off-by: Anne Henmi <anne.henmi@docker.com>
(cherry picked from commit 4aecd8bda1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ce12ac2d14
Component: cli
2019-03-18 11:15:45 +01:00
3803869429 Replace environmental with environment
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
(cherry picked from commit f1f3d3be17)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4c94a0af75
Component: cli
2019-03-18 11:15:43 +01:00
733325e26f Improve docker image rm documentation
The `docker image rm` command can be used not only
to remove images but also remove tags.

This update improves the documentation to make
this clear.

Signed-off-by: Filip Jareš <filipjares@gmail.com>
(cherry picked from commit 2ba9601ef1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0717f261ed
Component: cli
2019-03-18 11:15:39 +01:00
2c6914129c Fix: plugin-tests discarding current environment
By default, exec uses the environment of the current process, however,
if `exec.Env` is not `nil`, the environment is discarded:

e73f489494/src/os/exec/exec.go (L57-L60)

> If Env is nil, the new process uses the current process's environment.

When adding a new environment variable, prepend the current environment,
to make sure it is not discarded.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6c4fbb7738)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fc8717799f
Component: cli
2019-03-17 15:47:28 +01:00
4f2b9d6cb6 vendor containerd/cgroups dbea6f2bd41658b84b00417ceefa416b979cbf10
Relevant changes:

- containerd/containerd#51 Fix empty device type
- containerd/containerd#52 Remove call to unitName
  - Calling unitName incorrectly appends -slice onto the end of the slice cgroup we are looking for
  - addresses containerd/containerd#47 cgroups: cgroup deleted
- containerd/containerd#53 systemd-239+ no longer allows delegate slice
- containerd/containerd#54 Bugfix: can't write to cpuset cgroup
- containerd/containerd#63 Makes Load function more lenient on subsystems' checking
  - addresses containerd/containerd#58 Very strict checking of subsystems' existence while loading cgroup
- containerd/containerd#67 Add functionality for retrieving all tasks of a cgroup
- containerd/containerd#68 Fix net_prio typo
- containerd/containerd#69 Blkio weight/leafWeight pointer value
- containerd/containerd#77 Check for non-active/supported cgroups
  - addresses containerd/containerd#76 unable to find * in controller set: unknown
  - addresses docker/for-linux#545 Raspbian: Error response from daemon: unable to find "net_prio" in controller set: unknown
  - addresses docker/for-linux#552 Error response from daemon: unable to find "cpuacct" in controller set: unknown
  - addresses docker/for-linux#545 Raspbian: Error response from daemon: unable to find "net_prio" in controller set: unknown

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 386b06eacd689bb98fb4117087614466c6e130f3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a36f6bfc36d2425c693097102b91152fa8f80012
Component: engine
2019-03-15 23:15:14 +01:00
f2815a7aa5 Update containerd v1.2.5, runc 2b18fe1d885ee5083ef9f0838fee39b62d653e30
Notable Updates

- Fix an issue that non-existent parent directory in image layers is created with permission 0700. containerd#3017
- Fix an issue that snapshots of the base image can be deleted by mistake, when images built on top of it are deleted. containerd#3087
- Support for GC references to content from snapshot and container objects. containerd#3080
- cgroups updated to dbea6f2bd41658b84b00417ceefa416b97 to fix issues for systemd 420 and non-existent cgroups. containerd#3079
- runc updated to 2b18fe1d885ee5083ef9f0838fee39b62d653e30 to include the improved fix for CVE-2019-5736. containerd#3082
- cri: Fix a bug that pod can't get started when the same volume is defined differently in the image and the pod spec. cri#1059
- cri: Fix a bug that causes container start failure after in-place upgrade containerd to 1.2.4+ or 1.1.6+. cri#1082
- cri updated to a92c40017473cbe0239ce180125f12669757e44f. containerd#3084

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 25cdae293fedb18f3538788d629d6e4475acaa4b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6c715008627a9ff2073e932d5c792dc7bc1f2f01
Component: engine
2019-03-15 23:14:54 +01:00
f5e591e815 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-14 16:37:12 +00:00
8845519dce Merge pull request #1734 from thaJeztah/18.09_backport_fix_test_for_go_1.12
[18.09 backport] Fix test for Go 1.12.x
Upstream-commit: 76f4876129
Component: cli
2019-03-14 16:55:40 +01:00
ea47598cf6 Fix test for Go 1.12.x
After switching to Go 1.12, the format-string causes an error;

```
=== Errors
cli/config/config_test.go:154:3: Fatalf format %q has arg config of wrong type *github.com/docker/cli/cli/config/configfile.ConfigFile
cli/config/config_test.go:217:3: Fatalf format %q has arg config of wrong type *github.com/docker/cli/cli/config/configfile.ConfigFile
cli/config/config_test.go:253:3: Fatalf format %q has arg config of wrong type *github.com/docker/cli/cli/config/configfile.ConfigFile
cli/config/config_test.go:288:3: Fatalf format %q has arg config of wrong type *github.com/docker/cli/cli/config/configfile.ConfigFile
cli/config/config_test.go:435:3: Fatalf format %q has arg config of wrong type *github.com/docker/cli/cli/config/configfile.ConfigFile
cli/config/config_test.go:448:3: Fatalf format %q has arg config of wrong type *github.com/docker/cli/cli/config/configfile.ConfigFile

DONE 1115 tests, 2 skipped, 6 errors in 215.984s
make: *** [Makefile:22: test-coverage] Error 2
Exited with code 2
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d4877fb225)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7ea48a16e3
Component: cli
2019-03-13 22:27:00 +01:00
9d70293b5b dial-stdio: Close the connection
This was leaking the fd.

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 186e7456ac)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 75e9075591
Component: cli
2019-03-13 11:54:11 +01:00
c2cf227965 dial-stdio: handle connections which lack CloseRead method.
This happens on Windows when dialing a named pipe (a path which is used by CLI
plugins), in that case some debugging shows:

    DEBU[0000] conn is a *winio.win32MessageBytePipe
    DEBU[0000] conn is a halfReadCloser: false
    DEBU[0000] conn is a halfWriteCloser: true
    the raw stream connection does not implement halfCloser
In such cases we can simply wrap with a nop function since closing for read
isn't too critical.

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 8919bbf04d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 69e1094f5a
Component: cli
2019-03-13 11:53:58 +01:00
70d1935665 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-12 21:03:49 +00:00
8238697633 Merge pull request #170 from thaJeztah/18.09_bump_swarmkit
[18.09] bump swarmkit to c66ed60822d3fc3bf6e17a505ee79014f449ef05 (bump 18.09)
Upstream-commit: 6e84332e53f5c8cc5d29b4a4525d20a0c730a854
Component: engine
2019-03-12 11:05:48 -07:00
84c971868e Merge component 'cli' from git@github.com:docker/cli 18.09 2019-03-12 12:37:12 +00:00
4e69571cff Merge pull request #1729 from thaJeztah/18.09_backport_e2e_handle_alpine_bump
[18.09 backport] Fixes for e2e testing after Alpine bump
Upstream-commit: 890e29da87
Component: cli
2019-03-12 13:01:46 +01:00
35a6ca7054 e2e: avoid usermod -p by using useradd's --password option
Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 0b0c57871a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 78d52ec5d4
Component: cli
2019-03-12 10:36:15 +01:00
e0218c5780 e2e: Expand useradd's -m otion into --create-home
... for improved readability

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit e854a9cf96)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c0bbca75af
Component: cli
2019-03-12 10:36:03 +01:00
ba2b4c0c65 e2e Use useradd's --shell option
... in preference to `chsh`, since in recent alpine 3.9.2 images that can fail
with:

    Password: chsh: PAM: Authentication token manipulation error

Which seems to relate to the use of `!` as the password for `root` in `/etc/shadow`gq

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 5de2d9e8a9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b666e9a090
Component: cli
2019-03-12 10:35:23 +01:00
6064691b74 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-09 00:52:55 +00:00
9c47f77927 Merge pull request #169 from thaJeztah/18.09_bump_libnetwork2
[18.09] bump libnetwork 4725f2163fb (bump_18.09 branch)
Upstream-commit: d51db2f20b9cd3faf570714b65fe2e359f1ecff9
Component: engine
2019-03-08 14:45:06 -08:00
4b269555e0 Merge pull request #171 from thaJeztah/18.09_backport_fix_build_session_test
[18.09 backport] Fix TestBuildWithSession, TestBuildSquashParent  using wrong daemon during test
Upstream-commit: c97602ef9903fd18e65b341a7359287e684cde84
Component: engine
2019-03-08 14:43:42 -08:00
b9167a9818 Fix TestBuildWithSession, TestBuildSquashParent using wrong daemon during test
These tests were spinning up a new daemon, but after the daemon was spun up,
the default test-daemon was used by the client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9a3911ced83331b6efe698528a4480bd5ff3d7a6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 605bc1ffc5adc5a3968ebe7a58060d2542cc28f3
Component: engine
2019-03-06 22:11:22 +01:00
5421245401 [18.09] bump swarmkit to c66ed60822d3fc3bf6e17a505ee79014f449ef05 (bump 18.09)
relevant changes:

- swarmkit#2826 [18.09 backport] use a custom grpc dialer when managers are joining (backport of swarmkit#2802)
- swarmkit#2801 [18.09 backport] Include old error-message for backward compatibility (backport of swarmkit#2797)
- swarmkit#2788 [18.09 backport] Return correct error-codes on conflicting names (backport of swarmkit#2779)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1a60fdbdcefbecf762e063fbb5b3593e53e877bb
Component: engine
2019-03-06 22:08:48 +01:00
5e4939ab2b Merge component 'engine' from git@github.com:docker/engine 18.09 2019-03-06 17:12:49 +00:00
465705f78f Merge pull request #164 from thaJeztah/18.09_backport_esc_1090
[18.09 backport] set bigger grpc limit for GetConfigs api
Upstream-commit: ad59cba5a02bf22f4e8e56c5e9c02476d31f2ced
Component: engine
2019-03-06 08:14:26 -08:00
361573fb13 Merge pull request #166 from thaJeztah/18.09_backport_tarstream_release
[18.09 backport] layer/layer_store: ensure NewInputTarStream resources are released
Upstream-commit: e2ddb3a2fff8da4a28109d54908dc4479026dec4
Component: engine
2019-03-06 08:12:18 -08:00
6e44ea5ca3 Merge pull request #167 from thaJeztah/18.09_backport_cp_longname
[18.09 backport] pkg/archive:CopyTo(): fix for long dest filename
Upstream-commit: 2f867e6b4cbdb9844d7b6548c9b341b1e8452f33
Component: engine
2019-03-06 08:07:18 -08:00
006a8c7333 [18.09] bump libnetwork 4725f2163fb (bump_18.09 branch)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8c5188801646046568a710d55f8df4686c98dbe1
Component: engine
2019-03-05 22:57:37 +01:00
ddb553c9c7 pkg/archive:CopyTo(): fix for long dest filename
As reported in docker/for-linux/issues/484, since Docker 18.06
docker cp with a destination file name fails with the following error:

> archive/tar: cannot encode header: Format specifies USTAR; and USTAR cannot encode Name="a_very_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_long_filename_that_is_101_characters"

The problem is caused by changes in Go 1.10 archive/tar, which
mis-guesses the tar stream format as USTAR (rather than PAX),
which, in turn, leads to inability to specify file names
longer than 100 characters.

This tar stream is sent by TarWithOptions() (which, since we switched to
Go 1.10, explicitly sets format=PAX for every file, see FileInfoHeader(),
and before Go 1.10 it was PAX by default). Unfortunately, the receiving
side, RebaseArchiveEntries(), which calls tar.Next(), mistakenly guesses
header format as USTAR, which leads to the above error.

The fix is easy: set the format to PAX in RebaseArchiveEntries()
where we read the tar stream and change the file name.

A unit test is added to prevent future regressions.

NOTE this code is not used by dockerd, but rather but docker cli
(also possibly other clients), so this needs to be re-vendored
to cli in order to take effect.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f55a4176febbd0dffd6e5eb65beb70bc32912d0b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 989e7f5d3a3f40ebb936376245b770f766ea42e9
Component: engine
2019-03-02 16:33:19 +01:00
78d7be4aeb layer/layer_store: ensure NewInputTarStream resources are released
In applyTar, if the driver's ApplyDiff returns an error, the function
returns early without calling io.Copy.

As a consequence, the resources (a goroutine and some buffers holding
the uncompressed image, the digest, etc...) allocated or referenced by
NewInputTarStream above aren't released, as the worker goroutine only
finishes when it finds EOF or a closed pipe.

Signed-off-by: Sergio Lopez <slp@redhat.com>
(cherry picked from commit 5846db10af9fb37061ab92a07c3d82fbea92b2e0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f660ef2c25590f21fdd10357c08a542a4876d6c3
Component: engine
2019-03-01 23:14:27 +01:00
afc2d3e1e5 Merge pull request #588 from seemethere/fix_link
[18.09 Fix link to release notes to be an actual link
2019-03-01 13:21:42 -08:00
cfc168b856 Fix link to release notes to be an actual link
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-03-01 20:53:52 +00:00
53943599d3 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-03-01 13:01:06 +00:00
dce2ceb9af Merge pull request #306 from dave-tucker/18.09
[18.09] [TAR-465] Jenkinsfile: Test the correct branch
Upstream-commit: a67da74db0a25761458db2c2dc06587df531dca8
Component: packaging
2019-03-01 09:47:27 +00:00
dd0e4702ff [TAR-465] Jenkinsfile: Test the correct branch
This commit ensures that we test the correct branches of Docker
when making packaging changes.

Signed-off-by: Dave Tucker <dt@docker.com>
(cherry picked from commit 1ef9fb3f0b2b8016b50c6c71f2d14bea16faff35)
Upstream-commit: 5e59ff8a5e8ea44444aa4f22a8baf12e091bcc76
Component: packaging
2019-03-01 09:22:20 +00:00
774a1f4eee Merge pull request #587 from andrewhsu/1809ga
[18.09] bump ver 18.09.3
2019-02-27 21:50:49 -08:00
d1cde99c16 bump ver 18.09.3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-02-28 02:42:51 +00:00
d234d63bd9 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-02-27 20:37:05 +00:00
7e985fdbcc set bigger grpc limit for GetConfigs api
Signed-off-by: Dani Louca <dani.louca@docker.com>
(cherry picked from commit 3fbbeb703c1d04e9eb723459960fbfc7f3bbfc40)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5f40e17cfd2474776088a97552fce7d5a9abe549
Component: engine
2019-02-27 19:01:12 +01:00
eca25928d3 Merge pull request #1694 from thaJeztah/18.09_backport_nolibtool
[18.09 backport] Update PKCS11 library
Upstream-commit: 9352be5341
Component: cli
2019-02-27 08:39:46 -08:00
fe586e6b03 Update PKCS11 library
The new version no longer links to libltdl which simplifies build
and dependencies.

See https://github.com/theupdateframework/notary/pull/1434

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit cb3e55bf58)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4f607fb4f
Component: cli
2019-02-26 13:17:22 +01:00
516e0938c4 Merge pull request #586 from andrewhsu/1809rc1
[18.09] bump ver 18.09.3-rc1
2019-02-25 21:15:23 -08:00
9a547e9803 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-26 01:02:02 +00:00
730b7c7c36 Merge pull request #163 from thaJeztah/18.09_backport_busyboxstage2
[18.09 backport] Windows: Bump busybox to v1.1
Upstream-commit: 8c91e9672cc8ab2a7f94ed38932a13fe1298d3fb
Component: engine
2019-02-25 16:29:56 -08:00
485445e58c bump ver 18.09.3-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-02-25 22:05:29 +00:00
9a1f0b6385 Windows: Bump busybox to v1.1
Signed-off-by: John Howard <jhoward@microsoft.com>

This is a follow-on from https://github.com/moby/moby/pull/38277
but had to be done in a couple of stages to ensure that CI didn't
break. v1.1 of the busybox image is now based on a CMD of "sh"
rather than using an entrypoint. And it also uses the bin directory
rather than `c:\busybox`. This makes it look a lot closer to the
Linux busybox image, and means that a couple of Windows-isms in
CI tests can be reverted back to be identical to their Linux
equivalents.

(cherry picked from commit 561e0f6b7fc256c160292b32695cf1d6150741db)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 613c2f27ed2e7d65474c2f3e786d9e24e757d99d
Component: engine
2019-02-25 10:44:48 +01:00
24d84781fd Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-23 21:04:00 +00:00
24e88ff12b Merge pull request #153 from thaJeztah/18.09_backport_update_containerd_1.2.4
[18.09 backport] update containerd 1.2.4, runc 6635b4f
Upstream-commit: e4b8756784220ea1a580ec4bcbfcd8b074c5ca9a
Component: engine
2019-02-23 11:09:18 -08:00
2a10e07767 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-23 01:04:09 +00:00
0fc0fbc929 Update containerd runtime 1.2.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 26413ede5781cd13d62cbdaf4671d056ca8bba83)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ffeebb217c1da556c2dc686fbff80cbb5d74e564
Component: engine
2019-02-23 01:49:38 +01:00
c5e4f537fe 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>
(cherry picked from commit f03698b69a7777b8d30b9c5897504f8704b87676)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c7fca75c035ba0b750f46a9676a376f8e4409f15
Component: engine
2019-02-23 01:49:25 +01:00
1f1e19daa1 Revert "Merge pull request #240 from seemethere/bundle_me_up_1809"
This reverts commit eb137ff1765faeb29c2d99025bfd8ed41836dd06, reversing
changes made to a79fabbfe84117696a19671f4aa88b82d0f64fc1.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 88330c9aac5556d0abc7a5afcb4d906604a07fa2
Component: engine
2019-02-23 01:49:12 +01:00
cdacf38efa Merge pull request #154 from thaJeztah/18.09_backport_fix_stale_container_on_start
[18.09 backport] Delete stale containerd object on start failure
Upstream-commit: ba8664cc2219c3ed75d3f4306569edf8b7b97a98
Component: engine
2019-02-22 13:52:47 -08:00
b8b285ce9b Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-22 21:04:02 +00:00
878b9f56bf Merge pull request #162 from thaJeztah/18.09_backport_38636_fix_nil_pointer_dereference
[18.09 backport] Fix nil pointer derefence on failure to connect to containerd
Upstream-commit: 24c6c3eb52e04835da52efe940fef725bed445ee
Component: engine
2019-02-22 10:34:11 -08:00
8af9b67ca8 Fix nil pointer derefence on failure to connect to containerd
Signed-off-by: Simão Reis <smnrsti@gmail.com>
(cherry picked from commit 3134161be3f578ff009673786684b3abbe9abb3f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0841c61862e66c47ec735ad9de0039b806de37aa
Component: engine
2019-02-22 13:22:29 +01:00
fca49318b4 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-22 05:12:30 +00:00
893afbfb6f Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-22 01:04:13 +00:00
c835df1d14 Merge pull request #160 from thaJeztah/18.09_backport_add_missing_char_device_mode
[18.09 backport] Graphdriver: fix "device" mode not being detected if "character-device" bit is set
Upstream-commit: 2e4c5c57c30522dc4b33b5cd5371f294ae3fee82
Component: engine
2019-02-21 17:01:40 -08:00
761df7a017 Merge pull request #135 from thaJeztah/18.09_backport_xattr_fix
[18.09 backport] Ignore xattr ENOTSUP errors on copy (fixes #38155)
Upstream-commit: db7a8cb7ba2de79d68ec73c158571319f82ba212
Component: engine
2019-02-21 15:00:20 -08:00
50e6ee21b3 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-21 05:04:08 +00:00
2012f67a6d Merge pull request #143 from thaJeztah/18.09_backport_skip_kmem_tests_on_rhel
[18.09 backport] Skip kernel-memory tests on RHEL/CentOS daemons
Upstream-commit: 6b0ba3745d073717887ead912c3c7dea4c99fc45
Component: engine
2019-02-20 18:23:09 -08:00
fb81d8fe00 Merge pull request #158 from thaJeztah/18.09_backport_save_the_environment
[18.09 backport] Fix: plugin-tests discarding current environment
Upstream-commit: 5c15222f0f9381fad6d27dc1374ed2af417d16f7
Component: engine
2019-02-20 18:11:25 -08:00
1a1a62b3bf Merge pull request #157 from thaJeztah/18.09_backport_fix_test_int
[18.09 backport] make test-integration: use correct dockerd binary
Upstream-commit: f935add7583e7741c43f110ba354957730b78d4c
Component: engine
2019-02-20 18:10:26 -08:00
6a5c5805ac Merge pull request #159 from thaJeztah/18.09_backport_even_more_names_redux
[18.09 backport] Makes a few modifications to the name generator.
Upstream-commit: 3c1fa928cbb08a6e7ee72bec817c7294926b873d
Component: engine
2019-02-20 18:08:52 -08:00
811028792b Merge pull request #161 from kolyshkin/18.09-backport-38423
[18.09] Backport "Disabled these tests on s390x and ppc64le:"
Upstream-commit: 37cf1cd68e27fab10f93f602b0fdd367f89eb360
Component: engine
2019-02-20 18:06:18 -08:00
d4fa1ee60f Merge pull request #155 from thaJeztah/18.09_backport_override_validate
[18.09 backport] Allow overriding repository and branch in validate scripts, and no need to git fetch in CI
Upstream-commit: 02c953cf36fa4f017be402451106d9c273023b4f
Component: engine
2019-02-20 18:05:25 -08:00
0db790cc19 Merge pull request #149 from thaJeztah/18.09_backport_fix_restart
[18.09 backport] keep old network ids
Upstream-commit: 9dc0488d1c0f424368cf8af56006acc46a846679
Component: engine
2019-02-20 18:03:40 -08:00
c9de39ca94 Disabled these tests on s390x and ppc64le:
- TestAPISwarmLeaderElection
- TestAPISwarmRaftQuorum
- TestSwarmClusterRotateUnlockKey

because they are known to be flaky.

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 02157c638ba0c325d8fd1debc1678e7e99eacfc1)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 278f1a130b66de23f07e472792b70b640f777666
Component: engine
2019-02-20 13:51:17 -08:00
a345ccfd0e Graphdriver: fix "device" mode not being detected if "character-device" bit is set
Due to a bug in Golang (github.com/golang#27640), the "character device"
bit was omitted when checking file-modes with `os.ModeType`.

This bug was resolved in Go 1.12, but as a result, graphdrivers
would no longer recognize "device" files, causing pulling of
images that have a file with this filemode to fail;

    failed to register layer:
    unknown file type for /var/lib/docker/vfs/dir/.../dev/console

The current code checked for an exact match of Modes to be set. The
`os.ModeCharDevice` and `os.ModeDevice` bits will always be set in
tandem, however, because the code was only looking for an exact
match, this detection broke now that `os.ModeCharDevice` was added.

This patch changes the code to be more defensive, and instead
check if the `os.ModeDevice` bit is set (either with, or without
the `os.ModeCharDevice` bit).

In addition, some information was added to the error-message if
no type was matched, to assist debugging in case additional types
are added in future.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7a38c2c06f7ab844a48c6c447942913131b83d6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3744b45ba8ad93f1a21cbc80420856b04efc4593
Component: engine
2019-02-20 14:31:18 +01:00
ddcd7c106d Makes a few modifications to the name generator.
* Replaces `cocks` with `cerf` as the former might be perceived as
offensive by some people (as pointed out by @jeking3
[here](https://github.com/moby/moby/pull/37157#commitcomment-31758059))
* Removes a duplicate entry for `burnell`
* Re-arranges the entry for `sutherland` to ensure that the names are in
sorted order
* Adds entries for `shamir` and `wilbur`

Signed-off-by: Debayan De <debayande@users.noreply.github.com>
(cherry picked from commit e50f791d42d1167a5ef757b1aa179e84f0f81bba)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a818442de73b16d8ad756c74e5e660d132e97848
Component: engine
2019-02-20 13:31:11 +01:00
125d84fbcf Fix: plugin-tests discarding current environment
By default, exec uses the environment of the current process, however,
if `exec.Env` is not `nil`, the environment is discarded:

e73f489494/src/os/exec/exec.go (L57-L60)

> If Env is nil, the new process uses the current process's environment.

When adding a new environment variable, prepend the current environment,
to make sure it is not discarded.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b84bff7f8ad1562a7d05f21bd84179d3306f2b4b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 19e733f89f7652f58b567b5178bacc10ef2940b5
Component: engine
2019-02-20 11:27:07 +01:00
f3b1a30e52 make test-integration: use correct dockerd binary
Here's what happens:
1. One runs `make binary` once
2. Days go by...
3. One makes changes to dockerd sources
4. One runs `make test-integration` to test the changes
5. One spends a long time figuring out why on Earth
   those changes in step 3 are ignored by step 4.
6. One writes this patch
7. ...
8. PROFIT!!

OK, so `make test-integration` builds a dockerd binary
in bundles/dynbinary-daemon/, when starts a daemon instance
for testing. The problem is, the script that starts the
daemon sets PATH to try `bundles/binary-daemon/` first,
and `bundles/dynbinary-daemon/` second.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 228bc35e824d09a6f40d60619808462124f0af31)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e9ecd5e486c591979e34782025bb849f7faf8eba
Component: engine
2019-02-19 22:35:50 +01:00
c14d8be35a 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>
(cherry picked from commit feb70fd5c9e2fb3f300e953dd83053f0830f3895)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7b9ec00eec7ffe745ebd2f807daa50d84b3e10e7
Component: engine
2019-02-18 11:19:49 +01:00
9eb15371b3 Allow overriding repository and branch in validate scripts
When running CI in other repositories (e.g. Docker's downstream
docker/engine repository), or other branches, the validation
scripts were calculating the list of changes based on the wrong
information.

This lead to weird failures in CI in a branch where these values
were not updated ':-) (CI on a pull request failed because it detected
that new tests were added to the deprecated `integration-cli` test-suite,
but the pull request did not actually make changes in that area).

This patch allows overriding the target repository (and branch)
to compare to (without having to edit the scripts).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2a08f33166247da9d4c09d4c6c72cbb8119bf8df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 748f37022df465c39a76461c4970f4c678f629e3
Component: engine
2019-02-18 11:19:23 +01:00
241a2913ec Delete stale containerd object on start failure
containerd has two objects with regard to containers.
There is a "container" object which is metadata and a "task" which is
manging the actual runtime state.

When docker starts a container, it creartes both the container metadata
and the task at the same time. So when a container exits, docker deletes
both of these objects as well.

This ensures that if, on start, when we go to create the container metadata object
in containerd, if there is an error due to a name conflict that we go
ahead and clean that up and try again.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 5ba30cd1dc6000ee53b34f628cbff91d7f6d7231)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1d0353548a21b0b60595ad44859a7072f90ea6c6
Component: engine
2019-02-15 01:01:52 +01:00
9f42d6f4aa Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-13 17:04:21 +00:00
a6fcb60427 Merge pull request #147 from thaJeztah/18.09_bump_golang_1.10.8
[18.09] Bump Golang 1.10.8 (CVE-2019-6486)
Upstream-commit: 02b07d4ede1af6b9186d7e2f7b712dfe6fbea994
Component: engine
2019-02-13 08:20:56 -08:00
cedb2b83c6 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-02-13 13:03:40 +00:00
f3d6952b68 Merge pull request #150 from thaJeztah/18.09_backport_fix_pkg_archive_xattr_test
[18.09 backport] pkg/archive: fix TestTarUntarWithXattr failure on recent kernel
Upstream-commit: caabacdda57eb5a9acd870018d3b8805784a3255
Component: engine
2019-02-13 12:09:06 +01:00
735870ea3d Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-02-13 05:04:07 +00:00
fc58c203b0 Merge pull request #294 from thaJeztah/18.09_backport_start_dockerd_after_containerd
[18.09 backport] Start docker.service after containerd.service
Upstream-commit: f3af90aee7be272775ac11b8906e91729e47b517
Component: packaging
2019-02-12 18:27:03 -08:00
6a2cf28a77 Merge pull request #298 from thaJeztah/18.09_backport_fix_containerd_race_condition
[18.09 backport] systemd: set --containerd socket patch to prevent race-condition
Upstream-commit: 8a4654e98e76d845e59b373ddee57fa4c1db8954
Component: packaging
2019-02-12 18:25:59 -08:00
2cb298c22b Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-02-12 21:03:57 +00:00
93dc56c138 Merge pull request #293 from thaJeztah/18.09_bump_golang_1.10.8
Merged with https://github.com/seemethere/unir
Upstream-commit: c7bc734ebfe74b6dd3bf298dd384b6860f4a7e74
Component: packaging
2019-02-12 19:59:07 +00:00
58654c0a23 pkg/archive: fix TestTarUntarWithXattr failure on recent kernel
Recent kernel has strict check for security.capability value.
Fix #38289

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 9ddd6e47a90ac056d242969ff72bf75a43cc0004)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d158b9e74fffe377b6acc7794246c89f9fb26d2f
Component: engine
2019-02-12 00:13:23 +01:00
242fedd184 keep old network ids
for windows all networks are re-populated in the store during network controller initialization. In current version it also regenerate network Ids which may be referenced by other components and it may cause broken references to a networks. This commit avoids regeneration of network ids.

Signed-off-by: Andrey Kolomentsev <andrey.kolomentsev@docker.com>
(cherry picked from commit e017717d96540dd263d95f90fdb2457928909924)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 317e0acc4e602f978e4d9c0130a113d179026c8e
Component: engine
2019-02-11 22:12:52 +01:00
4ce3c7be9a Merge branch '18.09' of github.com:docker/docker-ce into 18.09 2019-02-11 17:03:37 +00:00
bd29eaad5a Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-02-11 17:03:35 +00:00
e1aeaae20a Change back to public forks
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-02-11 16:54:46 +00:00
24e4136d6c systemd: set --containerd socket patch to prevent race-condition
containerd is now running as a separate service, and should
no longer be started as a managed child-process of dockerd.

The dockerd service already specifies that it should be started
`After` the containerd.service, but there is still a race
condition, where containerd is started, but its socket is not yet
created.

In that situation, `dockerd` detects that the containerd socket
is missing, and will start a new instance of containerd (as a
managed child-process), which causes live-restore to fail.

This patch explicitly sets the `--containerd` daemon option.
If this option is set, `dockerd` will not start a new instance
of containerd.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1985463b1337e55c0dfcad2fb985fb5af5a10c78)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 15653df497646518ec5af5cab55ebb4461ee5b80
Component: packaging
2019-02-11 14:41:33 +01:00
a6dbf1f21f [18.09] Bump Golang 1.10.8 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.8+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 325f6ee47a8edaf093ea9f829c26962310c83759
Component: engine
2019-02-09 11:05:52 +01:00
594c0469ed Ignore xattr ENOTSUP errors on copy (fixes #38155)
Signed-off-by: Dimitris Mandalidis <dimitris.mandalidis@gmail.com>
(cherry picked from commit d0192ae154e6244edd4bf1bb298ea24146378058)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c51d247f030051abb4b97770d49bac30343e45c8
Component: engine
2019-02-09 11:04:09 +01:00
62479626f2 Merge pull request #475 from andrewhsu/1809ce
[18.09-ce] ENGSEC-44 bump ver 18.09.2 and update changelog
2019-02-08 19:21:53 -08:00
408de3fdc3 bump ver 18.09.2 and update changelog
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-02-09 00:31:17 +00:00
41a97638d5 Merge component 'engine' from git@github.com:docker/ee-engine 18.09-ce 2019-02-08 23:27:48 +00:00
94f8285a9c Merge component 'packaging' from git@github.com:docker/ee-packaging 18.09-ce 2019-02-08 22:59:52 +00:00
3503a4d782 Switch to private forks for now
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-02-08 22:59:33 +00:00
e6c583ac99 Merge pull request #167 from seemethere/req_g_ce
[18.09-ce] [ENGSEC-52] Bump containerd.io dep >= 1.2.2-3 (CVE-2019-5736)
Upstream-commit: f2862f5f21cfbf2dd2ce84b213de5196879b6e9b
Component: packaging
2019-02-08 14:41:20 -08:00
4d35d88be8 Bump containerd.io dep >= 1.2.2-3 (CVE-2019-5736)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 06b649e2b07f74a94f3dbbcb233e13177a76a929
Component: packaging
2019-02-08 21:40:09 +00:00
4f8ff9b127 Merge pull request #463 from andrewhsu/18.09-ce-tp3
bump ver 18.09.2-tp3
2019-02-07 14:47:00 -08:00
28242bbbd2 bump ver 18.09.2-tp3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-02-07 18:30:33 +00:00
71adfb3f74 Merge pull request #240 from seemethere/bundle_me_up_1809
[18.09-ce] [ENGSEC-30] CVE-2019-5736 apply fix via git bundle instead of patches
Upstream-commit: eb137ff1765faeb29c2d99025bfd8ed41836dd06
Component: engine
2019-02-06 15:39:49 -08:00
e4931e664f Apply git bundles for CVE-2019-5736
A git bundle allows us keep the same SHA, giving us the ability to
validate our patch against a known entity and allowing us to push
directly from our private forks to public forks without having to
re-apply any patches.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 03dfb0ba53cc5f64b746a25aa5ed8a48763ea223
Component: engine
2019-02-06 00:25:54 +00:00
52d14c96c7 Start docker.service after containerd.service
Signed-off-by: corbin-coleman <corbin.coleman@docker.com>
(cherry picked from commit 27f7ae18f42d10221c214163e253ba79b79731d8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00600cd1217bd545762dbef7c488136735d662b6
Component: packaging
2019-01-25 14:00:33 +01:00
58fb11cbab Merge component 'cli' from git@github.com:docker/cli 18.09 2019-01-24 16:37:08 +00:00
22e12bdcfc Merge pull request #1634 from thaJeztah/18.09_bump_golang_1.10.8
[18.09] Bump Golang 1.10.8 (CVE-2019-6486)
Upstream-commit: af2647d55b
Component: cli
2019-01-24 14:27:59 +01:00
37fd1a0d0a [18.09] Bump Golang 1.10.8 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.8+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c71aa11c0a
Component: cli
2019-01-24 02:07:03 +01:00
1f467bcdc6 [18.09] Bump Golang 1.10.8 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.8+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9aec27794cc1e702bd9b9f3ac476695fc0d522a4
Component: packaging
2019-01-23 23:59:33 +01:00
4c52b901c6 Merge pull request #581 from seemethere/bump_v
[18.09] Bump version to 18.09.1
2019-01-09 11:00:56 -08:00
6caccb221d Merge component 'engine' from git@github.com:docker/engine 18.09 2019-01-09 18:03:09 +00:00
006734c577 If url includes scheme, urlPath will drop hostname, which would not match the auth check
Signed-off-by: Jameson Hyde <jameson.hyde@docker.com>
(cherry picked from commit 754fb8d9d03895ae3ab60d2ad778152b0d835206)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: a79fabbfe84117696a19671f4aa88b82d0f64fc1
Component: engine
2019-01-09 17:31:53 +00:00
0b021f6648 Authz plugin security fixes for 0-length content and path validation Signed-off-by: Jameson Hyde <jameson.hyde@docker.com>
fix comments

(cherry picked from commit 9659c3a52bac57e615b5fb49b0652baca448643e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: fc274cd2ff4cf3b48c91697fb327dd1fb95588fb
Component: engine
2019-01-09 17:31:53 +00:00
91c5fffc4b Bump version to 18.09.1
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-01-08 23:52:20 +00:00
5110db8f4f Merge component 'engine' from git@github.com:docker/engine 18.09 2019-01-08 21:03:27 +00:00
6cab4a9c3e Merge pull request #144 from thaJeztah/18.09_backport_bump_containerd_v1.2.2
[18.09 backport] Bump containerd to v1.2.2
Upstream-commit: d4f336d8ef43ca86c914952eeb44cc4489755d20
Component: engine
2019-01-08 10:05:03 -08:00
2a881442fb Bump containerd to v1.2.2
- Fix a bug that a container can't be stopped or inspected when its corresponding image is deleted
- Fix a bug that the cri plugin handles containerd events outside of k8s.io namespace

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 27cc170d2891f25ab066620e8fe94d62f81b9aa3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f80c6d7ae15443f15c014ddbd17e30cfac47b906
Component: engine
2019-01-08 02:45:06 +01:00
f2977c7888 Skip kernel-memory tests on RHEL/CentOS daemons
RHEL/CentOS 3.10 kernels report that kernel-memory accounting is supported,
but it actually does not work.

Runc (when compiled for those kernels) will be compiled without kernel-memory
support, so even though the daemon may be reporting that it's supported,
it actually is not.

This cause tests to fail when testing against a daemon that's using a runc
version without kmem support.

For now, skip these tests based on the kernel version reported by the daemon.

This should fix failures such as:

```
FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_run_unix_test.go:499: DockerSuite.TestRunWithKernelMemory

assertion failed:
Command:  /usr/bin/docker run --kernel-memory 50M --name test1 busybox cat /sys/fs/cgroup/memory/memory.kmem.limit_in_bytes
ExitCode: 0
Error:    <nil>
Stdout:   9223372036854771712

Stderr:   WARNING: You specified a kernel memory limit on a kernel older than 4.0. Kernel memory limits are experimental on older kernels, it won't work as expected and can cause your system to be unstable.

Failures:
Expected stdout to contain "52428800"

FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:125: DockerSuite.TestUpdateKernelMemory

/go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:136:
    ...open /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go: no such file or directory
... obtained string = "9223372036854771712"
... expected string = "104857600"

----------------------------------------------------------------------
FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:139: DockerSuite.TestUpdateKernelMemoryUninitialized

/go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:149:
    ...open /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go: no such file or directory
... value = nil
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1e1156cf67233cf8eaee2da9c17465ff0d9c2aa0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e042692db1316a60be35bfdca10d7e08d20f50ad
Component: engine
2019-01-05 09:53:31 +01:00
d5a7bda9e8 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-29 01:03:31 +00:00
06f6e415e9 Merge pull request #142 from docker/revert-130-18.09_backport_fix_api_return_code
Revert "[18.09 backport] API: fix status code on conflicting service names"
Upstream-commit: ce8b8f1cf33bb33811077be3b0b972dd2dbc4c79
Component: engine
2018-12-28 21:50:02 +01:00
8c0e7ea89c Revert "[18.09 backport] API: fix status code on conflicting service names"
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 24f71e39980e8a4c6eabcea16e0a9efce1660bbe
Component: engine
2018-12-28 09:40:26 -08:00
2e95726fa5 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-12-27 21:04:16 +00:00
ded83fc61b Merge pull request #286 from paddy-hack/restore-sysvinit-and-upstart-support
Restore SysVinit and Upstart support
Upstream-commit: d22718c0006e7ebb5afe8a832537ffa6273fbccf
Component: packaging
2018-12-27 14:12:46 -06:00
ffc8511d04 Restore SysVinit and Upstart support
This was removed in 662e248f680eb49a9951a8b34125506b8f82dfed.  The
removal breaks usage on Debian derivatives that do not use systemd
(see https://github.com/docker/for-linux/issues/482).
Upstream-commit: 196c4028288ad241f52201d0f171c251ed13b98f
Component: packaging
2018-12-23 20:12:09 +09:00
2df4905f67 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-12-19 16:37:00 +00:00
c6a63b52bb Merge pull request #1580 from thaJeztah/18.09_backport_e2e-invocation-nit
[18.09 backport] e2e updates
Upstream-commit: 336b2a5cac
Component: cli
2018-12-19 14:20:03 +01:00
8053e79119 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-12-18 13:04:01 +00:00
9da07880a0 Merge pull request #284 from thaJeztah/18.09_backport_cli_does_not_obsolete_selinux_and_engine
Merged with https://github.com/seemethere/unir
Upstream-commit: b9bfa649ce53d93136fe1437795498902efde81e
Component: packaging
2018-12-18 12:50:13 +00:00
2b827d4782 Remove obsolete "selinux" and "engine" packages from CLI rpm
The CLI package does not provide the functionality of the
"selinux" and "engine" packages (it does _conflict_ with
older engine packages though).

This removes the "obsoletes" from the CLI package, as the
Engine package already obsoletes the other ones.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d4e1ddb963a43ff9f0a06e4ed1b37307c8f26a17)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9e6f124b6b5deba3878ad242661d1991881f33b9
Component: packaging
2018-12-17 18:04:48 +01:00
f5e87b54df Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-17 17:00:57 +00:00
7e7a37e63e e2e: assign a default value of 0 to DOCKERD_EXPERIMENTAL
Currently running the e2e tests produces a warning/error:

    $ make -f docker.Makefile test-e2e
    «...»
    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker-cli-e2e
    ./scripts/test/e2e/run: line 20: test: : integer expression expected

This is from:

    test "${DOCKERD_EXPERIMENTAL:-}" -eq "1" && «...»

Where `${DOCKERD_EXPERIMENTAL:-}` expands to the empty string, resulting in
`test "" -eq "1"` which produces the warning. This error is enough to trigger
the short-circuiting behaviour of `&&` so the result is as expected, but fix
the issue nonetheless by provdiing a default `0`.

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 4f483276cf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c462e06fcd
Component: cli
2018-12-17 17:23:04 +01:00
130caf6e0e connhelper: add e2e
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 9b148db87a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 719508a935
Component: cli
2018-12-17 17:22:58 +01:00
b274d87a12 Merge pull request #140 from andrewhsu/d
[18.09] libcontainerd: prevent exec delete locking
Upstream-commit: 484a3c3ad0fdb59ab9bb83ef2ff79184e216313f
Component: engine
2018-12-17 16:15:27 +01:00
dba1b4aeda libcontainerd: prevent exec delete locking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 332f134890246cfc73703b2911c9fdc20e063096)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 6646d0878247b1e0875da33da606283f5d16ea07
Component: engine
2018-12-17 12:07:32 +00:00
b00fb7cf05 Revert "Propagate context to exec delete"
This reverts commit b6430ba41388f0300ceea95c10738cbe1a9a7b10.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: a9ae6c7547466f754da01a53c6be455c555e6102
Component: engine
2018-12-17 12:06:35 +00:00
af73095ae2 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-16 13:01:50 +00:00
9f8d1a9995 Merge pull request #139 from andrewhsu/ctxt
[18.09] Propagate context to exec delete
Upstream-commit: cc7773c787f400e7b11472878c3a1e55823e9c46
Component: engine
2018-12-16 11:14:58 +00:00
4f1cf45af7 Merge pull request #138 from andrewhsu/cont
[18.09] Update containerd to aa5e000c963756778ab3ebd1a12c6
Upstream-commit: b2185081d90d6e192880a33dd0cc581a6bf81539
Component: engine
2018-12-16 11:14:33 +00:00
b60801e6d4 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-12-15 01:03:25 +00:00
2eaec5333d Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-15 01:03:13 +00:00
3898ef4957 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-12-15 00:37:01 +00:00
95c87c410e Merge pull request #137 from thaJeztah/18.09_bump_golang_1.10.6
[18.09] Bump Golang 1.10.6 (CVE-2018-16875)
Upstream-commit: a6d4103450982521dbda0229d2f534e5717bfe63
Component: engine
2018-12-14 23:23:09 +00:00
f72ff31415 Propagate context to exec delete
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 96e0ba1afb228b48aa6e08a90cfc665083d24ccc)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: b6430ba41388f0300ceea95c10738cbe1a9a7b10
Component: engine
2018-12-14 22:54:46 +00:00
e775f2a03d Update containerd to aa5e000c963756778ab3ebd1a12c6
This includes a patch on top of containerd 1.2.1 to handle fifo
timeouts.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit e5d9d721626958a37dccfa0b234d9fc96d8c2bfb)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: d161dfe1a36929a03ee3dfa916d296abfd4ccef1
Component: engine
2018-12-14 22:47:44 +00:00
2f72f4ef3e Merge pull request #282 from seemethere/1_10_6_backport
Merged with https://github.com/seemethere/unir
Upstream-commit: 98f072d26bb0fc4c14e8255dffa2f3736941fab4
Component: packaging
2018-12-14 21:20:42 +00:00
fe860b72c7 Merge pull request #1575 from thaJeztah/bump_golang_1.10.6
[18.09] Bump Golang 1.10.6 (CVE-2018-16875)
Upstream-commit: 2fa3aae9ed
Component: cli
2018-12-14 20:56:04 +00:00
c86a836fc4 Bump Golang 1.10.6 (CVE-2018-16875)
go1.10.6 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.10.6 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.10.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6c3a10aaed
Component: cli
2018-12-14 01:41:33 +01:00
2b2dcff273 bump to golang 1.10.6
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 010a8c218dacf18f97aa976ac17c3863ec36b9d5)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: d5e1848a813b3019e44db7581848a66869972e56
Component: packaging
2018-12-13 23:53:43 +00:00
3e105499c9 Bump Golang 1.10.6 (CVE-2018-16875)
go1.10.6 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.10.6 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.10.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8afe9f422dc0183ce48e1db09189ccbde634080a
Component: engine
2018-12-14 00:44:49 +01:00
7dd1629b20 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-13 13:02:52 +00:00
29b8f24be7 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-12-13 12:37:03 +00:00
35ae1fc05c Merge pull request #130 from thaJeztah/18.09_backport_fix_api_return_code
[18.09 backport] API: fix status code on conflicting service names
Upstream-commit: 42b58273f68c8240e25f1642e6add6435b894e87
Component: engine
2018-12-13 10:54:52 +00:00
fbe190c787 Merge pull request #132 from thaJeztah/18.09_backport_idprefix
[18.09 backport] fixes display text in Multiple IDs found with provided prefix
Upstream-commit: a8572d3e8e1e3f738d6e9bc3bf0f137d64bab616
Component: engine
2018-12-13 10:53:54 +00:00
ed161fafa9 Merge pull request #136 from thaJeztah/18.09_backport_fix_panic
[18.09 engine] registry: use len(via)!=0 instead of via!=nil
Upstream-commit: 01c732d40a3f67bed801f8fd4b62f3dbc035b788
Component: engine
2018-12-13 10:43:38 +00:00
6e20a0f6df Merge pull request #1567 from thaJeztah/18.09_backport_fix_panic_on_update
[18.09 backport] Fix panic (npe) when updating service limits/reservations
Upstream-commit: 3ee6755815
Component: cli
2018-12-13 10:39:37 +00:00
055b2b5a9f Fix panic (npe) when updating service limits/reservations
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 579bb91853)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 16349f6e33
Component: cli
2018-12-13 02:22:43 +01:00
79cbff3cd3 registry: use len(via)!=0 instead of via!=nil
This avoids the corner case where `via` is not nil, but has a length of 0,
so the updated code does not panic in that situation.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
(cherry picked from commit a5c185b99404ea3fbab47ff9d7ba143392566bc1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3482a3b14a6414977bd9860c513abf06dedd6bf7
Component: engine
2018-12-12 18:12:01 +01:00
6021a0fde8 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-12 17:02:58 +00:00
c8cccde1d5 Merge pull request #133 from thaJeztah/18.09_backport_fix_ipam_swagger
[18.09 backport] Swagger: fix definition of IPAM driver options
Upstream-commit: 1ffccb515a9ec4b19c2ff66637c2469c62875ab1
Component: engine
2018-12-12 16:24:46 +00:00
36f2444328 Swagger: fix definition of IPAM driver options
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a5dd68186cc54ab43b0b73cd7ee3bdf923f70d3b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 55a4be8cf5787f88c1ce6bc3e2ec73402c964e5d
Component: engine
2018-12-12 01:59:01 +01:00
50be23f5a1 fixes display text in Multiple IDs found with provided prefix
Signed-off-by: Lifubang <lifubang@acmcoder.com>
(cherry picked from commit 00eb3480dc4ceb6034f8f7463ff41d2e87fb5dcc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1043f40fb561ffbf23fbdde9989abcebd8e48279
Component: engine
2018-12-11 15:15:20 +01:00
6176e25a23 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-10 17:05:10 +00:00
b412443ed2 Merge pull request #131 from tonistiigi/1809-update-buildkit
[18.09 backport] vendor: update buildkit to d9f75920
Upstream-commit: d21754a3fb453451c521ddc51df6cf109102d74c
Component: engine
2018-12-10 16:29:04 +00:00
aafd3c7cec Merge pull request #129 from thaJeztah/18.09_backport_bump_containerd_vendoring
[18.09 backport] update containerd vendoring to v1.2.1
Upstream-commit: b54b6d145ccfd5a47b774cd4205b48b3ff090afa
Component: engine
2018-12-10 13:54:05 +00:00
e27956be04 vendor: update buildkit to d9f75920
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 32f48058158cce7a6a1f8f0d1526d8224b369cbc)
Upstream-commit: 43dedf397503532f8bc1313af82a9356ed8c3550
Component: engine
2018-12-10 13:03:13 +00:00
6155a653aa Add test for status code on conflicting service names
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b0de11cf3018b482dfcf8c873261dc11c8fce0b0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a69626afb12eb9ec3e374aa563b561c0ba28f27f
Component: engine
2018-12-10 12:21:26 +01:00
c99df606e6 Update swarmkit to return correct error-codes on conflicting names
This updates the swarmkit vendoring to the latest version in the bump_v18.09
branch

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ad7105260f3c2ff32a375ff78dce9a96e01d87cb
Component: engine
2018-12-10 12:18:32 +01:00
3342cdc4ba Merge component 'cli' from git@github.com:docker/cli 18.09 2018-12-08 00:36:54 +00:00
6290aed85c Merge pull request #1554 from thaJeztah/18.09_backport_completion-import--platform
[18.09 backport] Add bash completion for `import --platform`
Upstream-commit: 2aa77af30f
Component: cli
2018-12-07 13:10:27 -08:00
4dce161c07 Merge pull request #1553 from thaJeztah/18.09_backport_completion-log-driver-local
[18.09 backport] Add bash completion for "local" log driver
Upstream-commit: 456c1ce695
Component: cli
2018-12-07 13:10:06 -08:00
0464f48da5 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-12-07 20:36:48 +00:00
0cbda9f762 Add bash completion for import --platform
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e0fe546c37)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bcadc9061c
Component: cli
2018-12-07 20:08:35 +01:00
f0885d1fab Add bash completion for "local" log driver
Ref: https://github.com/moby/moby/pull/37092

Also adds log-opt `compress` to json-file log driver because this was
also added in the referenced PR.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit c59038b15c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e05745b4a5
Component: cli
2018-12-07 20:05:08 +01:00
72b3a61238 Merge pull request #1552 from thaJeztah/18.09_backport_fix_filter_panic
[18.09 backport] Fix panic when pruning images with label-filter
Upstream-commit: b6ecef353f
Component: cli
2018-12-07 19:29:32 +01:00
c9df8f4688 use empty string as cgroup path to grab first find
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 78045a5419718ba8884ed5afc0b41a3a80afc3b4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b66c7ad62ebff12112318db0d1ed48b14f817efa
Component: engine
2018-12-07 18:58:03 +01:00
42b5bd7c0f vndr libnetwork to adjust for updated runc
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 75c4b741550a3c5cb061269cc92a5d563d153626)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5cd4797c89383159219716de92775138c2dd17c5
Component: engine
2018-12-07 18:57:54 +01:00
9f0f7c271c update containerd to v1.2.1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 615eecf8ac2a49385e346631e97850830360b8cf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7dfd23acf1d604cde70d46e36bfe2e51df2dcf46
Component: engine
2018-12-07 18:45:14 +01:00
75d17684b1 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-07 17:04:01 +00:00
1a759e5769 Fix panic when pruning images with label-filter
Before this change:

    docker image prune --force --filter "label=foobar"
    panic: assignment to entry in nil map

    goroutine 1 [running]:
    github.com/docker/cli/vendor/github.com/docker/docker/api/types/filters.Args.Add(...)
    /go/src/github.com/docker/cli/vendor/github.com/docker/docker/api/types/filters/parse.go:167
    github.com/docker/cli/cli/command/image.runPrune(0x1db3a20, 0xc000344cf0, 0x16e0001, 0xc00015e600, 0x4, 0x3, 0xc00024e160, 0xc000545c70, 0x5ab4b5)
    /go/src/github.com/docker/cli/cli/command/image/prune.go:79 +0xbaf
    github.com/docker/cli/cli/command/image.NewPruneCommand.func1(0xc00029ef00, 0xc0004a8180, 0x0, 0x3, 0x0, 0x0)
    /go/src/github.com/docker/cli/cli/command/image/prune.go:32 +0x64
    github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc00029ef00, 0xc000038210, 0x3, 0x3, 0xc00029ef00, 0xc000038210)
    /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:762 +0x473
    github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000127180, 0xc000272770, 0x1836ce0, 0xc000272780)
    /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
    github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000127180, 0xc000127180, 0x1d60880)
    /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:800 +0x2b
    main.main()
    /go/src/github.com/docker/cli/cmd/docker/docker.go:180 +0xdc

With this patch applied:

    docker image prune --force --filter "label=foobar"
    Total reclaimed space: 0B

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1e1dd5bca4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e380ddaddf
Component: cli
2018-12-07 17:58:38 +01:00
c19e3d0b29 Merge pull request #128 from thaJeztah/18.09_backport_containerd_v1.2.1-GA
[18.09 backport] update just installer of containerd to 1.2.1
Upstream-commit: 6c633fbe18e0a69db3db1aed28b3fa23bc795dfe
Component: engine
2018-12-07 06:18:48 -08:00
37a56d2599 update just installer of containerd to 1.2.1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 1014b2bb66050a11bba833349346b35e6472688b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c64d7c858b5fd16d0d14d692a3765cf8d5a5d7e
Component: engine
2018-12-07 11:20:22 +01:00
bca00687d8 Merge pull request #571 from andrewhsu/rc1
[18.09] bump ver 18.09.1-rc1 and update changelog
2018-12-06 18:12:05 -08:00
fe0ed1581f bump ver 18.09.1-rc1 and update changelog
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-12-06 23:45:38 +00:00
7bdb3c6b87 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-12-05 21:03:38 +00:00
66c694875f Merge pull request #280 from thaJeztah/18.09_backport_remove_spec
[18.09 backport] Remove unused spec files
Upstream-commit: abbaa92613ec98ce92b7d868975f67bb1927d693
Component: packaging
2018-12-05 11:38:57 -08:00
89559b9c3c Remove unused spec files
We don't use these spec files to actually build from anymore so we
should just go through and remove them.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit b98d7aad1e153c18da5b488afc40ba751f90cb36)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9d68fe72f3649fad5e3f902602c8ae9ab4a6abe5
Component: packaging
2018-12-05 15:12:29 +01:00
74239bfbe1 Merge pull request #570 from andrewhsu/b2
[18.09] bump ver 18.09.1-beta2
2018-12-03 16:12:12 -08:00
24b031ea42 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-12-03 23:53:35 +00:00
64e00cdf94 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-12-03 23:53:23 +00:00
6d1bca6a6c Merge component 'cli' from git@github.com:docker/cli 18.09 2018-12-03 23:26:41 +00:00
129720636e bump ver 18.09.1-beta2
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-12-03 23:26:14 +00:00
dce40a7ca6 Merge pull request #279 from andrewhsu/golang
[18.09] bump golang to 1.10.5
Upstream-commit: 47d440b14714e57f8cda9f042299db1d35b2b592
Component: packaging
2018-12-03 14:49:31 -08:00
11442eb1e7 bump golang to 1.10.5
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit c658dc545952bf4728e0ef3ff281bfa8823d60cb)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: df92c55b0ceefb75736d5d1f31a13f8400534a8b
Component: packaging
2018-12-03 22:21:44 +00:00
679c1150b8 Merge pull request #126 from thaJeztah/18.09_backport_mask_asound
[18.09 backport] Masked /proc/asound
Upstream-commit: 82a4418f57d5aa0d58c8bba630d701a918094c3b
Component: engine
2018-12-03 14:06:43 -08:00
66abfda9b2 Merge pull request #1542 from thaJeztah/18.09_backport_completion_cli_experimental
[18.09 backport] Add bash completion for experimental CLI commands (manifest)
Upstream-commit: 12834eeff6
Component: cli
2018-12-03 13:34:56 -08:00
46a88fbe88 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-12-03 21:04:39 +00:00
5efaa09256 Merge pull request #276 from andrewhsu/sock
Merged with https://github.com/seemethere/unir
Upstream-commit: be8c06f8a7ebaec9e7d30663c82131e0e2ae1aac
Component: packaging
2018-12-03 19:45:33 +00:00
9b0d684d7f Add docker.socket requirement for docker.service
Without this the docker.socket would not start by default when starting
the docker.service leading to failures to start.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 88885d18b1bb0ef91eab4ad3311773f9c40838b7)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 93f125a2602b7eb72128cbc16d9d35c9d92ed18a
Component: packaging
2018-12-03 19:42:41 +00:00
ffd5999784 Merge pull request #260 from thaJeztah/18.09_remove_telemetry_remnants
Merged with https://github.com/seemethere/unir
Upstream-commit: 091c4453b8e294b0e10ea9fe24c784c2086719be
Component: packaging
2018-12-03 19:40:52 +00:00
d3184b7576 Merge pull request #569 from andrewhsu/b1
[18.09] bump ver 18.09.1-beta1
2018-11-30 14:53:27 -08:00
c5d1399959 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-30 22:35:25 +00:00
23a01f3126 bump ver 18.09.1-beta1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-11-30 22:14:01 +00:00
e04edd81d4 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-11-30 22:08:33 +00:00
be73976052 Merge pull request #1544 from thaJeztah/18.09_bump_go_to_1.10.5
[18.09] Bump Go to 1.10.5
Upstream-commit: bb46da9fba
Component: cli
2018-11-30 14:03:12 -08:00
3948a779cf Merge pull request #123 from tonistiigi/1809-builder-net
[18.09] builder: set externalkey option for faster hook processing
Upstream-commit: e7a4385e240a1cfb1d795ed8d622c97f6c217585
Component: engine
2018-11-30 14:02:12 -08:00
0e511427f5 Merge pull request #127 from thaJeztah/18.09_bump_go_to_1.10.5
[18.09] Bump Go to 1.10.5
Upstream-commit: 09251ef9ca78a74d9a86ddb32bb4ab399032c3ba
Component: engine
2018-11-30 13:59:38 -08:00
5c9b82e262 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-11-30 21:01:58 +00:00
9ff11286df Bump Go to 1.10.5
go1.10.5 (released 2018/11/02) includes fixes to the go command, linker,
runtime and the database/sql package. See the milestone on the issue
tracker for details:

List of changes; https://github.com/golang/go/issues?q=milestone%3AGo1.10.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 871d24d3fc
Component: cli
2018-11-30 21:59:54 +01:00
4fa2dbdf38 Merge pull request #274 from seemethere/1809_sockles
[18.09] Add socket activation for RHEL based distributions
Upstream-commit: d2f8b45e8edb15960219b1e9ee88a6eec376ac73
Component: packaging
2018-11-30 12:54:23 -08:00
8293f65feb Add socket activation for RHEL based distributions
Removes the systemd drop-in unit file for socket activation and instead
prefers socket activation by default for both RHEL based and DEBIAN
based distributions.

Socket activation for RHEL based distributions was tested on CentOS 7 and Fedora 28.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 91c85cd38197b9d92d5b3e8a1b577d3178d73fcc)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 6a7e302c260a2ff7e4d8b7a6d01249a09c140618
Component: packaging
2018-11-30 19:43:29 +00:00
67db4a25e1 Bump Go to 1.10.5
go1.10.5 (released 2018/11/02) includes fixes to the go command, linker,
runtime and the database/sql package. See the milestone on the issue
tracker for details:

List of changes; https://github.com/golang/go/issues?q=milestone%3AGo1.10.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00ad8e7c5730f3c50ae2e548b47d1340202f72b2
Component: engine
2018-11-30 20:43:05 +01:00
b15b31936b Masked /proc/asound
@sw-pschmied originally post this in #38285

While looking through the Moby source code was found /proc/asound to be
shared with containers as read-only (as defined in
https://github.com/moby/moby/blob/master/oci/defaults.go#L128).

This can lead to two information leaks.

---

**Leak of media playback status of the host**

Steps to reproduce the issue:

 - Listen to music/Play a YouTube video/Do anything else that involves
sound output
 - Execute docker run --rm ubuntu:latest bash -c "sleep 7; cat
/proc/asound/card*/pcm*p/sub*/status | grep state | cut -d ' ' -f2 |
grep RUNNING || echo 'not running'"
 - See that the containerized process is able to check whether someone
on the host is playing music as it prints RUNNING
 - Stop the music output
 - Execute the command again (The sleep is delaying the output because
information regarding playback status isn't propagated instantly)
 - See that it outputs not running

**Describe the results you received:**

A containerized process is able to gather information on the playback
status of an audio device governed by the host. Therefore a process of a
container is able to check whether and what kind of user activity is
present on the host system. Also, this may indicate whether a container
runs on a desktop system or a server as media playback rarely happens on
server systems.

The description above is in regard to media playback - when examining
`/proc/asound/card*/pcm*c/sub*/status` (`pcm*c` instead of `pcm*p`) this
can also leak information regarding capturing sound, as in recording
audio or making calls on the host system.

Signed-off-by: Jonathan A. Schweder <jonathanschweder@gmail.com>

(cherry picked from commit 64e52ff3dbdb31adc0a9930b3ea74b04b0df8d86)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5fffdb32261145b1178f571e25fbd71572769d58
Component: engine
2018-11-30 14:57:51 +01:00
3fe8afdba7 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-30 09:04:38 +00:00
498e20e77e Merge pull request #125 from thaJeztah/18.09_backport_busybox
[18.09 backport] Windows: Tie busybox to specific version
Upstream-commit: e32fc16daa20c087eae4e7d4b16a79725a430108
Component: engine
2018-11-29 22:46:29 -08:00
613f303049 Windows:Tie busybox to version
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 14c8b67e51a8340284dfd8919843ce9edd1e5c71)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9c93de59da8eaa0e0e0377578a33b465b9465bb2
Component: engine
2018-11-30 01:38:11 +01:00
c2d6f2e82b Merge component 'cli' from git@github.com:docker/cli 18.09 2018-11-30 00:37:02 +00:00
da117f6859 Merge pull request #1540 from thaJeztah/18.09_backport_fix_flags_in_usage
[18.09 backport] Fix yamldocs outputing `[flags]` in usage output
Upstream-commit: 61a9096b8d
Component: cli
2018-11-29 13:26:27 -08:00
6709623942 builder: delete sandbox in a goroutine for performance
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit bcf1967dd0893b36c56c8c9b87c84246916484a1)
Upstream-commit: 73911117b30ba74c42177b0f002bb4e98f2473f9
Component: engine
2018-11-29 09:15:15 -08:00
71605fc317 builder: set externalkey option for faster hook processing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1ad272c7e409476fd50fc701d45329b1e05bdec9)
Upstream-commit: 8fe3b4d2ec06720fedfce2c2ef1b4fd7940961a6
Component: engine
2018-11-29 09:15:00 -08:00
280488aa00 Add bash completion for manifest command family
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 0fb4256a00)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2ac475cf97
Component: cli
2018-11-29 17:15:06 +01:00
42fbd93961 Add support for experimental cli features to bash completion
This is needed for implementing bash completion for the `docker manifest`
command family.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a183c952c6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2a36695037
Component: cli
2018-11-29 17:15:04 +01:00
13b7f9fef8 Refactor usage of docker version in bash completion
This preapares bash completion for more context sensitivity:

- experimental cli features
- orchestrator specific features

Also renames _daemon_ to _server_ where used in context of `docker version`
because the fields there are grouped unter _Server_.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 564d4da06e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dc74fc81f2
Component: cli
2018-11-29 17:15:02 +01:00
5cd594924c Fix yamldocs outputing [flags] in usage output
A similar change was made in the CLI itself, but is not
inherited by the code that generates the YAML docs.

Before this patch is applied;

```
usage: docker container exec [OPTIONS] CONTAINER COMMAND [ARG...] [flags]
```

With this patch applied:

```
usage: docker container exec [OPTIONS] CONTAINER COMMAND [ARG...]
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 44d96e9120)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7e90635652
Component: cli
2018-11-29 15:44:16 +01:00
8273d9a9de Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-11-28 21:03:32 +00:00
b766ec9947 Merge pull request #269 from thaJeztah/18.09_backport_dont_require_containerd
[18.09 backport] Remove containerd dependency from CLI
Upstream-commit: ad65acf1a609e92019c961538c4d7c1b43eaf77c
Component: packaging
2018-11-28 12:34:11 -06:00
c9bd8ec5c6 Merge pull request #263 from thaJeztah/18.09_backport_compat
[18.09 backport] Change replaces/breaks to have compat with nightly
Upstream-commit: 1a683520a4590f9a92a231f8c3ee8841dff265f3
Component: packaging
2018-11-28 12:20:39 -06:00
9c47bb0899 Remove containerd dependency from CLI
The RPM packages list containerd as a hard dependency. While
having containerd installed allows certain features (e.g., allow
you to run `docker engine activate`), this should not be a requirement
for installing the Docker CLI, as it limits the use of this package
for situations where the CLI is installed to connect to a remote
daemon.

This patch removes the containerd dependency from the RPM packages
(the deb packages don't have this dependency, so no change is needed
in those packages)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 037349c5dc3f18d3bea3be0217e249f716a8be25)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: bc3867a8f6e59c56c967720c33c6ce9a65b64b7b
Component: packaging
2018-11-28 18:19:44 +00:00
74513be78c Merge pull request #267 from thaJeztah/18.09_restore_requires
[18.09] Add back requirements that were removed in the migration
Upstream-commit: 12dff4169636676f40f782d1327c24e8ccb18f7c
Component: packaging
2018-11-28 12:15:16 -06:00
1355f268ee Merge pull request #266 from thaJeztah/18.09_add_seccomp_dependency
[18.09] Add libseccomp requirement for rpm packages
Upstream-commit: 9a7acfb9942edb67ce429f6d78c228036b0d465f
Component: packaging
2018-11-28 10:00:52 -08:00
60a25b4d26 Add back requirements that were removed in the migration
During the migration to "image based builds", some dependencies
were removed.

This patch brings back those dependencies.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a6ff66f1a51af62c9fd17a8b931f8a9b0283247a
Component: packaging
2018-11-28 15:44:43 +01:00
85e1aa53ce Add libseccomp requirement for rpm packages
This requirement was originally added in 86f76496ce33bd6eff1737348bc44add4723ddd2,
but got removed in the migration to the new image-based packaging.

Commit f2ceca98823548e401c6cca125b7057df28c4892 added this requirement
back for `.deb` packages, but did not include the same changes for
RPMs.

This patch adds back the requirement for RPM packages as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 86ed6eb2cef4e7386979fc73397c1844531eb3a9
Component: packaging
2018-11-28 15:28:34 +01:00
99e4130444 Change replaces/breaks to have compat with nightly
Nightly builds wouldn't install correctly since our versioning scheme
for nightly builds is 0.0.0~ and 0 < 18.

Should be backwards compatible with 18.09 builds so there's no need to
actually backport this to 18.09.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit de312224beff9c6bc7fd6def46459d531cf2ce4a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3e383bee967aa07d35ea717544bc18aafbbad4f7
Component: packaging
2018-11-28 13:54:25 +01:00
b8014b87d1 Remove remnants from telemetry plugin from Fedora 27, 28
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d91edcf9ae07433110c62ddfbcdb7566fb285a81)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f7b95cb416685d86541f62440927a6613af3cb25
Component: packaging
2018-11-28 13:35:39 +01:00
3b44842574 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-27 21:00:40 +00:00
d8014103b9 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-11-27 20:36:45 +00:00
7e016c5a84 Merge pull request #81 from thaJeztah/18.09_backport_processandiot
[18.09 backport] Windows:Allow process isolation
Upstream-commit: a1f6b04a8d373dbed6262f076d9aac834031d24a
Component: engine
2018-11-27 09:58:22 -08:00
06d25f9c17 Merge pull request #85 from thaJeztah/18.09_backport_deprecated_storagedrivers
[18.09 backport] deprecate legacy "overlay", and "devicemapper" storage drivers 
Upstream-commit: 7a566c0e4a98ec9960b5312e806ab546203dff15
Component: engine
2018-11-27 09:57:46 -08:00
2eb0feaf2d Merge pull request #107 from thaJeztah/18.09_backport_bump_libnetwork
[18.09 backport] update libnetwork to fix iptables compatibility on debian
Upstream-commit: 61a250fd23db8cee48403e3d9de5de100470bd03
Component: engine
2018-11-27 09:55:12 -08:00
ed2630b559 Merge pull request #110 from thaJeztah/18.09_backport_handle_invalid_json
[18.09 backport] API: properly handle invalid JSON to return a 400 status
Upstream-commit: 8f18feabeb9ef7fe670ff6f1ecbba2a6460e0267
Component: engine
2018-11-27 09:51:54 -08:00
1e216e2ec4 Merge pull request #112 from thaJeztah/18.09_backport_moby_37747
[18.09 backport] awslogs: account for UTF-8 normalization in limits
Upstream-commit: 08a77f11a63b2d25c00ca0e35012194bdcfbe917
Component: engine
2018-11-27 09:48:39 -08:00
bf3a1002a3 Merge pull request #113 from thaJeztah/18.09_backport_detach
[18.09 backport] Windows: DetachVhd attempt in cleanup
Upstream-commit: 4fd103ae26fc7784e79ed40f4e500e96477e14d2
Component: engine
2018-11-27 09:47:07 -08:00
4d5ef4f441 Merge pull request #114 from thaJeztah/18.09_backport_limit_client_readall
[18.09 backport] client: use io.LimitedReader for reading HTTP error
Upstream-commit: 52a6fc02b1caa947aac807cdca807444d96c2e27
Component: engine
2018-11-27 09:44:42 -08:00
62511b1be7 Merge pull request #116 from thaJeztah/18.09_backport_apparmor_external_templates
[18.09 backport] apparmor: allow receiving of signals from 'docker kill'
Upstream-commit: 12b8ec42b6ac60188ac48137677ee69ce98a3822
Component: engine
2018-11-27 09:41:37 -08:00
4dfe418aab Merge pull request #118 from thaJeztah/18.09_backport_fence_default_addr_pools
[18.09 backport] Ignore default address-pools on API < 1.39
Upstream-commit: 23122e4d52258b72fde031284a1d53f941e6426c
Component: engine
2018-11-27 09:38:39 -08:00
34a9d0e6de Merge pull request #119 from thaJeztah/18.09_backport_fix_default_addr_pools_swagger
[18.09 backport] Add missing default address pool fields to swagger
Upstream-commit: 04a6b49a896470420dd460b6ce027cac41791c04
Component: engine
2018-11-27 09:36:52 -08:00
cbd6c39e45 Merge pull request #120 from thaJeztah/18.09_backport_check_for_more_ipvs_options
[18.09 backport] Add CONFIG_IP_VS_PROTO_TCP, CONFIG_IP_VS_PROTO_UDP, IP_NF_TARGET_REDIRECT to check-config.sh
Upstream-commit: c488cf7e95b14d5d769a06f72f72fb899800683c
Component: engine
2018-11-27 09:35:55 -08:00
6947813afd Merge pull request #1454 from thaJeztah/18.09_backport_defaulttcpschema
[18.09 backport] fixes #1441 set default schema to tcp for docker host
Upstream-commit: 3f7989903a
Component: cli
2018-11-27 09:32:51 -08:00
f10a3615ef Merge pull request #121 from thaJeztah/18.09_backport_containerd_v1.2.1
[18.09 backport] Update containerd to v1.2.1-rc.0
Upstream-commit: c95cf2a5d36b5448e4771a29f2ad72214a2311dd
Component: engine
2018-11-27 09:15:48 -08:00
09cf4efc43 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-27 01:01:00 +00:00
4ad68f7ef8 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-11-27 00:36:45 +00:00
b213b03c69 Merge pull request #1532 from tiborvass/18.09-fix-system-prune-filters
[18.09] prune: move image pruning before build cache pruning
Upstream-commit: 7059d069c3
Component: cli
2018-11-26 16:07:21 -08:00
aae62fd361 Merge pull request #122 from tonistiigi/buildkit-18091
[18.09 backport] BuildKit fixes for 18.09.1
Upstream-commit: 9606931393cf097ddc2f13f373cf491fd575e29c
Component: engine
2018-11-26 15:56:38 -08:00
5e2e842819 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-11-26 17:04:13 +00:00
959e3a80b6 Merge pull request #254 from thaJeztah/18.09_backport_remove_old_distros
Merged with https://github.com/seemethere/unir
Upstream-commit: 1750dc22c9428a360fa31045198433cb60c4f3ad
Component: packaging
2018-11-26 16:36:52 +00:00
c79dceaf6e Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-22 01:03:54 +00:00
71bb7e098b vendor: update buildkit to v0.3.3
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 6204eb064561ba03ba9143d2b29d86836b2093d9)
Upstream-commit: 850fff5fc7f033e76ef0eec04eb98384ddf2065d
Component: engine
2018-11-21 14:10:01 -08:00
54654abf3a builder: avoid unset credentials in containerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit effb2bd9d23cc05305c4772338b9eb39423e92c6)
Upstream-commit: 0d17f4099496ba3de583273eeebefa3cce4694ca
Component: engine
2018-11-21 14:09:31 -08:00
079995778e builder: ignore label and label! prune filters
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 62923f29f514fa621e7c31011c11c610cfe33ecd)
Upstream-commit: 34867646af1d1344b1f0877bb3a00a51f7700245
Component: engine
2018-11-21 14:08:18 -08:00
fd572d6e86 builder: deprecate prune filter unused-for in favor of until
This is to keep the UX consistent. `unused-for` is still accepted and a synonym.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 369da264bac15769ae944cc880e66abaf158612b)
Upstream-commit: 0b2d88d328ca88c8732dc11c72873b53be3bd2f8
Component: engine
2018-11-21 14:08:04 -08:00
0b06dc8581 prune: move image pruning before build cache pruning
This is cleaner because running system prune twice in a row
now results in a no-op the second time.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 6c10abb247)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 4a4a1f3615
Component: cli
2018-11-21 22:01:54 +00:00
2aed2152c7 Merge pull request #84 from thaJeztah/18.09_backport_ovr2_index
[18.09 backport] overlay2: use index=off if possible (fix EBUSY on mount)
Upstream-commit: 27b0fee84688d0590cac13bf2f507a58bc841251
Component: engine
2018-11-21 15:46:01 -06:00
78dccb265d Ignore default address-pools on API < 1.39
These options were added in API 1.39, so should be ignored
when using an older version of the API.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7632ccbc66c82179547b96524672bd5082ae7481)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4cc45d91eb44cbaddcfd75335c3f72ede035c440
Component: engine
2018-11-21 22:15:18 +01:00
66a497c4f1 apparmor: allow receiving of signals from 'docker kill'
In newer kernels, AppArmor will reject attempts to send signals to a
container because the signal originated from outside of that AppArmor
profile. Correct this by allowing all unconfined signals to be received.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 4822fb1e2423d88cdf0ad5d039b8fd3274b05401)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 67c602c3fe3d5d817fb7210e50d7ed1688b28801
Component: engine
2018-11-21 22:13:56 +01:00
9baf0f2b61 Update containerd to v1.2.1-rc.0
The previous update used a commit from master. Now that
all the fixes are backported to the containerd 1.2 release
branch, we can switch back to that branch.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2fb5de68a9bd05b1dbf3ae3f7ae82bcd5e64dc5c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: db7f375d6a2aaf6d79f5c690e2f302c640bdde04
Component: engine
2018-11-21 21:59:41 +01:00
9a2dacb99c wip: bump containerd and runc version
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit d13528c6350a4b359a7b8dc9a8a7bcba12a3c1a8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7d6ec38402f4e2a5e1c83a981a88bf1a5f202858
Component: engine
2018-11-21 21:59:33 +01:00
309dc64b35 Bump containerd binary to fix shim hang
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7af4c904b31887e28776cd514e0b8cf8c0261310)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 64a05e3d162b7234f8a7aa32d10434db4c5e6364
Component: engine
2018-11-21 21:59:27 +01:00
1372540bda Update runc to 58592df56734acf62e574865fe40b9e53e967910
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fc0038a3edd518b7a4de7a8168d4888b08130c28)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 262abed3d2e84756e16c73c7c241aa62918c51c8
Component: engine
2018-11-21 21:59:20 +01:00
d9478a175e Update containerd to v1.2.0
release notes: https://github.com/containerd/containerd/releases/tag/v1.2.0

- New V2 Runtime with a stable gRPC interface for managing containers through
  external shims.
- Updated CRI Plugin, validated against Kubernetes v1.11 and v1.12, but it is
  also compatible with Kubernetes v1.10.
- Support for Kubernetes Runtime Class, introduced in Kubernetes 1.12
- A new proxy plugin configuration has been added to allow external
  snapshotters be connected to containerd using gRPC.-
- A new Install method on the containerd client allows users to publish host
  level binaries using standard container build tooling and container
  distribution tooling to download containerd related binaries on their systems.
- Add support for cleaning up leases and content ingests to garbage collections.
- Improved multi-arch image support using more precise matching and ranking
- Added a runtime `options` field for shim v2 runtime. Use the `options` field to
  config runtime specific options, e.g. `NoPivotRoot` and `SystemdCgroup` for
  runtime type `io.containerd.runc.v1`.
- Some Minor API additions
  - Add `ListStream` method to containers API. This allows listing a larger
    number of containers without hitting message size limts.
  - Add `Sync` flag to `Delete` in leases API. Setting this option will ensure
    a garbage collection completes before the removal call is returned. This can
    be used to guarantee unreferenced objects are removed from disk after a lease.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8674930c84140c990451adb148165422d008b661)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e137337fe6083da91fd6d83d699cff3a857f636e
Component: engine
2018-11-21 21:59:13 +01:00
d1211604a7 Add a note about updating runc / runc vendoring
Containerd should be "leading" when specifying which version of runc to use.
From the RUNC.MD document in the containerd repository
(https://github.com/containerd/containerd/blob/b1e202c32724e82779544365528a1a082
b335553/RUNC.md);

> We depend on a specific runc version when dealing with advanced features. You
> should have a specific runc build for development. The current supported runc
> commit is described in vendor.conf. Please refer to the line that starts with
> github.com/opencontainers/runc.

This patch adds a note to vendor.conf and runc.installer to describe the order
in which runc should be updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit da3810d235bc0bd0197243d0128f258394554704)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c9c87d76d651d57d72e52c575a2c9600170b5212
Component: engine
2018-11-21 21:59:06 +01:00
4056fb2fc0 Update containerd to v1.1.4
Fixes a potential content store bug, backported from 1.2

- v1.1.3 release notes: https://github.com/containerd/containerd/releases/tag/v1.1.3
- v1.1.4 release notes: https://github.com/containerd/containerd/releases/tag/v1.1.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b3c3c7a5a310ba340f1a86a4a708de34b9602e74)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a4decd0c4cd6033907fe85576a3d7dc8990aa758
Component: engine
2018-11-21 21:58:58 +01:00
fd1e90db5d Merge component 'cli' from git@github.com:docker/cli 18.09 2018-11-21 20:37:04 +00:00
a788be9103 Merge pull request #1531 from thaJeztah/18.09_backport_builder_docs
[18.09 backport] builder documentation updates
Upstream-commit: 1274f23252
Component: cli
2018-11-21 18:10:29 +01:00
4f11099b2c Merge component 'cli' from git@github.com:docker/cli 18.09 2018-11-21 16:37:00 +00:00
30082f9418 buildkit reference docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 83aeb219f0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3af1848dda
Component: cli
2018-11-21 17:16:30 +01:00
f36ca54c74 Documenting ENTRYPOINT can empty value of CMD
Signed-off-by: Brandon Mitchell <git@bmitch.net>
(cherry picked from commit cc316fde55)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6d91f5d55d
Component: cli
2018-11-21 17:16:24 +01:00
3489e73a84 Merge pull request #1530 from thaJeztah/18.09_backport_add_logging_driver_example
[18.09 backport] Update daemon.json example to show that log-opts must be a string
Upstream-commit: d56948c12c
Component: cli
2018-11-21 17:10:02 +01:00
a01ddfe92a Update daemon.json example to show that log-opts must be a string
log-opts are passed to logging-drivers as-is, so the daemon is not
aware what value-type each option takes.

For this reason, all options must be provided as a string, even if
they are used as numeric values by the logging driver.

For example, to pass the "max-file" option to the default (json-file)
logging driver, this value has to be passed as a string;

```json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}
```

When passed as a _number_ (`"max-file": 3`), the daemon will invalidate
the configuration file, and fail to start;

    unable to configure the Docker daemon with file /etc/docker/daemon.json: json: cannot unmarshal number into Go value of type string

This patch adds an example to the daemon.json to show these  values
have to be passed as strings.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fd33e0d933)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9b3eea87ee
Component: cli
2018-11-21 15:34:41 +01:00
bab6ed741c Merge component 'cli' from git@github.com:docker/cli 18.09 2018-11-21 12:42:52 +00:00
d437d33fc8 Merge pull request #1526 from thaJeztah/18.09_backport_completion_fix_service__force
[18.09 backport] Fix bash completion for `service update --force`
Upstream-commit: 31c092e155
Component: cli
2018-11-21 11:38:28 +01:00
2fbaf4d74c Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-11-21 01:00:43 +00:00
1703e794fe Merge pull request #258 from seemethere/sockittome
[18.09] Add the docker.socket back in
Upstream-commit: bf7dd26e4a40dafd892eba9f2b4678b0aaafc71b
Component: packaging
2018-11-20 17:46:44 -06:00
72b2e41948 Fix bash completion for service update --force
- `--force` is not available in `service create`
- `--force` is a boolean option

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 5fa5eb1da6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 046ffa4e87
Component: cli
2018-11-20 18:18:33 +01:00
bcbad46784 Add CONFIG_IP_VS_PROTO_TCP, CONFIG_IP_VS_PROTO_UDP, IP_NF_TARGET_REDIRECT to check-config.sh
On kernels without this options set, publishing ports for swarm
services does not work, making the published port not accessible
("connection refused")

Thanks to Wenbo Wang for reporting, and Tianon for finding this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 44e1c6ce81ff62c76ba630caf16a73922950abc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 25bec4665b6f011e52f7b2765ba1579c7430481d
Component: engine
2018-11-20 18:08:44 +01:00
87524aec57 Add missing default address pool fields to swagger
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2e8c913dbdfbba2591b6531ad2428c59eb261e0b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 56cc26f927e6a1de51731f88baf5b0af3a5688bc
Component: engine
2018-11-20 15:50:46 +01:00
8fc20c5a25 Add the docker.socket back in
Re-adds the docker.socket file for debian based distributions.

TAR-144 +review

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 69bd2eea398e0396c24f97d0697f9befd0f2464e)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: aaf035970219d6ae19e22bb94adaf51e61a9ff82
Component: packaging
2018-11-19 17:25:13 +00:00
8e430bdb17 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-11-15 01:03:29 +00:00
7429544e27 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-15 01:03:17 +00:00
1ece4fbc13 Merge pull request #255 from thaJeztah/18.09_backport_cosmic
Merged with https://github.com/seemethere/unir
Upstream-commit: dc8e682ed504309ced0f7f382c71b4e9fa4def07
Component: packaging
2018-11-15 00:55:20 +00:00
497150a448 Merge pull request #256 from thaJeztah/18.09_backport_fedora29
Merged with https://github.com/seemethere/unir
Upstream-commit: 8233fbfa68896527ffaef157eb0728c71712d27e
Component: packaging
2018-11-15 00:52:17 +00:00
72b50c8f3c Merge pull request #109 from thaJeztah/18.09_backport_cleanup_volume_tests
[18.09 backport] Cleanup volume integration tests
Upstream-commit: 4980e48e4b2c34288cf3f1265db6eff6713b487c
Component: engine
2018-11-14 15:41:13 -08:00
40c17e0f1b Merge pull request #103 from thaJeztah/18.09_backport_fix_double_scheme
[18.09 backport] Fix double "unix://" scheme in TestInfoAPIWarnings
Upstream-commit: 299385de7fb930e7e805faf960dc66e9cadd8ad4
Component: engine
2018-11-14 15:39:54 -08:00
a4d9985c38 runc.installer: add nokmem build tag for rhel7 kernel
In case we're running on RHEL7 kernel, which has non-working
and broken kernel memory controller, add 'nokmem' build tag
so that runc never enables kmem accounting.

For more info, see the following runc commit:
https://github.com/opencontainers/runc/commit/6a2c1559684

This behavior can be overriden by having `RUNC_NOKMEM` environment
variable set (e.g. to empty value to disable setting nokmem).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8972aa9350d52e4a7e58242447b7a9d2f0c27f37)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8486ea11ae800a1e6d634b741dfb007ba29f6003
Component: engine
2018-11-12 15:51:52 +01:00
fd839bc749 Bump runc
Changes: a00bf01908...9f1e94488e

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 335736fb0167a31a00cf2967c181a565c61334be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5b8cee93b5b6a2449d9af225e17d85c612f64ed2
Component: engine
2018-11-12 15:51:44 +01:00
c539968eac client: use io.LimitedReader for reading HTTP error
client.checkResponseErr() was hanging and consuming infinite memory
when the serverResp.Body io.Reader returns infinite stream.

This commit prohibits reading more than 1MiB.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 1db4be0c32267b7a8a27998089ce96440bed492e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 49556e047059d81b64f6cd12f4c602c9a9c471c7
Component: engine
2018-11-12 11:44:37 +01:00
825b77191a Windows: DetachVhd attempt in cleanup
Signed-off-by: John Howard <jhoward@microsoft.com>

This is a fix for a few related scenarios where it's impossible to remove layers or containers
until the host is rebooted. Generally (or at least easiest to repro) through a forced daemon kill
while a container is running.

Possibly slightly worse than that, as following a host reboot, the scratch layer would possibly be leaked and
left on disk under the dataroot\windowsfilter directory after the container is removed.

One such example of a failure:

1. run a long running container with the --rm flag
docker run --rm -d --name test microsoft/windowsservercore powershell sleep 30
2. Force kill the daemon not allowing it to cleanup. Simulates a crash or a host power-cycle.
3. (re-)Start daemon
4. docker ps -a
PS C:\control> docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                PORTS               NAMES
7aff773d782b        malloc              "powershell start-sl…"   11 seconds ago      Removal In Progress                       malloc
5. Try to remove
PS C:\control> docker rm 7aff
Error response from daemon: container 7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d: driver "windowsfilter" failed to remove root filesystem: rename C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d-removing: Access is denied.
PS C:\control>

Step 5 fails.

(cherry picked from commit efdad5374465a2a889d7572834a2dcca147af4fb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 02fe71843e0e45ddc986a6c8182370b042349a27
Component: engine
2018-11-09 23:31:49 +01:00
6ad9059d36 awslogs: account for UTF-8 normalization in limits
The CloudWatch Logs API defines its limits in terms of bytes, but its
inputs in terms of UTF-8 encoded strings.  Byte-sequences which are not
valid UTF-8 encodings are normalized to the Unicode replacement
character U+FFFD, which is a 3-byte sequence in UTF-8.  This replacement
can cause the input to grow, exceeding the API limit and causing failed
API calls.

This commit adds logic for counting the effective byte length after
normalization and splitting input without splitting valid UTF-8
byte-sequences into two invalid byte-sequences.

Fixes https://github.com/moby/moby/issues/37747

Signed-off-by: Samuel Karp <skarp@amazon.com>
(cherry picked from commit 1e8ef386279e2e28aff199047e798fad660efbdd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 757650e8dcca87f95ba083a80639769a0b6ca1cc
Component: engine
2018-11-08 15:26:01 +01:00
3cd1faba5a API: properly handle invalid JSON to return a 400 status
The API did not treat invalid JSON payloads as a 400 error, as a result
returning a 500 error;

Before this change, an invalid JSON body would return a 500 error;

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json" \
  -d '{invalid json'
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 13
>
* upload completely sent off: 13 out of 13 bytes
< HTTP/1.1 500 Internal Server Error
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:55:20 GMT
< Content-Length: 79
<
{"message":"invalid character 'i' looking for beginning of object key string"}
```

Empty request:

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json"
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
>
< HTTP/1.1 500 Internal Server Error
< Api-Version: 1.38
< Content-Length: 18
< Content-Type: application/json
< Date: Mon, 05 Nov 2018 12:00:18 GMT
< Docker-Experimental: true
< Ostype: linux
< Server: Docker/18.06.1-ce (linux)
<
{"message":"EOF"}
```

After this change, a 400 is returned;

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json" \
  -d '{invalid json'
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 13
>
* upload completely sent off: 13 out of 13 bytes
< HTTP/1.1 400 Bad Request
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:57:15 GMT
< Content-Length: 79
<
{"message":"invalid character 'i' looking for beginning of object key string"}
```

Empty request:

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json"
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
>
< HTTP/1.1 400 Bad Request
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:59:22 GMT
< Content-Length: 49
<
{"message":"got EOF while reading request body"}
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7b488fbc82604ec23b862ec1edc5a0be9c7793d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9e06a421234f0bba8392b9a8908a94ff74f0c254
Component: engine
2018-11-08 14:01:27 +01:00
2ccb209d78 Enable volume tests on Windows
These tests don't seem to have anything Linux-specific,
so enable them on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b334198e652b503d432832ec6f4faab7707d0eb4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e8eb3ca4eef1c913563195787eb1f2527c9febf3
Component: engine
2018-11-08 14:00:20 +01:00
7f84ab28cd Integration test: use filepath.Join() to make path cross-platform
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05e18429cf50afbc40456a6f4eff1cfd6f1da707)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 673f04f0b1afdb0a1f739b9a4a8b41ea1e015ea4
Component: engine
2018-11-08 14:00:14 +01:00
0356a45a1c Some improvements to TestVolumesInspect
Some improvements in this test;

- use the volume-information that's returned by VolumeCreate as "expected"
- don't use an explict name for the volume, as it was only used to reference
  the volume for inspection
- improve the test-output on failure, so that "expected" and "actual" values
  are printed

Without this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
     	volume_test.go:108: assertion failed: false (bool) != true (true bool): Time Volume is CreatedAt not equal to current time
    FAIL

With this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
        volume_test.go:95: assertion failed: expression is false: createdAt.Truncate(time.Minute).Equal(now.Truncate(time.Minute)): CreatedAt (2018-11-01 16:15:20 +0000 UTC) not equal to creation time (2018-11-01 16:15:20.2421166 +0000 UTC m=+13.733512701)
    FAIL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8e8cac82637952d49f8df42a3164478f13978c90)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 65bf95f3df84de5901479091685715f227c333ce
Component: engine
2018-11-08 14:00:08 +01:00
a5a251a531 Renamed windowsRS1.ps1 to windows.ps1
Signed-off-by: Deep Debroy <ddebroy@docker.com>
(cherry picked from commit 7d1c1a411b5c5bd58e657b24261f32d04fa0d8c5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9fc9c3099da40b21fed9adc758f8787dbd3cedfd
Component: engine
2018-11-08 13:56:04 +01:00
36fc33af11 Enabling Windows integration tests
Signed-off-by: Salahuddin Khan <salah@docker.com>
(cherry picked from commit 4c8b1fd5a2803e393ad1296692533b7b5c727918)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 37cb9e73006acd13b9708cd594ebc25054fef666
Component: engine
2018-11-08 13:55:59 +01:00
171a95c777 Windows: Start of enabling tests under integration/
- Add windows CI entrypoint script.

Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit d3cc071bb98669545d4e3043c9bd85879292b815)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 59be98043a02f44b63b26f159461fed08292e027
Component: engine
2018-11-08 13:55:48 +01:00
4d60db472b Merge pull request #568 from andrewhsu/ga
[18.09] bump ver 18.09.0 and update changelog
2018-11-06 15:13:32 -08:00
255b96feb8 added link to official release notes page
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-11-06 22:53:52 +00:00
f2343d1f79 bump ver 18.09.0 and update changelog
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-11-06 21:30:56 +00:00
aba1f6009c Merge pull request #567 from thaJeztah/18.09_fixup_changelog
[18.09] Fix typo in changelog
2018-11-06 13:29:35 -08:00
a725999adf Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-06 21:01:39 +00:00
97ead3de83 Merge pull request #74 from thaJeztah/18.09_backport_no_more_version_mismatch
[18.09 backport] remove version-checks for containerd and runc
Upstream-commit: f5749085e9cb0565afe342e73a67631f97547054
Component: engine
2018-11-06 11:31:40 -08:00
26724923df Merge pull request #79 from thaJeztah/18.09_backport_bugfix_issue_37870
[18.09 backport] bugfix: wait for stdin creation before CloseIO
Upstream-commit: 6236f7b8a47fbd77895f8894306de4555d511f40
Component: engine
2018-11-06 11:27:58 -08:00
9e9298ef28 Merge pull request #108 from tonistiigi/copy-0.1.9
[18.09] builder: update copy to 0.1.9
Upstream-commit: 9512677feb8480bf13844cc4c225310bbdd2cf04
Component: engine
2018-11-06 11:26:09 -08:00
a1a6612bf9 Merge pull request #96 from thaJeztah/18.09_backport_fix-duplicate-release
[18.09 backport] builder: fix duplicate mount release
Upstream-commit: 5bb36e25baef86d3ac230a2fccc182f2766c3e26
Component: engine
2018-11-06 11:22:47 -08:00
a78fdada01 builder: update copy to 0.1.9
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 45654ed0126aadaf6c3293b0a32ca8cf15021626
Component: engine
2018-11-06 10:52:34 -08:00
550a02aa99 Merge pull request #105 from tiborvass/18.09-bk-fix-filters
[18.09] builder: fix bugs when pruning buildkit cache with filters
Upstream-commit: 334099505f1b429f07e55b4aec31a8e223cea5ca
Component: engine
2018-11-06 09:23:25 -08:00
e2c5b23d49 [18.09 backport] update libnetwork to fix iptables compatibility on debian
Fixes a compatibility issue on recent debian versions, where iptables now uses
nft by default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e1783a72d1b84bc3e32470c468d14445e5fba8db
Component: engine
2018-11-06 12:39:04 +01:00
90250502de update containerd client and dependencies to v1.2.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit dd7799afd40b74e538af01fc658c861d225a4b82)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c27094289aadaad4ad4d78aefcc44e95278d3508
Component: engine
2018-11-06 11:03:22 +01:00
02673c7372 bump up runc
Changes: 69663f0bd4...a00bf01908

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 275044bbc374b563a2039229660df58a75bdc9f3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0afe0309bd9580bc76496c9e0da75216795c1c01
Component: engine
2018-11-06 11:03:14 +01:00
3d605988c4 Vendor Microsoft/hcsshim @ v0.7.9
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit d03ab106624ebc30b69080d0092702ad1fe1285c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 41f3cea42f2f45244051b7f829c0ef9c27383c26
Component: engine
2018-11-06 11:03:06 +01:00
cd9d72e185 LCOW: ApplyDiff() use tar2ext4, not SVM
Signed-off-by: John Howard <jhoward@microsoft.com>

This removes the need for an SVM in the LCOW driver to ApplyDiff.

This change relates to a fix for https://github.com/moby/moby/issues/36353

However, it found another issue, tracked by https://github.com/moby/moby/issues/37955

(cherry picked from commit bde99960657818efabf313991867c42921882275)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9cf6464b639aef09df9b16999cc340a1276d0bf8
Component: engine
2018-11-06 11:03:00 +01:00
0c72992e43 builder: fix bugs when pruning buildkit cache with filters
Only the filters the user specified should be added as cache filters to buildkit.
Make an AND operation of the provided filters.
ID filter now does prefix-matching.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit b6137bebb83e886aef906b7ff277778b69616991)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 52a3c39506b883f713694ce39d1a4fd9f5638800
Component: engine
2018-11-05 22:59:24 +00:00
ac4c86d93f Fix typo in changelog
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-05 17:24:59 +01:00
6e632f7fc3 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-11-01 02:55:32 +00:00
00d50de788 Merge pull request #104 from anshulpundir/1809
[18.09] Vendor swarmkit to 6186e40
Upstream-commit: 4fc9786f7869a823962b7da6c876288b37d8da54
Component: engine
2018-10-31 19:01:51 -07:00
ccef7c659b [18.09] Vendor swarmkit to 6186e40fb04a7681e25a9101dbc7418c37ef0c8b
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
Upstream-commit: 46dfcd83bf1bb820840df91629c04c47b32d1e21
Component: engine
2018-10-31 16:04:51 -07:00
81daf7f4fb Fix double "unix://" scheme in TestInfoAPIWarnings
`d.Sock()` already returns the socket-path including the
`unix://` scheme.

Also removed `--iptables=false`, as it didn't really seem
nescessary for this test.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 14342046477b7ed87a9c5c451bb4520c7f6cabcc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c40a7d393bca990e07973024e71034b4b6fc05e5
Component: engine
2018-10-31 14:25:40 +01:00
3cf3a6d8dd Add initial scripts for Fedora 29
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 42f5f2f4384f1699fbe55746d53718016cd6fb87)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6c3958b6ac3633a500d268a8238bd20f636e366d
Component: packaging
2018-10-31 11:29:45 +01:00
acbcddf771 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-31 04:57:01 +00:00
a659f7a44e Merge pull request #99 from andrewhsu/grpc
[18.09] cluster: set bigger grpc limit for array requests
Upstream-commit: fb51c760c4fed545a83a6b6f88716e5d6bb8b1f0
Component: engine
2018-10-30 18:49:11 -07:00
e0d454c3ea Merge pull request #100 from thaJeztah/18.09_backport_log_error_spelling
[18.09 backport] Fix incorrect spelling in error message
Upstream-commit: 66bfae52bca82e6e3055ea5ce0203758af5364e9
Component: engine
2018-10-30 18:47:28 -07:00
00083e1aa8 cluster: set bigger grpc limit for array requests
4MB client side limit was introduced in vendoring go-grpc#1165 (v1.4.0)
making these requests likely to produce errors

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 489b8eda6674523df8b82a210399b7d2954427d0)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 6ca0546f2571cf4acdc1f541bccfac23a78cb8d2
Component: engine
2018-10-30 23:04:27 +00:00
f22cebfc87 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-30 21:06:13 +00:00
25ad6f737d Merge pull request #101 from thaJeztah/18.09_backport_document_service_version
[18.09 backport] Add more API doc details on service update version.
Upstream-commit: 2822d49c10dd658dd8caf3f1933f28498e022cf9
Component: engine
2018-10-30 13:14:04 -07:00
5425e3a895 Add more API doc details on service update version.
Hopefully this removes some confusion as to what this version number
should be.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 5bdfa19b8646839f9d704307aa6589c7d686db44)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 64b0c76151ceb7b26f9c7477f3044dac747d227b
Component: engine
2018-10-30 14:25:19 +01:00
927264f5be Fix incorrect spelling in error message
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
(cherry picked from commit f962bd06ed8824d1f75d8546b428965cd61bdf7f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5591f0b1ee7dec101b490228258613cd7caf64ee
Component: engine
2018-10-30 11:29:02 +01:00
8e50d736f7 Merge pull request #565 from andrewhsu/ce-rc1
[18.09] bump ver 18.09.0-rc1
2018-10-29 10:14:04 -07:00
2f6a656f7b Merge pull request #564 from thaJeztah/18.09_update_changelog
[18.09] update change-log
2018-10-29 10:13:13 -07:00
ffc654dcaf bump ver 18.09.0-rc1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-10-26 22:54:47 +00:00
8447e74ed3 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-26 21:04:07 +00:00
93dbc410da Merge pull request #38 from thaJeztah/18.09_backport_bump_golang_1.10.4
[18.09 backport] bump Go to 1.10.4
Upstream-commit: 4594e70063536de97c1f02e714717c5188a6ea11
Component: engine
2018-10-26 10:03:38 -07:00
28784ed782 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-26 16:37:07 +00:00
1c8c425da1 Merge pull request #1483 from thaJeztah/18.09_backport_docs_fixes
[18.09 backport] various docs fixes
Upstream-commit: 51668a30f2
Component: cli
2018-10-26 15:54:26 +01:00
55a55ecfd7 Update changelog for 18.09
- remove features/fixes that were backported to 18.06, so already shipped
- re-organised some change to be in a more suitable section
- add information about deprecated features, and distros

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-26 16:35:04 +02:00
c42096eff2 Add initial scripts for Ubuntu Cosmic (18.10)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 3228c358954810ad1664dbf1d96c7e55655e8850)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b10fbb89792803ed17478eb41348510c56e297a4
Component: packaging
2018-10-26 14:32:27 +02:00
8d9b4f4fd9 README: remove Ubuntu 17.10 "Artful"
Packages are no longer built for Ubuntu 17.10 since
commit eb635bdb3044b008344c8318c8d727ac94662526, so
remove it from the README as well

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9cab4c43c4dd30e86efed1dfb9199ed91d766eca)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 89705eb29d9f8782cf218a6d4692dd8a34a95857
Component: packaging
2018-10-26 14:25:17 +02:00
6c2e70dfb4 Remove Ubuntu 14.04 "trusty tahr" build scripts
Docker no longer ships packages for Ubuntu 14.04,
so remove the build scripts as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3a8fa7fc0acc5c3fb468ec5ec41e236e741c804e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 90fadd7b66e8696cc0d3479293bc62ea730ec51e
Component: packaging
2018-10-26 14:25:15 +02:00
4944d0221b Remove build scripts for Debian 8 "Jessie"
Docker is no longer packaged for Debian Jessie,
so remove the scripts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 49524c88c2b2ab1751941992913adcff36487f7a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 146e29aa88e8598d5a89ae29a091ff303fd4f3e5
Component: packaging
2018-10-26 14:25:12 +02:00
5955459088 README: Remove mention of Debian 7 Wheezy
Packages for Wheezy are no longer built, so remove it
from the list of packages in the README.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c8935f360bc083ed61984a691bcfe19e9cfa1749)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9e724cc033c392764c1bf3b37d40ccb4d2e66bcd
Component: packaging
2018-10-26 14:25:09 +02:00
a1852cbb5d Bump Go to 1.10.4
Includes fixes to the go command, linker, and the net/http, mime/multipart,
ld/macho, bytes, and strings packages. See the Go 1.10.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.10.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fe1fb7417c360f185ce608e0bfda41c0ef9fe364)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 72368177254811e5816f03a4773deaafb9df5202
Component: engine
2018-10-26 12:14:01 +02:00
538821f24d Changelog: remove low-level code changes from changelog
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-26 10:47:24 +02:00
5e9d09bd21 docs, ssh: unsupport password auth explicitly
The issue with password auth is tracked in #1476 and #1477 .

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 16b014e062)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5e7f9d3c84
Component: cli
2018-10-25 15:30:33 +02:00
276842f234 Documenting example default-ulimit in daemon.json
Signed-off-by: Brandon Mitchell <git@bmitch.net>
(cherry picked from commit 3f4f450941)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 72ddefbada
Component: cli
2018-10-25 15:30:31 +02:00
d10776afc8 Updating rmi doc example to specify latest tag
Signed-off-by: Brandon Mitchell <git@bmitch.net>
(cherry picked from commit f913b73c81)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 135aa72476
Component: cli
2018-10-25 15:30:28 +02:00
e3391440cf Minor typo fix in run documentation
Quick syntax fix!

Signed-off-by: Scott Brenner <scott@scottbrenner.me>
(cherry picked from commit 50143cff12)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7c7fe26a6f
Component: cli
2018-10-25 15:30:26 +02:00
e24f75905c Clarify in docs that docker tag doesn't publish
I am attempting to push a tag to a private repository. The documentation for `docker tag`  has an explicit example to for how ["To push an image to a private registry"](https://docs.docker.com/engine/reference/commandline/tag/#tag-an-image-referenced-by-name). My colleague clarified that this command does not in fact push anything, so I thought this PR might save some future novice the same confusion.

Signed-off-by: Jake Lambert <jake.lambert@volusion.com>
(cherry picked from commit 4ed484bac4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1df47ffb4d
Component: cli
2018-10-25 15:30:24 +02:00
599776a8d5 Fix login documentation layout
ddadd3db49 mass standardized the
formatting, with some errors.

This commit fixes errors on `login.md`:
- revert wrong `Logging out` headline
- restore correct level for some headlines (relative to parent
  headline level change)
- re-add `Usage` headlines, with better name

Also add `related commands` headline on `login` and `logout`.

Signed-off-by: Thomas Riccardi <thomas@deepomatic.com>
(cherry picked from commit a0e3ec8790)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2e7e529a18
Component: cli
2018-10-25 15:30:22 +02:00
17b4292370 Docs: Add Spaces Around Parenthesis Where Needed
Signed-off-by: Alex Mayer <amayer5125@gmail.com>
(cherry picked from commit 2b0fdd0f17)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f8f230181e
Component: cli
2018-10-25 15:30:19 +02:00
426999c6b7 Typo fix
Signed-off-by: Lihua Tang <lhtang@alauda.io>
(cherry picked from commit ca5e453180)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0ee4693953
Component: cli
2018-10-25 15:30:17 +02:00
0f20787c8d Typo fix: filesytem -> filesystem
Signed-off-by: Rui Cao <ruicao@alauda.io>
(cherry picked from commit 2eb95909ee)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cb4cd04c64
Component: cli
2018-10-25 15:30:15 +02:00
b3a928b911 update docs with current supported features options
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit d656706678)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d2e771fed6
Component: cli
2018-10-25 15:30:09 +02:00
0efe5965c1 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-25 08:37:00 +00:00
365d729aa7 Merge pull request #1481 from thaJeztah/18.09_backport_fix_docker_invalid_subcommand
[18.09 backport] Fix `docker invalid-subcommand` regression
Upstream-commit: b8911a3b33
Component: cli
2018-10-25 09:35:28 +02:00
1336d5cca6 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-25 01:03:51 +00:00
1ed3603e97 Merge pull request #95 from thaJeztah/add_note_about_branch
[18.09] Add note that we use the bump_v18.09 branch for SwarmKit
Upstream-commit: 78746ca9e8cc46304509866ab34851f56b4a7edb
Component: engine
2018-10-24 16:57:02 -07:00
5b7ee8a3f9 Fix docker invalid-subcommand regression
Starting with a3fe7d62b8,
`docker invalid-subcommand` did not exit with non-zero status.

Fix #1428

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit d708cada43)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ebe071a9b3
Component: cli
2018-10-24 20:49:10 +02:00
ea7e1c4aaa builder: fix duplicate mount release
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2732fe527f9258561c7310c128914b4b456c8404)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5853cd510c3272755ca5d6605ca8039d54a5ba15
Component: engine
2018-10-24 20:11:51 +02:00
e1910c5f5f Merge pull request #562 from andrewhsu/b5
[18.09] bump ver to 18.09.0-beta5
2018-10-23 14:46:15 -07:00
6e241df9f8 bump ver to 18.09.0-beta5
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-10-23 21:39:18 +00:00
df76a461d4 Add note that we use the bump_v18.09 branch for SwarmKit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ee7d86a12fe83953eff0efd4de5878b4ff6814d
Component: engine
2018-10-23 13:37:15 +02:00
b8f9cfd066 testing: add case for exec closeStdin
add regression case for the issue#37870

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 8e25f4ff6d89888a1bcd578f3f8f7aab89dce24d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ae6284a623bac86ac6ab718fa4a369dd8c0a3cfc
Component: engine
2018-10-23 13:20:45 +02:00
069824851c Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-23 04:37:00 +00:00
1264bbcba4 Merge pull request #1475 from tiborvass/18.09-fix-build-stream
[18.09] build: update session support detection
Upstream-commit: ecb972ab38
Component: cli
2018-10-22 19:24:24 -07:00
1f96503016 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-23 01:03:38 +00:00
1a55d345e4 Merge pull request #94 from dperny/18.09-bump-swarmkit
[18.09 Backport] Bump swarmkit to c82e409d
Upstream-commit: 8d624c31dd25814272117bbdd908a4414e636aed
Component: engine
2018-10-22 16:47:21 -07:00
38029eb7d3 build: update session support detection
Avoid testing for session support in non-buildkit builder to support
servers that falsely report as `1.39` compatible

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 3e8c41beb0)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 4c68a9666f
Component: cli
2018-10-22 23:02:08 +00:00
7d67a90c9e Bump swarmkit
Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 1222a7081ac9ebb0830a6c8008142258c49800b5
Component: engine
2018-10-22 15:10:20 -05:00
3cd26635be Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-22 15:54:05 +00:00
cd3e286dd2 Merge pull request #64 from thaJeztah/18.09_backport_syslog
[18.09 backport] move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG
Upstream-commit: 6f1145e740f35a0b805a11d5d29daa89d2a27ed0
Component: engine
2018-10-22 08:24:03 -07:00
e64ccf7307 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-20 00:36:45 +00:00
445ab382ac Merge pull request #1458 from dhiltgen/bump_licensing_lib
[18.09] Bump licensing lib
Upstream-commit: e245b72381
Component: cli
2018-10-19 13:58:37 -07:00
cf004ef4ac Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-19 17:09:31 +00:00
96aa81d195 Merge pull request #93 from ctelfer/18.09-backport-dsr
[18.09] Bump libnetwork to 6da50d19 for DSR load balancing changes
Upstream-commit: ef87a664ef2554af9afa85ed25ffb82c39105624
Component: engine
2018-10-19 09:37:11 -07:00
97cb814898 Remove e-mail from trial flow
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 0ff9e5cd10
Component: cli
2018-10-18 14:56:59 -07:00
e4aeadf8ea Bump licensing library
Removes the billing profile flow which is now handled on the back-end.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 8e565d0399
Component: cli
2018-10-18 14:44:05 -07:00
6e881228a8 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-18 21:03:44 +00:00
72eaf55d91 Merge pull request #88 from tonistiigi/fix-private-pull-1809
[18.09 backport] builder: fix private pulls on buildkit
Upstream-commit: 3dc9802a83ba8ca42c2dc068e5c19dacd9bbe3db
Component: engine
2018-10-18 10:57:46 -07:00
648ce8a093 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-10-18 17:03:32 +00:00
2078498ea1 Merge pull request #252 from thaJeztah/18.09_backport_notify
[18.09 backport] Restore `Type=notify` in Systemd unit
Upstream-commit: 50b5361dabe74c9511ad41586461415d021e7b93
Component: packaging
2018-10-18 09:29:55 -07:00
f88793e75f Restore Type=notify in Systemd unit
Signed-off-by: Valentin Kulesh <valentin.kulesh@virtuozzo.com>
(cherry picked from commit 221b152fde996db4c7571c37f8b934db7f5dda49)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ea2b2cdae5f6eab1bd99d6a79904093bcf8569ea
Component: packaging
2018-10-18 17:14:52 +02:00
d5fc44041a Bump libnetwork to 6da50d19 for DSR changes
Bump libnetwork to 6da50d1978302f04c3e2089e29112ea24812f05b which
is the current tip of libnetwork's bump_18.09 branch to get the DSR load
balancing mode option changes for the 18.09 branch of Docker CE.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: fd1fe0b702571865cc77d66937e4ca570b5b9cc3
Component: engine
2018-10-18 10:52:57 -04:00
5521475b61 builder: fix private pulls on buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit c693d45acf74b87680ace0db8615f97bd6853598)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fdaf08a57b2348623f33e0b9855c488421fc7bf6
Component: engine
2018-10-17 17:54:13 -07:00
5723bac1cf Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-18 00:36:41 +00:00
7a7697542d Merge pull request #1455 from thaJeztah/18.09_backport_legacy_drivers
[18.09 backport] deprecate devicemapper and legacy overlay storage drivers
Upstream-commit: 8a424333f9
Component: cli
2018-10-18 00:46:50 +02:00
74ac8029eb Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-17 16:37:04 +00:00
ff7d5feab1 Deprecate "devicemapper" storage driver.
The `devicemapper` storage driver is deprecated in favor of `overlay2`, and will
be removed in a future release. Users of the `devicemapper` storage driver are
recommended to migrate to a different storage driver, such as `overlay2`, which
is now the default storage driver.

The `devicemapper` storage driver facilitates running Docker on older (3.x) kernels
that have no support for other storage drivers (such as overlay2, or AUFS).

Now that support for `overlay2` is added to all supported distros (as they are
either on kernel 4.x, or have support for multiple lowerdirs backported), there
is no reason to continue maintenance of the `devicemapper` storage driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 662441ba31)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fde819236b
Component: cli
2018-10-17 18:04:04 +02:00
4708e0d609 Deprecate legacy overlay storage driver
The `overlay` storage driver is deprecated in favor of the `overlay2` storage
driver, which has all the benefits of `overlay`, without its limitations (excessive
inode consumption). The legacy `overlay` storage driver will be removed in a future
release. Users of the `overlay` storage driver should migrate to the `overlay2`
storage driver.

The legacy `overlay` storage driver allowed using overlayFS-backed filesystems
on pre 4.x kernels. Now that all supported distributions are able to run `overlay2`
(as they are either on kernel 4.x, or have support for multiple lowerdirs
backported), there is no reason to keep maintaining the `overlay` storage driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8bc2aa45a6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aa6314c663
Component: cli
2018-10-17 18:03:57 +02:00
b559a6c7e0 Merge pull request #1453 from tiborvass/18.09-builder-prune-filter-unused-for
[18.09 backport] builder/prune: rename max-age filter to unused-for in help output
Upstream-commit: 81ee98e861
Component: cli
2018-10-17 17:56:13 +02:00
36aa32ea5b add test case TestNewAPIClientFromFlagsForDefaultSchema
Signed-off-by: Lifubang <lifubang@acmcoder.com>
(cherry picked from commit beed8748c0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8ae4453d46
Component: cli
2018-10-17 17:48:07 +02:00
cbcb491714 set default schema to tcp for docker host
Signed-off-by: Lifubang <lifubang@acmcoder.com>
(cherry picked from commit 2431dd1448)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aeea559129
Component: cli
2018-10-17 17:47:58 +02:00
b8496ef4f6 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-17 04:36:59 +00:00
1233477cee Merge pull request #1432 from thaJeztah/18.09_backport_use_string_builder
[18.09] backport using strings.Builder instead of string appending
Upstream-commit: 22336b332c
Component: cli
2018-10-16 19:42:29 -07:00
8295793d0a builder/prune: rename max-age filter to unused-for in help output
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit c9ce6dc656)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 2961611fda
Component: cli
2018-10-17 00:37:24 +00:00
638093a792 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-16 20:53:40 +00:00
80c0dcadc2 Merge pull request #1421 from dhiltgen/final_url
[18.09] Update release note link to final location
Upstream-commit: 17adf05188
Component: cli
2018-10-16 19:42:48 +02:00
47c12340f9 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-13 05:10:10 +00:00
8eac62569b Merge pull request #86 from kolyshkin/18.09-backport-btrfs-prop
[18.09] backport Fix mount propagation for btrfs
Upstream-commit: 4d0b8cc2d701e2a09b8e1f889b98c08d225d8145
Component: engine
2018-10-12 18:28:24 -07:00
3c8118bea2 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-12 21:00:52 +00:00
23c67fa29f Merge pull request #82 from tiborvass/18.09-buildkit-cherry-picks
[18.09 backport] builder: treat unset keep-storage as 0
Upstream-commit: 7c63f178e7f2405337893c14b3c8c748b5cc1897
Component: engine
2018-10-12 11:01:20 -07:00
4c92b55e3f Merge pull request #83 from thaJeztah/18.09_backport_bump_buildkit
[18.09 backport] bump buildkit to c7bb575343df0cbfeab8b5b28149630b8153fcc6
Upstream-commit: b811212ccdbfd752675de1161e59ca194c798da4
Component: engine
2018-10-12 10:43:01 -07:00
d00ceca6f0 btrfs: ensure graphdriver home is bind mount
For some reason, shared mount propagation between the host
and a container does not work for btrfs, unless container
root directory (i.e. graphdriver home) is a bind mount.

The above issue was reproduced on SLES 12sp3 + btrfs using
the following script:

	#!/bin/bash
	set -eux -o pipefail

	# DIR should not be under a subvolume
	DIR=${DIR:-/lib}
	MNT=$DIR/my-mnt
	FILE=$MNT/file

	ID=$(docker run -d --privileged -v $DIR:$DIR:rshared ubuntu sleep 24h)
	docker exec $ID mkdir -p $MNT
	docker exec $ID mount -t tmpfs tmpfs $MNT
	docker exec $ID touch $FILE
	ls -l $FILE
	umount $MNT
	docker rm -f $ID

which fails this way:

	+ ls -l /lib/my-mnt/file
	ls: cannot access '/lib/my-mnt/file': No such file or directory

meaning the mount performed inside a priviledged container is not
propagated back to the host (even if all the mounts have "shared"
propagation mode).

The remedy to the above is to make graphdriver home a bind mount.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 16d822bba8ac5ab22c8697750f700403bca3dbf3)
Upstream-commit: fa8ac946165b8004a15e85744e774ed6ba99fd38
Component: engine
2018-10-12 09:29:38 -07:00
de86551520 pkg/mount: add MakeMount()
This function ensures the argument is the mount point
(i.e. if it's not, it bind mounts it to itself).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8abadb36fa8149cd44e76b0e7fdedd6f1f2eccd0)
Upstream-commit: 2199ada691dc635cac5cdd065d909a539dd0b793
Component: engine
2018-10-12 09:29:38 -07:00
0d643ed639 pkg/mount: simplify ensureMountedAs
1. There is no need to specify rw argument -- bind mounts are
   read-write by default.

2. There is no point in parsing /proc/self/mountinfo after performing
   a mount, especially if we don't check whether the fs is mounted or
   not -- the only outcome from it could be an error from our mountinfo
   parser, which makes no sense in this context.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f01297d1ae352bc2bf01ebf62e879c1c83cdbee4)
Upstream-commit: fd7611ff1f1d61d5b4b45b2c0bd83976cbccf174
Component: engine
2018-10-12 09:29:38 -07:00
cf996cb87c Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-12 00:36:41 +00:00
09de879e7a Deprecate legacy overlay storage driver, and add warning
The `overlay` storage driver is deprecated in favor of the `overlay2` storage
driver, which has all the benefits of `overlay`, without its limitations (excessive
inode consumption). The legacy `overlay` storage driver will be removed in a future
release. Users of the `overlay` storage driver should migrate to the `overlay2`
storage driver.

The legacy `overlay` storage driver allowed using overlayFS-backed filesystems
on pre 4.x kernels. Now that all supported distributions are able to run `overlay2`
(as they are either on kernel 4.x, or have support for multiple lowerdirs
backported), there is no reason to keep maintaining the `overlay` storage driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 31be4e0ba11532e5d6df8401f5d459e292c58f36)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c20e8dffbbb4dd328e4c00d18e04eecb80cf4d4e
Component: engine
2018-10-12 02:26:17 +02:00
b1f3714ba1 Deprecate "devicemapper" storage driver, and add warning
The `devicemapper` storage driver is deprecated in favor of `overlay2`, and will
be removed in a future release. Users of the `devicemapper` storage driver are
recommended to migrate to a different storage driver, such as `overlay2`, which
is now the default storage driver.

The `devicemapper` storage driver facilitates running Docker on older (3.x) kernels
that have no support for other storage drivers (such as overlay2, or AUFS).

Now that support for `overlay2` is added to all supported distros (as they are
either on kernel 4.x, or have support for multiple lowerdirs backported), there
is no reason to continue maintenance of the `devicemapper` storage driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 06fcabbaa0d4f25db0580d3604bbed708223fb06)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 734e7a8e55e41b064025273776dc5a76e45bf2e1
Component: engine
2018-10-12 02:25:39 +02:00
b904d7cce8 Merge pull request #1438 from thaJeztah/18.09_backport_hide-buildkit-flags-if-not-enabled
[18.09 backport] builder / buildkit updates
Upstream-commit: 39f1110308
Component: cli
2018-10-11 15:35:44 -07:00
e50a0b1358 build: only show buildkit-specific flags if buildkit is enabled
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit bbd01fe3df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3dfacb55a4
Component: cli
2018-10-12 00:16:48 +02:00
0567258823 build: add SSH agent socket forwarder (docker build --ssh $SSHMOUNTID=$SSH_AUTH_SOCK)
Unlike `docker build --secret`, `docker build --ssh` allows the build container to
use SSH keys with passphrases.

  $ eval $(ssh-agent)
  $ ssh-add ~/.ssh/id_rsa
  (Input your passphrase here)
  $ docker build --ssh default=$SSH_AUTH_SOCK ...

This feature requires the daemon with `CapExecMountSSH` build capability (moby/moby#37973) .

Currently, the official Dockerfile frontend does not provide the syntax for using the SSH forwarder.

However, the experimental `RUN --mount=type=ssh` syntax can be enabled by using
the Dockerfile frontend image built with the `BUILDTAGS="dfrunmount dfssh"`, via the `# syntax =` "shebang".

The Dockerfile for the Dockerfile frontend is available at  github.com/moby/buildkit/frontend/dockerfile/cmd/dockerfile-frontend)
The pre-built image is also available as `tonistiigi/dockerfile:ssh20181002` .

An example Dockerfile with `RUN --mount=type=ssh`:

  # syntax = tonistiigi/dockerfile:ssh20181002
  FROM alpine
  RUN apk add --no-cache openssh-client
  RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
  RUN --mount=type=ssh ssh git@gitlab.com | tee /hello
  # "Welcome to GitLab, @GITLAB_USERNAME_ASSOCIATED_WITH_SSHKEY" should be printed here

More info available at moby/buildkit#608, moby/buildkit#655

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit db7399a016)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e942084530
Component: cli
2018-10-12 00:16:42 +02:00
d60152ea51 bump up buildkit
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 846c38cbd7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 50f529fa47
Component: cli
2018-10-12 00:16:38 +02:00
a0b6f39579 Bump buildkit and dependencies to 39404586a50d1b9d0fb1c578cf0f4de7bdb7afe5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8cfd24049f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4bee9be75
Component: cli
2018-10-12 00:16:29 +02:00
5f740b96aa Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-11 21:03:33 +00:00
2d00f9e2eb builder: treat unset keep-storage as 0
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d6ac2b0db00455824c400394f316bdbc5adf8867)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: dbfc648a94569d8dbc8c6468d56ec93559363bb0
Component: engine
2018-10-11 20:35:43 +00:00
d02c5a3248 Merge pull request #75 from thaJeztah/18.09_backport_bump_containerd_client_1.2.0_rc.1
[18.09] backport update containerd client and dependencies to v1.2.0-rc.1
Upstream-commit: 8e67dfab97ec71c66ee04a0c39f89e0a57ce2a0f
Component: engine
2018-10-11 13:27:48 -07:00
0746eb40ef Merge pull request #73 from thaJeztah/18.09_backport_addr_pool
[18.09] backport default-addr-pool-mask-length param max value check
Upstream-commit: b38d454861a8b4343142a62094cc3cbf4b157e00
Component: engine
2018-10-11 13:27:22 -07:00
921a9476d4 Merge pull request #70 from thaJeztah/18.09_backport_upstream_dos_fix
[18.09] backport fix denial of service with large numbers in cpuset-cpus and cpuset-mems
Upstream-commit: 4b8336f7cf091fd5c4742286bda1e34c45667d78
Component: engine
2018-10-11 13:25:55 -07:00
6a1a0dbf9e Merge pull request #72 from thaJeztah/18.09_backport_esc-879
[18.09] backport masking credentials from proxy URL
Upstream-commit: 2697d2b687a629f63d3c5b8fe802c56f3d5dc1a7
Component: engine
2018-10-11 13:25:30 -07:00
f3d391be68 overlay2: use index=off if possible
As pointed out in https://github.com/moby/moby/issues/37970,
Docker overlay driver can't work with index=on feature of
the Linux kernel "overlay" filesystem. In case the global
default is set to "yes", Docker will fail with EBUSY when
trying to mount, like this:

> error creating overlay mount to ...../merged: device or resource busy

and the kernel log should contain something like:

> overlayfs: upperdir is in-use by another mount, mount with
> '-o index=off' to override exclusive upperdir protection.

A workaround is to set index=off in overlay kernel module
parameters, or even recompile the kernel with
CONFIG_OVERLAY_FS_INDEX=n in .config. Surely this is not
always practical or even possible.

The solution, as pointed out my Amir Goldstein (as well as
the above kernel message:) is to use 'index=off' option
when mounting.

NOTE since older (< 4.13rc1) kernels do not support "index="
overlayfs parameter, try to figure out whether the option
is supported. In case it's not possible to figure out,
assume it is not.

NOTE the default can be changed anytime (by writing to
/sys/module/overlay/parameters/index) so we need to always
use index=off.

[v2: move the detection code to Init()]
[v3: don't set index=off if stat() failed]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8422d85087bfa770b62ef4e1daaca95ee6783d86)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 690e097fedd7362f3b2781c32ca872ad966d286e
Component: engine
2018-10-11 22:09:38 +02:00
c38ae153e0 overlay2: use global logger instance
This simplifies the code a lot.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit a55d32546a8556f9e6cabbc99836b573b9944f0c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dc0a4db7c9dc593a8568a8e30e4e21e118c2839d
Component: engine
2018-10-11 22:09:30 +02:00
127d4b5bad bump buildkit to c7bb575343df0cbfeab8b5b28149630b8153fcc6
Relevant changes:

- buildkit#667 gateway: check for `ReadDir` and `StatFile` caps on client side
- buildkit#668 dockerfile: fix ssh required option
- buildkit#669 dockerfile: update default copy image
- buildkit#670 solver: specify SSH key ID in error message when required key was not forwarded
- buildkit#673 solver: fix possible nil dereference
- buildkit#672 fix setting uncompressed label on content
- buildkit#680 dockerfile: fix empty dest directory panic

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9cfce302145a493571df138888485999cd6172ce)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f58f8421433d18e0fb9a51567068a2ddc1b13a1b
Component: engine
2018-10-11 21:55:49 +02:00
4a29152cb9 Windows:Allow process isolation
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit c907c2486c0850030f8ac1819ac8c87631472c68)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7184074c0880c656be00645007588a00ec2266cd
Component: engine
2018-10-11 16:04:45 +02:00
ddba35eade bugfix: wait for stdin creation before CloseIO
The stdin fifo of exec process is created in containerd side after
client calls Start. If the client calls CloseIO before Start call, the
stdin of exec process is still opened and wait for close.

For this case, client closes stdinCloseSync channel after Start.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit c7890f25a9eaae8d07614bd85b2b3231b03e54ec)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6679a5faeb724f1ad060f2fdf6d189f1005924b9
Component: engine
2018-10-10 20:43:14 +02:00
6babae58b9 Using strings.Builder instead of string appending
Signed-off-by: Li Yi <denverdino@gmail.com>
(cherry picked from commit 814ced4b30)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8b0d34a5a1
Component: cli
2018-10-10 20:21:52 +02:00
681595daf2 bump up buildkit
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 837b9c6214cd43828473d15175b0a3c6e1db8507)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 90c72824c36369efd8be52bedd731d12b3415508
Component: engine
2018-10-11 03:01:18 +09:00
08a994dc51 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-09 01:02:56 +00:00
4c272a2387 Update release note link to final location
We'll be using a redirect from this URL to the back-end docs system for
hosting release notes. Final location confirmed with Docs team and PM.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f93908213a
Component: cli
2018-10-08 16:25:49 -07:00
1ca65c16eb Merge pull request #76 from seemethere/dockerfile_copy_1809
Switch copy image to a docker org based one
Upstream-commit: ad08dc12e090bce989ae701ec04f22c26b20d6cf
Component: engine
2018-10-08 14:10:53 -07:00
2e2a73446a Switch copy image to a docker org based one
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 5cfd110c306d6a370307178b84d2b98d8598acc4)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 7b54720ccbfa5d8242e896f27e8b36ee58612401
Component: engine
2018-10-05 18:01:10 +00:00
00c518411b Fix denial of service with large numbers in cpuset-cpus and cpuset-mems
Using a value such as `--cpuset-mems=1-9223372036854775807` would cause
`dockerd` to run out of memory allocating a map of the values in the
validation code. Set limits to the normal limit of the number of CPUs,
and improve the error handling.

Reported by Huawei PSIRT.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f8e876d7616469d07b8b049ecb48967eeb8fa7a5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0922d32bce74657266aff213f83dfa638e8077f4
Component: engine
2018-10-05 15:13:43 +02:00
8074d84ff1 Update containerd client and dependencies to v1.2.0-rc.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit dd622c81a4ea8f4e625f03ee9f13ad47b8746638)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 148d9f0e58bc180fefffcfc0a9e7a00b4276a67a
Component: engine
2018-10-05 14:53:33 +02:00
8be1c880ff Update containerd dependencies
This updates the containerd dependencies to match
the versions used by the vendored containerd version

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 31a9c9e79101cdf38d383104afbc1b48ede75291)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5070e418b806cc96ad0f5b3ac32c8d416ff8449a
Component: engine
2018-10-05 14:38:34 +02:00
dd03cc8be5 Remove version-checks for containerd and runc
With containerd reaching 1.0, the runtime now
has a stable API, so there's no need to do a check
if the installed version matches the expected version.

Current versions of Docker now also package containerd
and runc separately, and can be _updated_ separately.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c65f0bd13c85d29087419fa555281311091825e7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 054c3c2931cec5dca8bb84af97f1457c343ec02f
Component: engine
2018-10-05 12:35:59 +02:00
7718f802c4 Merge pull request #560 from andrewhsu/beta
[18.09] bump ver to 18.09.0-beta3
2018-10-04 16:18:38 -07:00
42453c564f bump ver to 18.09.0-beta3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-10-04 21:52:11 +00:00
440a06126a Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-04 21:04:42 +00:00
c642332896 Fix for default-addr-pool-mask-length param max value check
We check for max value for -default-addr-pool-mask-length param as 32.
But There won't be enough addresses on the  overlay network. Hence we are
keeping it 29 so that we would be having atleast 8 addresses in /29 network.

Signed-off-by: selansen <elango.siva@docker.com>
(cherry picked from commit d25c5df80e60cdbdc23fe3d0e2a6808123643dc7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9406f3622d18a0d9b6c438190e8fdd8be53d3b22
Component: engine
2018-10-04 21:59:25 +02:00
b4ba6169d9 Global Default AddressPool - Update
Addressing few review comments as part of code refactoring.
Also moved validation logic from CLI to Moby.

Signed-off-by: selansen <elango.siva@docker.com>
(cherry picked from commit 148ff00a0a800fad99de11ee3021d4c5d4869157)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9816bfcaf58a609d64d648043c10817c27dcfa36
Component: engine
2018-10-04 21:59:09 +02:00
15addd7d74 Merge pull request #66 from thaJeztah/18.09_backport_fix-dm-errmsg
[18.09] backport: gd/dm: fix error message
Upstream-commit: 52d6ad2a68f84bc83560a4f9971ad6746502abf9
Component: engine
2018-10-04 21:28:22 +02:00
a2008ac193 Masking credentials from proxy URL
Signed-off-by: Dani Louca <dani.louca@docker.com>
(cherry picked from commit 78fd9784542a302c6cae0ab072563c68f9f62711)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 58e51512704b6d7656952e140332472a4c37e46f
Component: engine
2018-10-04 21:20:54 +02:00
fdc00e5edf Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-04 16:37:08 +00:00
bc428b2491 Merge pull request #1402 from AkihiroSuda/fix-kill-warning-1809
[18.09] backport connhelper: try sending SIGTERM before SIGKILL
Upstream-commit: 4280972d65
Component: cli
2018-10-04 16:53:57 +02:00
2a1ee6fd17 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-10-04 01:01:20 +00:00
6e8e954345 Merge pull request #67 from thaJeztah/18.09_backport_windows-network-plugin-miss-fix
[18.09] Fix long startup on windows, with non-hns governed Hyper-V networks
Upstream-commit: 6e5ed2ccce0923950dae7a6cb9bd1dd851ed5af8
Component: engine
2018-10-03 23:27:28 +02:00
39e8b55008 Fix long startup on windows, with non-hns governed Hyper-V networks
Similar to a related issue where previously, private Hyper-V networks
would each add 15 secs to the daemon startup, non-hns governed internal
networks are reported by hns as network type "internal" which is not
mapped to any network plugin (and thus we get the same plugin load retry
loop as before).

This issue hits Docker for Desktop because we setup such a network for
the Linux VM communication.

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
(cherry picked from commit 6a1a4f97217b0a8635bc21fc86628f48bf8824d1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 54bd14a3fe1d4925c6fa88b24949063d99067c07
Component: engine
2018-10-03 15:24:34 +02:00
1fc8f05911 gd/dm: fix error message
The parameter name was wrong, which may mislead a user.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit c378fb774e413ba8bf5cadf655d2b67e9c94245a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c9ddc6effc444c54def41d498b359a9a986ad79d
Component: engine
2018-10-03 14:01:13 +02:00
616515c0b4 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-10-02 23:41:32 +00:00
3f823d6216 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-02 23:16:37 +00:00
199a80226e Merge pull request #247 from dhiltgen/buildtime
Merged with https://github.com/seemethere/unir
Upstream-commit: 4756a2fba881a2240298b682703203c3768a76dc
Component: packaging
2018-10-02 22:42:06 +00:00
085d2923dc Merge pull request #1408 from dhiltgen/fix_panic
[18.09] Fix panic in display only case for license
Upstream-commit: 984bc7411e
Component: cli
2018-10-02 15:41:22 -07:00
cad393d146 Move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG
This call is what is used to implement `dmesg` to get kernel messages
about the host. This can leak substantial information about the host.
It is normally available to unprivileged users on the host, unless
the sysctl `kernel.dmesg_restrict = 1` is set, but this is not set
by standard on the majority of distributions. Blocking this to restrict
leaks about the configuration seems correct.

Fix #37897

See also https://googleprojectzero.blogspot.com/2018/09/a-cache-invalidation-bug-in-linux.html

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit ccd22ffcc8b564dfc21e7067b5248819d68c56c6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 16836e60bc87abb3e9ab16f33c2038931c1d473b
Component: engine
2018-10-02 20:33:38 +02:00
61a9095bbf Add test coverage for display only with hub licenses
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 92932647d3
Component: cli
2018-10-02 11:21:22 -07:00
f9629fed01 Fix panic in display only case for license
Prior refactoring passes missed a corner case.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: dee37936e5
Component: cli
2018-10-02 10:24:16 -07:00
f18c1e0a00 Make sure buildtime is always set
This should ensure we don't produce builds without a valid "Built:"
field in the the version payload.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 9a071a3fbe316ea6d70bc1a5111cbe14ae99aec9
Component: packaging
2018-10-02 10:01:45 -07:00
36a7ad96c3 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-10-02 12:36:39 +00:00
becd9d2f22 Merge pull request #1406 from dhiltgen/revamp_18.09
Remove unused helath check func
Upstream-commit: 3e1a0bdc23
Component: cli
2018-10-02 11:26:36 +02:00
8fe3e73789 Remove unused helath check func
During the refactoring for 18.09 the activate/update flows no longer
restart the engine explicitly but let the user do that when they're ready,
so the health check logic is no longer required.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f2b2061cc3
Component: cli
2018-10-01 15:12:09 -07:00
de94cba311 connhelper: try sending SIGTERM before SIGKILL
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit acbb0eb6da)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 4925fd9c34
Component: cli
2018-09-30 10:01:20 +09:00
7f7e662af3 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-28 22:16:46 +00:00
9506e4a60a Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-28 22:16:36 +00:00
23a691f07a Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-28 21:52:21 +00:00
98e8058b66 Merge pull request #246 from seemethere/metadata_1809
[18.09] Change metadata to be stored in docker-engine
Upstream-commit: 52bc21044c636f7ffcacf5fff5f74e10ab1b6761
Component: packaging
2018-09-28 14:23:25 -07:00
6feb3a98d4 Merge pull request #1388 from dhiltgen/revamp_18.09
[18.09] Refine how metadata dir is handled
Upstream-commit: 5d3ab5bc0c
Component: cli
2018-09-28 14:23:12 -07:00
ff2d0e0b89 Refine how metadata dir is handled
This is a follow up PR to #1381 to address some of the review comments
we didn't get to.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: c12e23a4c1
Component: cli
2018-09-28 14:14:13 -07:00
475e03f71a Merge pull request #62 from thaJeztah/18.09_backport_tweak_error_message
[18.09] backport: tweak bind mount errors
Upstream-commit: e44436c31fce06f9ad69cbb325b781be54516d3e
Component: engine
2018-09-28 14:13:41 -07:00
a0bb6d8712 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-28 21:03:53 +00:00
a6c487557f Merge pull request #1387 from dhiltgen/activate_ux
[18.09] Expose licensing details before loading
Upstream-commit: aca3f2d382
Component: cli
2018-09-28 14:02:48 -07:00
fdf9f276f8 use gotest.tools/fs for TestActivateExpiredLicenseDryRun
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: a7488d1bcd
Component: cli
2018-09-28 20:50:43 +00:00
cb4c2a9e5e Expose licensing details before loading
Help the user understand which license they're about
to load in case they have multiple licenses they need to
figure out.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 5a97a93ae1
Component: cli
2018-09-28 20:50:43 +00:00
c3605e497b Vendor bump of licensing lib
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 41910b6d68
Component: cli
2018-09-28 20:50:43 +00:00
683cfd7a61 Merge pull request #56 from thaJeztah/18.09_backport_more_permissive_daeon_conf_dir
[18.09] backport loosen permissions on /etc/docker directory
Upstream-commit: 34b3cf4b0cf6867c81cb370b4e2056e0947ee4fd
Component: engine
2018-09-28 11:42:01 -07:00
ffeda4bbea Merge pull request #63 from tiborvass/18.09-vndr-buildkit
[18.09] vendor buildkit to 8f4dff0d16ea91cb43315d5f5aa4b27f4fe4e1f2
Upstream-commit: 51618f7a83f008e5f14d5cbe634add11fd3afcb0
Component: engine
2018-09-28 10:57:56 -07:00
530db7f45a Tweak bind mount errors
These messages were enhanced to include the path that was
missing (in df6af282b9048dfedcd7b7a9a89126aca887f4e1), but
also changed the first part of the message.

This change complicates running e2e tests with mixed versions
of the engine.

Looking at the full error message, "mount" is a bit redundant
as well, because the error message already indicates this is
about a "mount";

    docker run --rm --mount type=bind,source=/no-such-thing,target=/foo busybox
    docker: Error response from daemon: invalid mount config for type "bind": bind mount source path does not exist: /no-such-thing.

Removing the "mount" part from the error message, because
it was redundant, and makes cross-version testing easier :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 574db7a53782c57554089c9606505af1c108df0b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b499acc0e834e11882909269238407c65f68f034
Component: engine
2018-09-28 14:35:55 +02:00
f4dc4cdbaa vendor buildkit to 8f4dff0d16ea91cb43315d5f5aa4b27f4fe4e1f2
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit e161a8d1e9e84f50410860d903205e6d2dc86110)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 67541d5841e645f3408b01f189ec4339df449edc
Component: engine
2018-09-27 22:46:57 +00:00
c299249618 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-27 05:18:27 +00:00
0f3ea59e24 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-27 04:54:08 +00:00
939ed19be8 Merge pull request #1389 from mason-fish/fix-subscription-filter
[18.09] fix subscription filter
Upstream-commit: 1a087e87c9
Component: cli
2018-09-26 16:12:41 -07:00
3ebe55dfc1 Merge pull request #245 from seemethere/upgrade_1809
[18.09] Fix debian package upgrade scenarios
Upstream-commit: 379255ca5b687fc0f6d8b47cb96493d192e1d776
Component: packaging
2018-09-26 15:48:44 -07:00
23ba2a13ef Change metadata to be stored in docker-engine
People blow away `/var/lib/docker` all the time so we probably shouldn't
store important data there.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 9391057c9472ba24049b8645c251a4c63894522f)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 865140fc4155481b20f694a4528e04e48eb76de4
Component: packaging
2018-09-26 22:33:01 +00:00
6b7718669e Fix debian package upgrade scenarios
Epoch needs to be included in the Replaces / Breaks sections

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit f6a3e274b4892f8f501e1191a73d8b8935a56aa5)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: bebe7028c6b41ecee80278cdfc46de1e7704d199
Component: packaging
2018-09-26 22:28:39 +00:00
7253d5a25e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-26 20:58:17 +00:00
aaffed2dc6 Merge pull request #242 from seemethere/remove_env_1809
[18.09] Remove Environment, not needed anymore
Upstream-commit: dd7701addaba44f3716d8c40e5554f3bf043b0d6
Component: packaging
2018-09-26 13:21:33 -07:00
7716893c2a Merge pull request #241 from seemethere/fix_static_builds_1809
[18.09] Fix static builds relying on the docker-* prefix
Upstream-commit: 6a38ee294c5abbaa9b50e596e2c222f1c3d4a9dc
Component: packaging
2018-09-26 13:21:11 -07:00
aa738a9737 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-26 19:15:24 +00:00
552a0c76a2 Remove Environment, not needed anymore
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 9eac27f0ee2d02355ecdeea243d2607d633c0b0b)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 08dd353c77bb97339a3c8d1b11712cdd6323c436
Component: packaging
2018-09-26 19:00:07 +00:00
adcef4519f containerd-ctr -> ctr
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 75906054befc177621bc015ab0802e1fad18c187
Component: packaging
2018-09-26 18:57:16 +00:00
3675feadab rename binaries to remove docker prefix
For static builds.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 43ebdc0845840c13c2f92c7b564ddb56eb38d428
Component: packaging
2018-09-26 18:57:16 +00:00
bc2a5f99f9 Merge pull request #61 from tiborvass/18.09-remove-docker-prefix-containerd
[18.09] Remove 'docker-' prefix for containerd and runc binaries
Upstream-commit: 989fab3c718fb83f543cc6414e6ba7c6f724a416
Component: engine
2018-09-26 11:45:50 -07:00
f864453cb7 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-26 16:37:03 +00:00
5e51fc1169 Merge pull request #1394 from thaJeztah/18.09_backport_
[18.09] backport fix substitution with non-empty env-var
Upstream-commit: 0b11120060
Component: cli
2018-09-26 15:33:01 +02:00
1be325e42d Merge pull request #1342 from tonistiigi/1809-fix-os-race
[18.09] backport connhelper: fix cmd.Wait() race
Upstream-commit: e57b20642d
Component: cli
2018-09-26 15:30:00 +02:00
35e5a1ade4 Fix substitution with non-empty env-var
Due to a typo, substitution would not work if the given
environment-variable was set.

Given the following docker compose file;

```yaml
version: "3.7"

services:
  app:
    image: nginx:${version:-latest}
```

Deploying a stack with `$version` set would ignore the `$version`
environment variable, and use the default value instead;

```bash
version=alpine docker stack deploy -c docker-compose.yml foobar

Creating network foobar_default
Creating service foobar_app

docker service ls

ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
rskkjxe6sm0w        foobar_app          replicated          1/1                 nginx:latest
```

This patch also fixes "soft default" not detecting empty environment variables,
only non-set environment variables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ec3daea021)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b8702b8a9a
Component: cli
2018-09-26 15:20:15 +02:00
3be9a1e274 fix daemon tests that were using wrong containerd socket
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 52b60f705ca3f12df01b0cf1002860b842770c74)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 6bf8dfc4d89461228031a595d63482b9603c8899
Component: engine
2018-09-25 23:09:25 +00:00
1c28fdbba1 hack/make: remove 'docker-' prefix when copying binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 361412c79eeacf11b07871870e875f9e5bce3ea7)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e090646d477f2e7d00aba971bcc187f3af7948a3
Component: engine
2018-09-25 23:09:25 +00:00
3632151436 fix subscription filter
Signed-off-by: Mason Fish <mason.fish@docker.com>
Upstream-commit: a31b20d7db
Component: cli
2018-09-24 16:56:05 -07:00
b48ad13f28 Remove 'docker-' prefix for containerd and runc binaries
This allows to run the daemon in environments that have upstream containerd installed.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 34eede0296bce6a9c335cb429f10728ae3f4252d)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b3bb2aabb8ed5a8af0a9f48fb5aba3f39af38e0d
Component: engine
2018-09-24 22:35:36 +00:00
487b834eb7 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-24 21:03:05 +00:00
f884fc9695 Merge pull request #237 from jose-bigio/18.09_epoch_bump
[18.09] epoch bump
Upstream-commit: cb57569b5dfb4118fbcaab5815fd5c9c6ce678f1
Component: packaging
2018-09-24 11:14:05 -07:00
b9e7fd77da Bump epoch to 5
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 024e366bd36799b24a1b8f4666de62208fb7d9a5)
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 6e43dbbc35edc5a9842c8c37654a9d14294682a1
Component: packaging
2018-09-24 10:40:01 -07:00
600e8631b0 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-22 08:08:18 +00:00
0ee62c387c Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-22 07:42:33 +00:00
ec828168f7 Merge pull request #1386 from tiborvass/18.09-df-verbose-format-raw
[18.09] system/df: allow -v with --format
Upstream-commit: 5ba5678898
Component: cli
2018-09-22 00:25:21 -07:00
42f77ded0c Merge pull request #51 from thaJeztah/18.09_backport_fix-libcontainerd-startup-error
[18.09] backport: Add fail fast path when containerd fails on startup
Upstream-commit: e69efe2ef5d24c3e7a4bd139d34cfa1ff7180869
Component: engine
2018-09-22 00:11:43 -07:00
4e7c09cfd0 Merge pull request #60 from tiborvass/18.09-remove-boltdb
[18.09] Remove boltdb dependency
Upstream-commit: ccab60936554e7bbcc06d507b5d9217ed0f80f69
Component: engine
2018-09-22 00:11:17 -07:00
9f476ca387 Merge pull request #59 from tonistiigi/buildkit-1809
[18.09] Backport Buildkit fixes for 18.09
Upstream-commit: 0a6866b8396d076765a2419e81e23c920c3a6a48
Component: engine
2018-09-21 21:59:27 -07:00
49102eef76 system/df: allow -v with --format
This allows to provide more information for build cache disk usage.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit a90b99edfc)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9de1318e36
Component: cli
2018-09-22 01:33:03 +00:00
47296e79f8 vendor: remove boltdb dependency which is superseded by bbolt
This also brings in these PRs from swarmkit:
- https://github.com/docker/swarmkit/pull/2691
- https://github.com/docker/swarmkit/pull/2744
- https://github.com/docker/swarmkit/pull/2732
- https://github.com/docker/swarmkit/pull/2729
- https://github.com/docker/swarmkit/pull/2748

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: cce1763d57b5c8fc446b0863517bb5313e7e53be
Component: engine
2018-09-22 01:24:11 +00:00
7799325488 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-22 01:03:02 +00:00
0fed403b92 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-22 00:36:57 +00:00
f3dec68e23 builder: vendor buildkit to 39404586a50d1b9d0fb1c578cf0f4de7bdb7afe5
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d0f00bc1fb2c349ad72ecc2394b8474937de84dd)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3d67dd046539f8e04db82ce07ea56f97b832676b
Component: engine
2018-09-21 17:06:25 -07:00
4f76283213 builder: use buildkit's GC for build cache
This allows users to configure the buildkit GC.

The following enables the default GC:
```
{
  "builder": {
    "gc": {
      "enabled": true
    }
  }
}
```

The default GC policy has a simple config:
```
{
  "builder": {
    "gc": {
      "enabled": true,
      "defaultKeepStorage": "30GB"
    }
  }
}
```

A custom GC policy can be used instead by specifying a list of cache prune rules:
```
{
  "builder": {
    "gc": {
      "enabled": true,
      "policy": [
        {"keepStorage": "512MB", "filter": ["unused-for=1400h"]]},
        {"keepStorage": "30GB", "all": true}
      ]
    }
  }
}
```

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 4a776d0ca76c4bdf4399aef8c102361d6c2819eb)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 73e2f72a7c5bd6d6f8306e0ffe4371e1c3b00a21
Component: engine
2018-09-21 17:06:25 -07:00
dc48089436 add support of registry-mirrors and insecure-registries to buildkit
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 171d51c861b479af8798fbe7c51906bcecdffea0)
(cherry picked from commit a72752b2f74467333b4ebe21c6c474eb0c2b99e0)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2926a45be6b9315d2ddeec27d1193278b6bbae91
Component: engine
2018-09-21 17:06:25 -07:00
b69d4cb4ec update vendor
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 308701fac6f716160283ca0868da59aba2ea7eb5)
(cherry picked from commit b48afc216f46c8e786560b807528699012e1627b)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b73fd4d936864998451cdd37f45694541e43006e
Component: engine
2018-09-21 17:06:25 -07:00
248d11e3f9 daemon/images: removed "found leaked image layer" warning, because it is expected now with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 5aa222d0fe5a420dae96be0c04a33308823e0d0f)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: bb2adc4496f2fd1b755fc701dbed5dab33175efd
Component: engine
2018-09-21 17:06:25 -07:00
ff79736ce2 vendor: update bolt to bbolt
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b501aa82d5151b8af73d6670772cc4e8ba94765f
Component: engine
2018-09-21 17:06:25 -07:00
a4444691f3 vendor: add bbolt v1.3.1-etcd.8
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 46a703bb3bfe75e99de2cc457dc0d568a1976a6b
Component: engine
2018-09-21 17:06:25 -07:00
61bc572a6e Merge pull request #235 from seemethere/backport_f
Merged with https://github.com/seemethere/unir
Upstream-commit: 4d3c344a28c3105f9698ed3ae5213e85188eca97
Component: packaging
2018-09-21 22:20:55 +00:00
0cc0272882 Merge pull request #1381 from dhiltgen/revamp_18.09
[18.09] `docker engine` updates
Upstream-commit: 19e1ab273e
Component: cli
2018-09-21 15:12:54 -07:00
edf7125231 Use image artifacts as daemon and dependencies
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 944fa7137c02ec56907b26fccfd3a363cd741890)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 6a66a0b6aee6ad2c9c52da728d1e70ce46fec017
Component: packaging
2018-09-21 22:10:36 +00:00
8da1ad1c75 Merge pull request #234 from jose-bigio/18.09_cherry_pick
[18.09] Make -dm image based not tag based
Upstream-commit: 4264c8e1a826c76b0fde570f867cc7e7c6cd30bb
Component: packaging
2018-09-21 15:06:42 -07:00
46a53355c9 Make -dm image based not tag based
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 206d61f29d1722ae3e319e22a4c5c88d1baf6e13)
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: aea8f6a1db61a0bb0748f3420e125fcc06e8e0a6
Component: packaging
2018-09-21 14:14:28 -07:00
1cc89a01f6 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-21 21:04:06 +00:00
a7ed2532ff Fix vendoring glitch
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: ec1812188f
Component: cli
2018-09-21 13:16:34 -07:00
4c429518af Merge pull request #52 from thaJeztah/18.09_backport_fix-TestServiceWithDefaultAddressPoolInit
[18.09] backport TestServiceWithDefaultAddressPoolInit: avoid panic
Upstream-commit: ff9340ca2cc003d0829216524c6f96b98ce62f16
Component: engine
2018-09-21 11:19:57 -07:00
92a89516ee Fix lint glitches
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 6004d74b1f
Component: cli
2018-09-21 11:01:17 -07:00
be44262dc3 Merge pull request #57 from AntaresS/cherry-37871
[18.09] backport fixing daemon won't start when "runtimes" option defined in both config file and cli
Upstream-commit: 90a90ae2e1fdb1f9782a51e41fe2b7dc80d48952
Component: engine
2018-09-21 09:54:31 -07:00
49c0046ea6 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-21 12:37:00 +00:00
ae721f13eb Merge pull request #1382 from thaJeztah/18.09_manifest-inspect-insecure-fix
[18.09] backport fix insecure manifest inspect with restrictive certs perms
Upstream-commit: e79e591ee9
Component: cli
2018-09-21 12:53:24 +02:00
f074e8a141 Remove metadata file before writing
The packages will deliver this as a link so lets make sure we don't
write through the link to the underlying packaged file.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 0f22d7e295
Component: cli
2018-09-20 18:00:46 -07:00
6a86f233f3 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-20 21:03:29 +00:00
e5e1355bb7 Review comments
Address code review comemnts and purge additional dead code.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f250152bf4
Component: cli
2018-09-20 12:01:20 -07:00
04ec85f5b8 Merge pull request #226 from thaJeztah/18.09_more_updates_to_package_description
[18.09] more updates to package description
Upstream-commit: 43f81b5c522ea597c22a1e3e484fc911c865f7aa
Component: packaging
2018-09-20 11:54:50 -07:00
1e6a450e9c Merge pull request #225 from thaJeztah/18.09_update_package_description
[18.09] backport update package description
Upstream-commit: 1cb8fe5bda7d7b92646e5ea859fc5ada832bb0b2
Component: packaging
2018-09-20 11:54:31 -07:00
feaf4f4d37 Merge pull request #230 from kolyshkin/18.09-fix-path
[18.09] systemd/docker.service: fix PATH
Upstream-commit: 1b2edd1ffda28df88692bb7faa16ac30f879c5b7
Component: packaging
2018-09-20 11:53:29 -07:00
e0ec331c69 Merge pull request #227 from thaJeztah/18.09_update_fedora_list
[18.09] backport Update outdated Fedora versions
Upstream-commit: 8751612797e77ddaa14674aeda1bffd5f85c27b7
Component: packaging
2018-09-20 11:45:24 -07:00
12e294aaf5 Merge pull request #229 from thaJeztah/18.09_revert_suffix
[18.09] revert "Specify suffix for DEB_VERSION"
Upstream-commit: ea3b15971e895c2a259bc2fca04f323a8e8a6fb6
Component: packaging
2018-09-20 11:45:02 -07:00
812694c0cc fixed the dockerd won't start bug when 'runtimes' field is defined in both daemon config file and cli flags
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 8392d0930b511402aa7aa71ccfe6c0d4a8159237)
Upstream-commit: 66ed41aec82dbcdfbc38027e3d800e429af1cd58
Component: engine
2018-09-20 10:54:47 -07:00
622b5b7f2d fix insecure manifest inspect with restrictive certs perms
If, for some reason, the certs directory has permissions that are
inaccessible by docker, we should still be able to fetch manifests using
the `insecure` flag.

Since the cli doesn't access the engine's list of insecure registries,
the registry client should make a singleton list of the registry being queried with the
`insecure` flag.

Closes #1358

Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
(cherry picked from commit d57adbc034)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f9d666b057
Component: cli
2018-09-20 19:53:10 +02:00
49de0c314f deb/systemd: remove
These files are not used, and having them in repo is misleading.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: fca673ad8051d1b377435821ec6c76c0de24b663
Component: packaging
2018-09-20 10:16:39 -07:00
be5df7c46b systemd/docker.service: fix PATH
Set the PATH to what appears to be the standard on latest Ubuntu (18.04)
and Debian (9), fixing the following two issues:

1. PATH did not contain /bin (leading to ContainerTop/ps not working
on newer distros, among the other things).

2. $PATH can't be specified in Environment directives in .service files.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 62d9a0d1253049a2fab10f938542a8e09dd0804a
Component: packaging
2018-09-20 10:09:10 -07:00
76823a4d29 Revert "Specify suffix for DEB_VERSION"
This reverts commit 6c5b7fcb956871f7a44e1a478ad9450f9df4bed1.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00104664c15a6025451ae766b77b78b347ee1ad3
Component: packaging
2018-09-20 16:06:01 +02:00
0ef2a783ef Update outdated Fedora versions
(cherry picked from commit f0212649020ad5a1b0ca17c61ab500992ac981b4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5f5601309ac7c0814b077166aa3b101c8bfce6fe
Component: packaging
2018-09-20 13:04:16 +02:00
eb465533d3 more updates to package descriptions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: eb89f3ebd68033fe49b12016ad07f28cfc33d874
Component: packaging
2018-09-20 12:42:43 +02:00
4827d551d2 change some wording in package description
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1a3379642fb37457d0249ae99385d17ddc85a6af)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 56bed5f33d75bf297c8f3c2018a34aaa30cfe9da
Component: packaging
2018-09-20 12:34:01 +02:00
1456fda3ec change home page link for deb pkgs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a4df8fe1f86f38ad935862eb188b6fc234d22793)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 702f6a07fccef45343368895d105bb3e79ad2339
Component: packaging
2018-09-20 12:33:54 +02:00
1a085c96aa Refined engine implementations
Adapt the CLI to the host install model for 18.09.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 342afe44fb
Component: cli
2018-09-19 20:10:31 -07:00
2119c0b73f Install binaries on host for upgrade
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: cfec8027ed
Component: cli
2018-09-19 19:06:28 -07:00
b1b0f9d898 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-19 01:03:01 +00:00
9cdb2818ff Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-19 01:02:50 +00:00
bb0dd83bce Merge pull request #220 from seemethere/configurable_1809
Merged with https://github.com/seemethere/unir
Upstream-commit: 24d48340b743436ebf90ef3b18522348d1fe3e16
Component: packaging
2018-09-19 00:01:01 +00:00
43b6de9f82 Merge pull request #50 from AntaresS/cherry-pick-moby
[18.09] backport propagate the dockerd cgroup-parent config to buildkitd
Upstream-commit: ea2e2c54272d906d527949c5635b95ac8e23b613
Component: engine
2018-09-18 16:36:12 -07:00
418dc58053 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-18 21:03:32 +00:00
33237214c7 Merge pull request #219 from seemethere/dynamic_compile_1809
[18.09] Dynamically compile the docker daemon
Upstream-commit: 48b843941c1d913e7a55054783ca7c7a29dbd7d9
Component: packaging
2018-09-18 13:44:37 -07:00
1b4f5d412e Make base for Dockerfile.engine-dm configurable
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 605df1abcb4c432ebb1b73c29bfa0d5d3d48c0ce)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 7df6db6ac3b71c0a41fc2792e5778e2566b72399
Component: packaging
2018-09-18 13:34:12 -07:00
8647a399e2 Dynamically compile the docker daemon
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 4f18a1969510930b98b4ad4375297ea4db3298f3)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 5e9cc984546917e2129e7601e329d9ce085d1e7e
Component: packaging
2018-09-18 13:30:21 -07:00
97c18c02cb create newBuildKit function separately in daemon_unix.go and daemon_windows.go for cross platform build
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 66ac92cdc65be350ec53f1de51052374846dfe24)
Upstream-commit: a5d731edecc75927f602c7f15e5ba9f5f77d3655
Component: engine
2018-09-18 11:19:51 -07:00
b483a6d33c Loosen permissions on /etc/docker directory
The `/etc/docker` directory is used both by the dockerd daemon
and the docker cli (if installed on the saem host as the daemon).

In situations where the `/etc/docker` directory does not exist,
and an initial `key.json` (legacy trust key) is generated (at the
default location), the `/etc/docker/` directory was created with
0700 permissions, making the directory only accessible by `root`.

Given that the `0600` permissions on the key itself already protect
it from being used by other users, the permissions of `/etc/docker`
can be less restrictive.

This patch changes the permissions for the directory to `0755`, so
that the CLI (if executed as non-root) can also access this directory.

> **NOTE**: "strictly", this patch is only needed for situations where no _custom_
> location for the trustkey is specified (not overridden with `--deprecated-key-path`),
> but setting the permissions only for the "default" case would make
> this more complicated.

```bash
make binary shell

make install

ls -la /etc/ | grep docker

dockerd
^C

ls -la /etc/ | grep docker
drwxr-xr-x 2 root root    4096 Sep 14 12:11 docker
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit cecd9817177093be99c1c9bb0dcf43ccec14ad1d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fc576226b24e8b5db6e95e48967d56c5808f9fe9
Component: engine
2018-09-18 12:34:56 +02:00
4a973bddb1 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-18 01:03:19 +00:00
f7b24aae90 Merge pull request #216 from seemethere/add_devicemapper_1809
[18.09] Add native rpm compilation for devicemapper
Upstream-commit: b7286dfc6457073f6988fbda86ea7e4ee0fd1ce6
Component: packaging
2018-09-18 02:40:00 +02:00
3c71b9d6ac Add native rpm compilation for devicemapper
devicemapper cannot be enabled on a statically compiled binary so we
dynamically compile it on a rhel based distribution in order to enable
devicemapper usage.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 7cb8d358947974abae3e3c346b09523904030609)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c80ac56dfa393c405c2cd33af94ad6ac1366ece2
Component: packaging
2018-09-17 16:50:09 -07:00
eda0ddc2a8 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-17 21:04:28 +00:00
e1e02bf4ba Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-17 21:04:18 +00:00
39a15def6d Merge pull request #55 from thaJeztah/18.09_backport_fix-progress-panic
[18.09] backport pkg/progress: work around closing closed channel panic
Upstream-commit: c24fd7a2c3e4381010f1039d6a4cfa35f635d074
Component: engine
2018-09-17 11:43:41 -07:00
7ed21517c2 Merge pull request #214 from seemethere/iptables_fix_1809
Merged with https://github.com/seemethere/unir
Upstream-commit: 6dada46805e14da118eca74052734f4caa35503f
Component: packaging
2018-09-17 17:24:00 +00:00
954ee90b32 Add /usr/sbin to our path variable for systemd
iptables is sometimes placed in `/usr/sbin`

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit c86a958d6d344d6bf568523c28d6643d7b49ba43)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 36a08784a0b7bc49487005d323bf4e41fd50d36d
Component: packaging
2018-09-17 10:20:34 -07:00
4ec08ba334 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-17 13:02:03 +00:00
f59ff81d45 Merge pull request #53 from thaJeztah/18.09_backport_buildkit-cli-control
[18.09] backport always hornor client side to choose which builder to use with DOCKER_…
Upstream-commit: 5fb0a7ced7bcdb9e86e048fe3b24d0d4297d6155
Component: engine
2018-09-17 12:34:28 +02:00
27a6fe5146 pkg/progress: work around closing closed channel panic
I could not reproduce the panic in #37735, so here's a bandaid.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 7dac70324d0ce6acd23458b0bef06f099837d648)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c26eac56628527ed64c79ce9145ed97583cbeca
Component: engine
2018-09-17 12:28:09 +02:00
d3c8a2bd75 Merge pull request #558 from corbin-coleman/bump-version-18.09.0-beta1.3
[18.09] Bump VERSION to 18.09.0-beta1.3
2018-09-14 13:14:55 -07:00
48f8e34e5a Bump VERSION to 18.09.0-beta1.3
Signed-off-by: corbin-coleman <corbin.coleman@docker.com>
2018-09-14 19:07:09 +00:00
68d223924d Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-14 16:37:05 +00:00
815b828ddb always hornor client side to choose which builder to use with DOCKER_BUILDKIT env var regardless the server setup
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 5d931705e33927ba9f0b7251b74b6b3c450edaf6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5badfb40ebf1877bb319af3892b32a78491fb8e8
Component: engine
2018-09-14 17:29:47 +02:00
f4f83c427c TestServiceWithDefaultAddressPoolInit: avoid panic
Saw this in moby ci:

> 00:22:07.582 === RUN   TestServiceWithDefaultAddressPoolInit
> 00:22:08.887 --- FAIL: TestServiceWithDefaultAddressPoolInit (1.30s)
> 00:22:08.887 	daemon.go:290: [d905878b35bb9] waiting for daemon to start
> 00:22:08.887 	daemon.go:322: [d905878b35bb9] daemon started
> 00:22:08.888 panic: runtime error: index out of range [recovered]
> 00:22:08.889 	panic: runtime error: index out of range
> 00:22:08.889
> 00:22:08.889 goroutine 360 [running]:
> 00:22:08.889 testing.tRunner.func1(0xc42069d770)
> 00:22:08.889 	/usr/local/go/src/testing/testing.go:742 +0x29d
> 00:22:08.890 panic(0x85d680, 0xb615f0)
> 00:22:08.890 	/usr/local/go/src/runtime/panic.go:502 +0x229
> 00:22:08.890 github.com/docker/docker/integration/network.TestServiceWithDefaultAddressPoolInit(0xc42069d770)
> 00:22:08.891 	/go/src/github.com/docker/docker/integration/network/service_test.go:348 +0xb53
> .....

Apparently `out.IPAM.Config[0]` is not there, so to avoid panic, let's
check the size of `out.IPAM.Config` first.

Fixes: f7ad95cab9c

[v2: add logging of data returned by NetworkInspect()]
[v3: use assert.Assert to fail immediately]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 69d3a8936b8d91e43290aadb9f7ac2cd2929dc61)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f43fc6650cf5a452157fe081086098c124a426fd
Component: engine
2018-09-14 15:22:43 +02:00
1b215eb873 Add fail fast path when containerd fails on startup
Prevents looping of startup errors such as containerd
not being found on the path.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit ce0b0b72bcc58de82ba1e0e7127499d07f678122)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 85361af1f749517c8bdfd3d36b0df94a92e29b2b
Component: engine
2018-09-14 15:20:07 +02:00
4ba612a68b Merge pull request #1375 from thaJeztah/18.09_backport_importlcow
[18.09] backport LCOW: --platform on import (already in API)
Upstream-commit: 78c42cf031
Component: cli
2018-09-14 15:06:21 +02:00
c1d70aac1f Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-14 12:36:55 +00:00
a59415a939 LCOW: --platform on import (already in API)
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit b55a0b681f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dd2f13bed4
Component: cli
2018-09-14 14:26:39 +02:00
d660c7046d Merge pull request #1373 from thaJeztah/18.09_backport_move_test_function_in_there
[18.09] backport getEngineConfigFilePath is only used during test so moving it in test files for now.
Upstream-commit: 3b991ec615
Component: cli
2018-09-14 13:20:12 +02:00
b7897f6e93 Merge pull request #1374 from thaJeztah/18.09_backport_docs_fixes
[18.09] backport update usage for 'docker build' with '--progress' and '--secret' options
Upstream-commit: 34ea8bb5a5
Component: cli
2018-09-14 12:55:50 +02:00
4a4ca3a409 update usage for 'docker build' with '--progress' and '--secret' options
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 83ca55db7d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: afb17ec70b
Component: cli
2018-09-14 12:35:22 +02:00
c13580aaef getEngineConfigFilePath is only used during test…
… so moving it in test files for now.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 37ca5d6813)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 62aed95bc1
Component: cli
2018-09-14 12:27:13 +02:00
15caa5031e update vendor
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 54b3af4c7d7d625b9cff6d5d7b8730ec99f38977)
Upstream-commit: ee40a9ebcda2f46ea731ac1e2f840a2a23be0a07
Component: engine
2018-09-13 16:42:13 -07:00
d0654cc902 propagate the dockerd cgroup-parent config to buildkitd
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit d52485c2f901e62e9a26445e230ec3f6662fa276)
Upstream-commit: e8620110fcbfca840e91bfb06348da8d9fd53e2e
Component: engine
2018-09-13 16:36:57 -07:00
6d339734f7 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-13 21:00:48 +00:00
bba2d5fcd5 Merge pull request #211 from andrewhsu/aufs
Merged with https://github.com/seemethere/unir
Upstream-commit: 0285849e90e7a1216b4c79670a8893b5f46e89ff
Component: packaging
2018-09-13 20:32:44 +00:00
a29a2ca481 type fix on deb package recommends aufs-tools
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 18a9c4921b0b185dea5873326df5ecaa2618b355
Component: packaging
2018-09-13 18:41:31 +00:00
09a225d195 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-13 13:03:45 +00:00
f27fe9ca16 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-13 13:03:35 +00:00
cd5bd70aa4 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-13 12:37:02 +00:00
5b21e6bfde Merge pull request #209 from kolyshkin/18.09-fix-seccomp
[18.09] image/Dockerfile: add osusergo, seccomp tags
Upstream-commit: 283db28dde5ddba8ba421240535318cb19b1df3f
Component: packaging
2018-09-13 12:14:05 +02:00
017b0f6ba8 Merge pull request #1368 from thaJeztah/carry-1360-store_prefix
[18.09] Prefix engine repo with store
Upstream-commit: 649e4916bb
Component: cli
2018-09-13 08:24:45 +02:00
ac99566390 image/Dockerfile: add osusergo, seccomp tags
osusergo build tag is needed for better chances to have
a proper static binary when Go >= 1.11 is used, and is
harmless otherwise.

seccomp build tag is needed so the resulting dockerd binary
has seccomp support.

[v2: add libseccomp-dev installation]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 97596405f4300a7ae6eb7664f6c58785955dd8d3
Component: packaging
2018-09-12 19:34:45 -07:00
ea3c2e02fc Merge pull request #46 from kolyshkin/18.09-backport-pr37771
[18.09] backport #37771 "vendor: update tar-split"
Upstream-commit: e9880018722a325a34290130255a820fff1779fa
Component: engine
2018-09-12 18:16:16 -07:00
b8bac33848 Merge pull request #48 from kolyshkin/18.09-backport-logs-follow
[18.09] backport "daemon.ContainerLogs(): fix resource leak on follow"
Upstream-commit: 6531bac59bfd453456231511bdc3efade1fc9481
Component: engine
2018-09-12 18:13:56 -07:00
f730722787 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-12 17:06:55 +00:00
1cc5cccebc Merge pull request #207 from seemethere/do_not_include_arch_1809
[18.09] Remove the arch in the image tag
Upstream-commit: 4246e237d47800b5a13904acbc789fd4555885b0
Component: packaging
2018-09-12 16:28:07 +02:00
434a8b60cc Remove the arch in the image tag
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit f7b0d0742e4b23e3442ce78cbc0d4c190929eb96)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 0fb14f8b914ada119d74818637e4a13176a51410
Component: packaging
2018-09-12 07:19:27 -07:00
75470dbe47 Merge pull request #206 from seemethere/remove_need_for_suffix_1809
[18.09] Remove need for SUFFIX in gen-deb-ver
Upstream-commit: 798d4cc8c5c1caf51632fa1da967725414e37b73
Component: packaging
2018-09-12 15:20:36 +02:00
21ad97749e Merge pull request #205 from seemethere/bump_containerd_proxy_1809
[18.09] Bump proxy to 35c543b
Upstream-commit: d3176d845cd14b033ab3b8d65e587b6af18ed6bf
Component: packaging
2018-09-12 15:13:52 +02:00
1b98ea2057 Remove need for SUFFIX in gen-deb-ver
Should generate correct bits whether or not the suffix is present.

Working example:

❯ ./gen-deb-ver . 18.09.0-beta1
18.09.0~1.1.beta1 18.09.0-beta1

❯ ./gen-deb-ver . 18.09.0-ce-beta1
18.09.0~ce~1.1.beta1 18.09.0-ce-beta1

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 9de3f6fb573806abc2e546447c41552ff90731a4)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: cc336d0804076b31d6d059b164e9b4e3b3cec886
Component: packaging
2018-09-12 06:03:56 -07:00
95d730b7e2 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-12 13:03:33 +00:00
ffcd2e38d1 Merge pull request #203 from seemethere/fix_tar_1809
[18.09] Have the tar target make a docker compat one too
Upstream-commit: 098761f13254bf956a92ebca219aa10b69b8e7d9
Component: packaging
2018-09-12 15:02:49 +02:00
1ba2a2621f Bump proxy to 35c543b
Includes fixes related to upgrade cycles

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 83a20d53f14adcd2bcc9e932435aa66b6e056afa)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: befa3c61954d12f2413df56a384989d7ae2cb9b3
Component: packaging
2018-09-12 06:00:21 -07:00
f8a31233fe Merge pull request #199 from dhiltgen/platform
Wire up the platform string properly
Upstream-commit: 6ada8595287d6c25e9553b4aa36c961c5bc6f968
Component: packaging
2018-09-12 14:59:32 +02:00
b18755d509 Add *.tar and image-linux to our gitignore
A bit overdue

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 11643a30e0bdde4016afe42ab5f1f85e0fc83ecf)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: f38206fa477c59ec39b06b8ddde40be1f65c7cf0
Component: packaging
2018-09-12 05:42:28 -07:00
7589c6479b Have the tar target make a docker compat one too
docker load doesn't support OCI based tar files so we have to make 2
different ones.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 696cdc009ca73b070d8877ee5cdd13c4b0e4a39b)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: ea811c67ee1e558ecec1b394fc591458b57f7ed1
Component: packaging
2018-09-12 05:42:28 -07:00
dccaa07396 Prefix engine repo with store
The official access point for the Q3 engine images will
be prefixed by store.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3597d75281
Component: cli
2018-09-12 13:43:04 +02:00
f9341039de Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-12 08:36:54 +00:00
1dd82b9047 Merge pull request #1364 from thaJeztah/18.09-backport_contains-containerized
[18.09] backport: remove containerizedengine package dependency from docker/cli/command…
Upstream-commit: 5673816fec
Component: cli
2018-09-12 08:55:12 +02:00
f36755c235 Wire up the platform string properly
This is set in a top-level makefile, but apparently
isn't getting passed all the way through as expected.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: a5ad5471419cb2a0935148f891c5ada8b13b4779
Component: packaging
2018-09-11 19:14:27 -07:00
c1d5de1803 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-11 17:03:27 +00:00
ce825751d7 Merge pull request #198 from jose-bigio/18.09_move_tar_targets
Merged with https://github.com/seemethere/unir
Upstream-commit: 335dcd5851a58acc7415450fc28f9a47b94b4ac4
Component: packaging
2018-09-11 16:37:57 +00:00
76d1f5bead Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-11 16:36:58 +00:00
9eec3ee5ff Merge pull request #1365 from thaJeztah/18.09-backport_engine-only-linux
[18.09] backport add `docker engine` commands only on Linux…
Upstream-commit: a8c69c8287
Component: cli
2018-09-11 18:04:57 +02:00
00ef8b90e6 Call the engine-.tar target
Also cleans up the target in rpm and deb Makfiles because
the tar target already output a tar.

Signed-off-by: Jose Bigio <jose.bigio@docker.com>
(cherry picked from commit 8a4744f48aa13bea0b4e9174165be4add0a5a42f)
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 8e4a92dc667e2143b6d5707e19c5564b7da46ba1
Component: packaging
2018-09-11 08:42:18 -07:00
92c32cb418 Move the tar creation to the image directory
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
(cherry picked from commit eba0ed1f3497ebf25666d96c73c71fde9de98b50)
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 9398be8a7b9ea3907de5c112c329fe3ef1832137
Component: packaging
2018-09-11 08:42:03 -07:00
4c421251cb Remove containerizedengine package dependency from docker/cli/command…
… this removes a whole lot of dependencies from people depending on docker/cli…

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 2d344b2f61)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fc3dc8f058
Component: cli
2018-09-11 17:01:02 +02:00
7c9cac74cd Add docker engine commands only on Linux…
… this is, for now, the only platform that is supported

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit a3a955f204)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2a46a3d46c
Component: cli
2018-09-11 16:57:54 +02:00
f2500128b0 Merge pull request #557 from dhiltgen/fix_version
Bump to beta1.2
2018-09-10 16:48:31 -07:00
4a4191fafe Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-10 21:06:01 +00:00
6af5c2b6a9 Merge pull request #185 from corbin-coleman/add-build-image-arg
[18.09] Parameterize Dockerfiles base build images
Upstream-commit: 66979a05d0debb27007da2861d909db7c1a7fb2a
Component: packaging
2018-09-10 10:30:46 -07:00
5e8bd8d686 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-10 17:03:06 +00:00
d10c52eaae Parameterize Dockerfiles base build images
This will make it easier for anybody to build with a specific version of a distro they want to build on.
They could lock into a specific sha of a docker image if they wanted, as an example.

Signed-off-by: corbin-coleman <corbin.coleman@docker.com>
Upstream-commit: 7afc35b95ac46bfef383788341ddb0b157af14eb
Component: packaging
2018-09-10 16:54:32 +00:00
8644fd23bd Merge pull request #193 from dhiltgen/bump_epoch
[18.09] Bump packaging epoch
Upstream-commit: 346f22eb45a72e6087d0996b4cd5699346c10e74
Component: packaging
2018-09-10 18:41:49 +02:00
7e81969c88 Merge pull request #192 from seemethere/no_offline_installer_1809
[18.09] Remove offline installer to install shim-process
Upstream-commit: a44c95733f9474359e96c7187d9e31e0db22ab50
Component: packaging
2018-09-10 18:41:30 +02:00
3082638047 Bump packaging epoch
This should accomodate the new versioning fix

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: be00095e1d0d5674665a63b6e5932178632feb0e
Component: packaging
2018-09-10 08:26:11 -07:00
251e48a733 Bump to beta1.2
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-10 08:18:45 -07:00
6069864507 Remove offline installer to install shim-process
Removes the need for the offline installer to install the shim process
and instead installs the shim process as part of the packaging.

May be easier in the future to just package the shim process on it's own
but that'll come after this 18.09 release

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit f8bd366d58f8bdf8a82b9a033353ca5bf4eda948)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 31d0cb047b98ab43f661bd026bdd63deef62543d
Component: packaging
2018-09-10 14:06:32 +00:00
a5616edf44 Merge pull request #551 from dhiltgen/fix_version
[18.09] Fix version string
2018-09-07 14:30:23 -07:00
1eb0dfc18f Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-07 17:03:46 +00:00
14bef21142 Switch to plain version strings
This removes the "ce" and "ee" portion of the version string

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-07 09:58:56 -07:00
ca6cbf3a46 Merge pull request #190 from seemethere/1809_deb
Merged with https://github.com/seemethere/unir
Upstream-commit: 8887f3388e8a91ca6b45854f4f354286102682ad
Component: packaging
2018-09-07 15:55:26 +00:00
07875f74c1 Fix docker-ce-cli replacing files
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 193a6be5de72509679c8729c8d4e3a81de4f1e8e)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 1293fb54734e6d4391cf6957eae7a1659306e4eb
Component: packaging
2018-09-07 14:16:46 +00:00
a620951919 TestFollowLogsProducerGone: add
This should test that
 - all the messages produced are delivered (i.e. not lost)
 - followLogs() exits

Loosely based on the test having the same name by Brian Goff, see
https://gist.github.com/cpuguy83/e538793de18c762608358ee0eaddc197

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f845d76d047760c91dc0c7076aea840291fbdbc5)
Upstream-commit: 2a82480df9ad91593d59be4b5283917dbea2da39
Component: engine
2018-09-06 18:39:22 -07:00
1a333bfe59 daemon.ContainerLogs(): fix resource leak on follow
When daemon.ContainerLogs() is called with options.follow=true
(as in "docker logs --follow"), the "loggerutils.followLogs()"
function never returns (even then the logs consumer is gone).
As a result, all the resources associated with it (including
an opened file descriptor for the log file being read, two FDs
for a pipe, and two FDs for inotify watch) are never released.

If this is repeated (such as by running "docker logs --follow"
and pressing Ctrl-C a few times), this results in DoS caused by
either hitting the limit of inotify watches, or the limit of
opened files. The only cure is daemon restart.

Apparently, what happens is:

1. logs producer (a container) is gone, calling (*LogWatcher).Close()
for all its readers (daemon/logger/jsonfilelog/jsonfilelog.go:175).

2. WatchClose() is properly handled by a dedicated goroutine in
followLogs(), cancelling the context.

3. Upon receiving the ctx.Done(), the code in followLogs()
(daemon/logger/loggerutils/logfile.go#L626-L638) keeps to
send messages _synchronously_ (which is OK for now).

4. Logs consumer is gone (Ctrl-C is pressed on a terminal running
"docker logs --follow"). Method (*LogWatcher).Close() is properly
called (see daemon/logs.go:114). Since it was called before and
due to to once.Do(), nothing happens (which is kinda good, as
otherwise it will panic on closing a closed channel).

5. A goroutine (see item 3 above) keeps sending log messages
synchronously to the logWatcher.Msg channel. Since the
channel reader is gone, the channel send operation blocks forever,
and resource cleanup set up in defer statements at the beginning
of followLogs() never happens.

Alas, the fix is somewhat complicated:

1. Distinguish between close from logs producer and logs consumer.
To that effect,
 - yet another channel is added to LogWatcher();
 - {Watch,}Close() are renamed to {Watch,}ProducerGone();
 - {Watch,}ConsumerGone() are added;

*NOTE* that ProducerGone()/WatchProducerGone() pair is ONLY needed
in order to stop ConsumerLogs(follow=true) when a container is stopped;
otherwise we're not interested in it. In other words, we're only
using it in followLogs().

2. Code that was doing (logWatcher*).Close() is modified to either call
ProducerGone() or ConsumerGone(), depending on the context.

3. Code that was waiting for WatchClose() is modified to wait for
either ConsumerGone() or ProducerGone(), or both, depending on the
context.

4. followLogs() are modified accordingly:
 - context cancellation is happening on WatchProducerGone(),
and once it's received the FileWatcher is closed and waitRead()
returns errDone on EOF (i.e. log rotation handling logic is disabled);
 - due to this, code that was writing synchronously to logWatcher.Msg
can be and is removed as the code above it handles this case;
 - function returns once ConsumerGone is received, freeing all the
resources -- this is the bugfix itself.

While at it,

1. Let's also remove the ctx usage to simplify the code a bit.
It was introduced by commit a69a59ffc7e3d ("Decouple removing the
fileWatcher from reading") in order to fix a bug. The bug was actually
a deadlock in fsnotify, and the fix was just a workaround. Since then
the fsnofify bug has been fixed, and a new fsnotify was vendored in.
For more details, please see
https://github.com/moby/moby/pull/27782#issuecomment-416794490

2. Since `(*filePoller).Close()` is fixed to remove all the files
being watched, there is no need to explicitly call
fileWatcher.Remove(name) anymore, so get rid of the extra code.

Should fix https://github.com/moby/moby/issues/37391

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 916eabd459fe707b5c4a86377d12e2ad1871b353)
Upstream-commit: 84a5b528aede5579861201e869870d10fc98c07c
Component: engine
2018-09-06 18:39:22 -07:00
a76b67642d daemon/logger/loggerutils: add TestFollowLogsClose
This test case checks that followLogs() exits once the reader is gone.
Currently it does not (i.e. this test is supposed to fail) due to #37391.

[kolyshkin@: test case Brian Goff, changelog and all bugs are by me]
Source: https://gist.github.com/cpuguy83/e538793de18c762608358ee0eaddc197

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit d37a11bfbab83ab42b1160f116e863daac046192)
Upstream-commit: 511741735e0aa2fe68a66d99384c00d187d1a157
Component: engine
2018-09-06 18:39:22 -07:00
e5cc6e7dc4 daemon.ContainerLogs: minor debug logging cleanup
This code has many return statements, for some of them the
"end logs" or "end stream" message was not printed, giving
the impression that this "for" loop never ended.

Make sure that "begin logs" is to be followed by "end logs".

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 2e4c2a6bf9cb47fd07e42f9c043024ed3dbcd04d)
Upstream-commit: 2b8bc86679b7153bb4ace063a858637df0f16a2e
Component: engine
2018-09-06 18:39:22 -07:00
21c28e4566 pkg/filenotify/poller: fix Close()
The code in Close() that removes the watches was not working,
because it first sets `w.closed = true` and then calls w.close(),
which starts with
```
        if w.closed {
                return errPollerClosed
	}
```

Fix by setting w.closed only after calling w.remove() for all the
files being watched.

While at it, remove the duplicated `delete(w.watches, name)` code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit fffa8958d00860b4e3563327a2cc6836a12d4ba9)
Upstream-commit: 4e2dbfa1af48191126b0910b9463bf94d8371886
Component: engine
2018-09-06 18:39:21 -07:00
abbd665e30 pkg/filenotify/poller: close file asap
There is no need to wait for up to 200ms in order to close
the file descriptor once the chClose is received.

This commit might reduce the chances for occasional "The process
cannot access the file because it is being used by another process"
error on Windows, where an opened file can't be removed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit dfbb64ea7d042d5b2bb0c1c2b88e3682b7069b10)
Upstream-commit: 3a3bfcbf47e98212abfc9cfed860d9e99fc41cdc
Component: engine
2018-09-06 18:39:21 -07:00
42fda5fe7e pkg/filenotify: poller.Add: fix fd leaks on err
In case of errors, the file descriptor is never closed. Fix it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 88bcf1573ca2eaffc15da346a1651a3749567554)
Upstream-commit: 7be43586af6824c1e55cb502d9d2bab45c9b4505
Component: engine
2018-09-06 18:39:21 -07:00
f75eb8f2a7 vendor: update tar-split
To include https://github.com/vbatts/tar-split/pull/48 which
fixes the issue of creating an image with >8GB file in it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 92e75439037d205c218208945c70cfb3633e87aa)
Upstream-commit: d7085abec2e445630bedd3e79782c5ec33f62682
Component: engine
2018-09-06 17:24:39 -07:00
a4e38c5935 integration/build: add TestBuildHugeFile
Add a test case for creating a 8GB file inside a container.
Due to a bug in tar-split this was failing in Docker 18.06.

The file being created is sparse, so there's not much I/O
happening or disk space being used -- meaning the test is
fast and does not require a lot of disk space.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b3165f5b2d7c1063c2a76a7ed5c2dd18f868276b)
Upstream-commit: fc1d808c44f77e3929c4eeba7066501890aecd4e
Component: engine
2018-09-06 17:24:36 -07:00
78a6bdb3e9 Merge pull request #556 from andrewhsu/beta
[18.09]  bump ver 18.09.0-ce-beta1
2018-09-06 15:22:37 -07:00
e11e1e776f remove changelog lines that need to be sorted later
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-09-06 21:06:28 +00:00
595dca1ce7 bump ver 18.09.0-ce-beta1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-09-06 21:04:56 +00:00
b5efc7fd18 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-06 21:03:43 +00:00
0e6daf811c Merge pull request #181 from seemethere/bump_1104
Merged with https://github.com/seemethere/unir
Upstream-commit: 3921898c49fbb46e7a00d273cd208af233d5c0f7
Component: packaging
2018-09-06 18:11:16 +00:00
3e0cdd1771 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-06 13:03:00 +00:00
ad43c8604b Merge pull request #182 from seemethere/backport_systemd
[18.09] Update new systemd unit file with changes from upstream
Upstream-commit: a354d5f78fc58bd7a2526fcec87262a27d3b009d
Component: packaging
2018-09-06 10:26:02 +01:00
7989718c30 Merge pull request #555 from andrewhsu/v-6
[18.09] bump ver 18.09.0-ce-tp6
2018-09-05 16:44:35 -07:00
b3f7bffa62 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-05 23:17:19 +00:00
df21fd28e1 connhelper: fix cmd.Wait() race
Fix #1336

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit a22853e64d)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b2cf18ac2e
Component: cli
2018-09-05 16:03:41 -07:00
2b581132c7 Merge pull request #187 from andrewhsu/to
[18.09] Update proxy commit for shutdown timeouts
Upstream-commit: fc32916152b333dcf8ade021242eb86bb1c6b301
Component: packaging
2018-09-05 15:45:18 -07:00
14fc3fe7f5 Update proxy commit for shutdown timeouts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 7941c692e67a67f011881bff1d200a2fcaeb6568)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 61d98f8540f8ef37e4940a6799077490a5756ebe
Component: packaging
2018-09-05 22:39:47 +00:00
159b106632 bump ver 18.09.0-ce-tp6
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-09-05 22:28:44 +00:00
ee3281c00d Merge branch '18.09' of github.com:docker/docker-ce into 18.09 2018-09-05 21:03:08 +00:00
3c0a64bc35 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-05 21:02:57 +00:00
2de7c7a6ba Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-05 20:39:55 +00:00
98e7d7c042 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-05 20:36:54 +00:00
47ce4dc83f Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-05 20:15:13 +00:00
cceba0654c Merge pull request #1339 from andrewhsu/vr
[18.09] vndr docker/docker to docker/engine d2ecc7b
Upstream-commit: 44371c7c34
Component: cli
2018-09-05 11:43:09 -07:00
a65331fc7c Merge pull request #44 from andrewhsu/sup
[18.09] Fix supervisor healthcheck throttling
Upstream-commit: 7485ef7e46e2766a0da06fc63001e84d8ea36514
Component: engine
2018-09-05 11:14:31 -07:00
3fb39207b2 vndr docker/docker to docker/engine d2ecc7b
And update the associated packages that have also updated from
docker/docker vendor.conf.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 4e6798794d
Component: cli
2018-09-05 17:35:51 +00:00
9736052cc9 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-05 17:05:03 +00:00
ee953424ff Merge pull request #43 from andrewhsu/tls
[18.09] client: dial tls on Dialer if tls config is set
Upstream-commit: d2ecc7bad104139c118249ad159b45315a022754
Component: engine
2018-09-05 06:43:23 -07:00
a3c945ce7d Merge component 'cli' from git@github.com:docker/cli 18.09 2018-09-05 08:36:37 +00:00
1e791aef77 Fix supervisor healthcheck throttling
Fix default case causing the throttling to not be used.
Ensure that nil client condition is handled.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
(cherry picked from commit c3e32938430e03a316311f9e4fbdb743e492a07e)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: f121eccf29576ce5d4b8256a71a9d32ee688ff7d
Component: engine
2018-09-05 06:59:52 +00:00
0512e4dbc2 Merge pull request #1334 from tiborvass/18.09-cmd-builder-prune-with-options
[18.09] build: add options to builder prune
Upstream-commit: d8aefad94a
Component: cli
2018-09-04 22:35:23 -07:00
b88f0d2dc1 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-05 05:03:41 +00:00
15c2034539 system df: show table output for build cache
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit ca608c2302)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3c37d6a034
Component: cli
2018-09-05 03:33:30 +00:00
d62dfa0a57 build: add options to builder prune
This patch adds --filter, --keep-storage, --all and --force to builder prune.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit c806eb49c9)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9d43f1ed48
Component: cli
2018-09-05 03:33:30 +00:00
52094c19a7 Merge pull request #42 from tiborvass/18.09-cp-buildkit
[18.09] Buildkit cherry-picks
Upstream-commit: 00a9cf39edc2a8a2c83b488845f40e43b7f2cd37
Component: engine
2018-09-04 18:46:24 -07:00
5722149ff5 client: dial tls on Dialer if tls config is set
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 5974fc25403f149be796c6d69270881854547633)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: c2d005320705c1339f8b2d5935f50f4c5b9cc6fc
Component: engine
2018-09-05 01:17:31 +00:00
b79c304fc7 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-09-04 21:05:06 +00:00
1973969411 Merge pull request #183 from dhiltgen/better_names_q3
Merged with https://github.com/seemethere/unir
Upstream-commit: 7d267aead838281770e779c3552aaf2793c68cf2
Component: packaging
2018-09-04 19:46:08 +00:00
9ae8fd5cd9 Change deb package filenames to be unique
It's generally bad-form to generate two identically named package files
that are actually different, so we should name our packages based on
the distro and version, not just the distro.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit 13bde85f0067a751f775d31919705645ecc0a6d7)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 3c757b281bb623d9622c74143340fd892c8655ad
Component: packaging
2018-09-04 12:43:44 -07:00
90b4f8c14c vendor buildkit to fix a couple of bugs
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit effa24bf48170f141cd9e1c1fcb5d39aedf1ca74)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 4c35d811471b80eec10476050b1222b653e6c5d9
Component: engine
2018-09-04 15:52:24 +00:00
d448ca1e85 builder: implement ref checker
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 354c241041ec67d4c500cccfda476dc73435d38e)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 28150fc70cc0688c63d27879bf1c701ade47caff
Component: engine
2018-09-04 15:02:28 +00:00
e376b78cb5 builder: fix pruning all cache
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d47435a004e36531a594cd2636dddaff61a5f4d0)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: d2c316364225cd6bdf1581d11f370e0d159ad362
Component: engine
2018-09-04 15:02:28 +00:00
5a73ccd4a8 builder: add prune options to the API
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8ff7847d1cf0f156b8a7cf1450aa944ef636c747)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3153708f13ceefc3e8e4d4a93778dcc9e4347f5a
Component: engine
2018-09-04 15:02:28 +00:00
5cbbb8e6bd allow features option live reloadable
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 58a75cebdd08f3d504a5be79cc405cf33c4cbf43)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 2f94f103425985dc1677ee9a87f1161007949a45
Component: engine
2018-09-04 15:01:46 +00:00
73a59f6710 systemd: set start burst limits
Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229
(6bf0f408e4)
both the old, and new location are accepted by systemd 229 and up, so using the old location
to make them work for either version of systemd.

StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230
(f0367da7d1)
both the old, and new name are accepted by systemd 230 and up, so using the old name to make
this option work for either version of systemd.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2c2bfea5d009fb884f5c61b62e3c85bd88e7909e)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 5963decd1502e5012692a1f958bfdc5403f02920
Component: packaging
2018-09-04 14:56:45 +00:00
2e215339a1 systemd: add support for reloading daemon configuration through systemd
This adds support for reloading the docker daemon
(SIGHIUP) so that changes in '/etc/docker/daemon.json'
can be loaded at runtime by reloading the service
through systemd ('systemctl reload docker')

Before this change, systemd would output an error
that "reloading" is not supported for the docker
service;

  systemctl reload docker
  Failed to reload docker.service: Job type reload is not applicable for unit docker.service.

After this change, the docker daemon can be reloaded
through 'systemctl reload docker', which reloads
the configuration;

  journalctl -f -u docker.service

  May 02 03:49:20 testing systemd[1]: Reloading Docker Application Container Engine.
  May 02 03:49:20 testing docker[28496]: time="2016-05-02T03:49:20.143964103-04:00" level=info msg="Got signal to reload configuration, reloading from: /etc/docker/daemon.json"
  May 02 03:49:20 testing systemd[1]: Reloaded Docker Application Container Engine.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3e1b508e5f70b35869d9c8417d3b65a141820af9)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 127426fc693a882b670339391da5d12f08c1438d
Component: packaging
2018-09-04 14:56:45 +00:00
350162b4b0 systemd: set systemd KillMode
Change the kill mode to process so that systemd does not kill container
processes when the daemon is shutdown but only the docker daemon

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d736ae9da7401f582469fa7e943adde9f2163024)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 784c5936ec984b5525ac71eca3b7731e49eb6b37
Component: packaging
2018-09-04 14:56:45 +00:00
32fc71f155 systemd: add "Delegate=yes" to docker's service file
We need to add delegate yes to docker's service file so that it can
manage the cgroups of the processes that it launches without systemd
interfering with them and moving the processes after it is reloaded.

       Delegate=
           Turns on delegation of further resource control partitioning to
           processes of the unit. For unprivileged services (i.e. those
           using the User= setting), this allows processes to create a
           subhierarchy beneath its control group path. For privileged
           services and scopes, this ensures the processes will have all
           control group controllers enabled.

This is the proper fix for issue moby/moby#20152

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e134e666a585b1f13e9e5e371dd93e5ce04a4b34)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 1120496ca0492d29731befd1460a934ac115e7f8
Component: packaging
2018-09-04 14:56:45 +00:00
6d203c7711 systemd: don't limit tasks
Systemd sets a default of 512 tasks, which is far
too low to run many containers.

Note that TasksMax is only supported on systemd 226
and above.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 82fe96733f551d36018c3840cf21d813807e9b76)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c42e4736e055c472284fd09ca05d405d31c4516a
Component: packaging
2018-09-04 14:56:45 +00:00
39e2041c69 systemd: set Limit* to infinity
There is a not-insignificant performance overhead for all containers (if
containerd is a child of Docker, which is the current setup) if systemd
sets rlimits on the main Docker daemon process (because the limits
propogate to all children).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 68e15413dce8d6e8f428ac286641a9482d30aabc)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 1246dedcd55058a2856c7042509fb0badcefbf91
Component: packaging
2018-09-04 14:56:45 +00:00
43ccd4737c systemd: no limit on core size
set LimitCORE=infinity to ensure complete core creation,
allows extraction of as much information as possible.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit da69663b9ccd72d95ec60007ef707d82a35324fa)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: f93f4525173e3a32d315794344d44bae780de00e
Component: packaging
2018-09-04 14:56:45 +00:00
587ab4033e Bump Go to 1.10.4
Includes fixes to the go command, linker, and the net/http, mime/multipart,
ld/macho, bytes, and strings packages. See the Go 1.10.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.10.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 11b4630f4c73885123336b7917cc139c43cf413a)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 3920ea81ea2cab8e1f5f17fb16e133cfb87d9c98
Component: packaging
2018-09-04 08:26:35 +00:00
98bf03686b Merge component 'engine' from git@github.com:docker/engine 18.09 2018-09-01 05:02:56 +00:00
bc6b7c4c03 Merge pull request #37 from thaJeztah/18.09_backport_fix_prefix_matching
[18.09] backport: fix regression when filtering container names using a leading slash
Upstream-commit: b8a4fe5f8f58bccfa3763ca75c6465447c8ccd06
Component: engine
2018-08-31 21:15:00 -07:00
2dd6187bd6 Merge pull request #41 from kolyshkin/18.09-backport-pr37739
[18.09] backport "fix relabeling local volume source dir"
Upstream-commit: 648704522bdeccff09816055db754478e7b97c93
Component: engine
2018-08-31 19:01:01 -07:00
4d84fbbcda Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-31 21:03:54 +00:00
7ee4f65588 Merge pull request #176 from dhiltgen/oci_labels
Merged with https://github.com/seemethere/unir
Upstream-commit: e1bdbd889d78fe776404174b2170c7db256ee220
Component: packaging
2018-08-31 20:46:38 +00:00
7a491b2301 Fix relabeling local volume source dir
In case a volume is specified via Mounts API, and SELinux is enabled,
the following error happens on container start:

> $ docker volume create testvol
> $ docker run --rm --mount source=testvol,target=/tmp busybox true
> docker: Error response from daemon: error setting label on mount
> source '': no such file or directory.

The functionality to relabel the source of a local mount specified via
Mounts API was introduced in commit 5bbf5cc and later broken by commit
e4b6adc, which removed setting mp.Source field.

With the current data structures, the host dir is already available in
v.Mountpoint, so let's just use it.

Fixes: e4b6adc
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 4032b6778df39f53fda0e6e54f0256c9a3b1d618
Component: engine
2018-08-30 17:34:59 -07:00
9eb3d3628d Merge pull request #553 from andrewhsu/tp5
[18.09] bump ver to 18.09.0-ce-tp5
2018-08-29 13:53:49 -07:00
038ccb8c79 bump ver to 18.09.0-ce-tp5
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-08-29 20:03:52 +00:00
b6f361cd3a Add standard OCI labels
This adds the standardized OCI labels for our image so downstream tools
will be able to inspect/extract these mechanically.

Reference: https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 58e5b9c98134930c00ad678bc0de454b490dd7b6
Component: packaging
2018-08-29 10:27:51 -07:00
c51c7e3122 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-08-29 16:36:56 +00:00
3d47abb1d1 Merge pull request #1322 from thaJeztah/18.09_backport_bump_kube_deps
[18.09] backport: bump kube dependency to 1.11.2
Upstream-commit: a818677813
Component: cli
2018-08-29 17:56:26 +02:00
593e7b7d05 Merge pull request #1323 from thaJeztah/18.09_backport_bump_golang_1.10.4
[18.09] backport: bump Go to 1.10.4
Upstream-commit: c204959687
Component: cli
2018-08-29 15:32:30 +02:00
199effc58c Bump Go to 1.10.4
Includes fixes to the go command, linker, and the net/http, mime/multipart,
ld/macho, bytes, and strings packages. See the Go 1.10.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.10.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 44ca0901d1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 76c09259db
Component: cli
2018-08-29 15:19:34 +02:00
6378b2a9e2 Bump kube dependency to 1.11.2
Bump our kube dependencies to the latest patch
level for kube 1.11.

Signed-off-by: Marcus Martins <marcus@docker.com>
(cherry picked from commit c67e05796b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0efb62cab1
Component: cli
2018-08-29 14:59:20 +02:00
68b3c3dd7c Fix regression when filtering container names using a leading slash
Commit 5c8da2e96738addd8a175e5b9a23b8c37d4a4dfe updated the filtering behavior
to match container-names without having to specify the leading slash.

This change caused a regression in situations where a regex was provided as
filter, using an explicit leading slash (`--filter name=^/mycontainername`).

This fix changes the filters to match containers both with, and without the
leading slash, effectively making the leading slash optional when filtering.

With this fix, filters with and without a leading slash produce the same result:

    $ docker ps --filter name=^a
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    21afd6362b0c        busybox             "sh"                2 minutes ago       Up 2 minutes                            a2
    56e53770e316        busybox             "sh"                2 minutes ago       Up 2 minutes                            a1

    $ docker ps --filter name=^/a
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    21afd6362b0c        busybox             "sh"                2 minutes ago       Up 2 minutes                            a2
    56e53770e316        busybox             "sh"                3 minutes ago       Up 3 minutes                            a1

    $ docker ps --filter name=^b
    CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS              PORTS               NAMES
    b69003b6a6fe        busybox             "sh"                About a minute ago   Up About a minute                       b1

    $ docker ps --filter name=^/b
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    b69003b6a6fe        busybox             "sh"                56 seconds ago      Up 54 seconds                           b1

    $ docker ps --filter name=/a
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    21afd6362b0c        busybox             "sh"                3 minutes ago       Up 3 minutes                            a2
    56e53770e316        busybox             "sh"                4 minutes ago       Up 4 minutes                            a1

    $ docker ps --filter name=a
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    21afd6362b0c        busybox             "sh"                3 minutes ago       Up 3 minutes                            a2
    56e53770e316        busybox             "sh"                4 minutes ago       Up 4 minutes                            a1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6f9b5ba810e9314ab9335490cd41316940a32b5e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5fa80da2d385520f2c3c91e8ce23d181e4f93097
Component: engine
2018-08-29 12:54:06 +02:00
b621aec086 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-29 06:31:07 +00:00
e93312430e Merge pull request #173 from andrewhsu/se
[18.09] add requires container-selinux to spec
Upstream-commit: 3e1fd2ba5b9aaf19eff1880092c165e96e42a13a
Component: packaging
2018-08-28 22:12:02 -07:00
3f43cbacf5 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-29 05:00:53 +00:00
bc725764d9 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-08-29 04:36:33 +00:00
39bc439e8b add requires container-selinux to spec
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: e4b1c10a6b99b875cd5e37bbfef0b9a6ce58a518
Component: packaging
2018-08-29 04:23:49 +00:00
fc6d931f21 Merge pull request #172 from dhiltgen/seccomp_dep
[18.09] Add explicit dependency for libseccomp2
Upstream-commit: f0a0c5acba3f6bb7285853f44a17ecd5d4638219
Component: packaging
2018-08-28 21:06:40 -07:00
9823e5c1f0 Merge pull request #1313 from dhiltgen/product_license
[18.09] Expose product license in info output
Upstream-commit: 8789e93d6e
Component: cli
2018-08-28 21:05:09 -07:00
8a8398e8e4 Merge pull request #165 from dhiltgen/platform
Merged with https://github.com/seemethere/unir
Upstream-commit: bb9b1d3c1cddaf58bdb83931a1f1e35f88b07fbc
Component: packaging
2018-08-29 03:51:49 +00:00
eaabc7f477 Merge pull request #1312 from dhiltgen/dual_keys
[18.09] Add support for multiple signing keys
Upstream-commit: 0ee05a6353
Component: cli
2018-08-28 20:51:22 -07:00
68a6e99be4 Expose product license in info output
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 68be7cb376
Component: cli
2018-08-28 20:10:09 -07:00
a527889f83 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-29 01:08:10 +00:00
1512b5833d Merge component 'cli' from git@github.com:docker/cli 18.09 2018-08-29 00:41:41 +00:00
ad82a267b6 Merge pull request #171 from andrewhsu/ps
[18.09] Add post-stop
Upstream-commit: 66ad326a35cba7a1d8dd1be2b445e3bdff40d576
Component: packaging
2018-08-28 17:41:35 -07:00
3a6b03f884 Add explicit dependency for libseccomp2
While testing on older ubuntu images we discovered
we do depend on a newer version of libseccomp2.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f2ceca98823548e401c6cca125b7057df28c4892
Component: packaging
2018-08-28 17:07:43 -07:00
cc5399a50d Add post-stop
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 5f4b9c0eab3978e491ff249aacffb2338bf2408a)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 89d78463660094d24878c9060d7ef45dddc7546b
Component: packaging
2018-08-28 23:31:50 +00:00
95ea0f1d1a Merge pull request #170 from jose-bigio/bump_ubuntu_epoch
Merged with https://github.com/seemethere/unir
Upstream-commit: e7ab731876d3f33c70d7d0767193920ffc30d986
Component: packaging
2018-08-28 23:19:20 +00:00
b266ca7c3b Merge pull request #1317 from dhiltgen/play_nice_with_proxy
Update proxy config if present
Upstream-commit: de805da04c
Component: cli
2018-08-28 15:01:56 -07:00
80cd126e9a Merge pull request #1311 from dhiltgen/fix_progress
[18.09] Fix progress reporting for containerd pulls
Upstream-commit: b75350de7a
Component: cli
2018-08-28 14:59:59 -07:00
52ba084f01 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-28 21:01:37 +00:00
85c6730591 Bump the epoch from 2 to 3 for deb packages
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 4f3c49bc920bd125aeeea546d48c561f317c4c37
Component: packaging
2018-08-28 13:27:01 -07:00
292dd4d5bd Merge pull request #167 from seemethere/suffix
Merged with https://github.com/seemethere/unir
Upstream-commit: 080c2c5b30b2f1cd5997b1e03fd04d7ef1aebdd1
Component: packaging
2018-08-28 20:21:38 +00:00
40dd03795f Specify suffix for DEB_VERSION
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 6c5b7fcb956871f7a44e1a478ad9450f9df4bed1
Component: packaging
2018-08-28 17:24:58 +00:00
be6ee8f3d3 Update proxy config if present
If the system has a containerd-proxy managing the lifecycle
of the daemon, make sure the config is updated with the new image
on update.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f96ddaedf7
Component: cli
2018-08-28 10:11:44 -07:00
abe3a13a71 Add support for multiple signing keys
Basic enterprise licenses and platform license keys will be signed with
two different keys in the upcoming release.  This adds support for the
CLI to support both variants.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 0fb6bb35a4
Component: cli
2018-08-27 15:20:30 -07:00
ab04682b19 Vendor bump for licensing library to support multiple signing keys
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 264ee43c2a
Component: cli
2018-08-27 15:20:19 -07:00
64587cac6e Fix progress reporting for containerd pulls
During refactoring of the implementation PR progress reporting
was broken.  This gets the progress reporting back in action.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 7f4c842e8a
Component: cli
2018-08-27 14:44:13 -07:00
c73f38b967 Merge component 'cli' from git@github.com:docker/cli 18.09 2018-08-27 16:37:00 +00:00
72ee90b9b2 Merge pull request #1310 from thaJeztah/18.09-backport_update-docs
[18.09] backport: update docs with the new features option in daemon.json
Upstream-commit: e25e9d68be
Component: cli
2018-08-27 13:46:15 +02:00
b7cdcaa0cf update docs with the new features option in daemon.json
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 3e0b0a6692)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6877dedeee
Component: cli
2018-08-27 11:51:39 +02:00
4ca20bcd76 Add build date per upstream moby pattern
This adds a build date using the same pattern as upstream
https://github.com/moby/moby/blob/master/hack/make.sh#L69

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: c443439189fdc40c012ef5ac6cf592d32f478b54
Component: packaging
2018-08-24 17:19:51 -07:00
12f331f6b2 Expose the platform string for community builds
This encodes the platform as "Docker Engine - Community"
for community engines

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 4d9fd7d17f3aab3463baf6030072f5789a003a74
Component: packaging
2018-08-24 17:05:42 -07:00
33764aa4ae Merge pull request #552 from andrewhsu/tp4
[18.09] bump ver to 18.09.0-ce-tp4
2018-08-24 16:03:37 -07:00
217d24056c Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-24 23:01:13 +00:00
90b540baa9 Merge pull request #164 from andrewhsu/rsec
[18.09] added RestartSec
Upstream-commit: e551ce432933cc841103688852390768c2eeda0d
Component: packaging
2018-08-24 15:45:36 -07:00
3e2da1ea70 added RestartSec
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 3614f5dc4eb20e0d028ee1b2fd4bc23d34815f39
Component: packaging
2018-08-24 22:40:02 +00:00
b1e2655de1 bump ver to 18.09.0-ce-tp4
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-08-24 22:24:43 +00:00
8f960d9901 Merge pull request #162 from andrewhsu/cprox
[18.09] update containerd proxy commit to afca176
Upstream-commit: ad501c8f80636b3446db0a15d6a9da8ccfd65ccd
Component: packaging
2018-08-24 15:19:12 -07:00
546163ada0 update containerd proxy commit to afca176
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: eea6967f5de4835800349b1bcf2b81de8fd92207
Component: packaging
2018-08-24 22:14:20 +00:00
357d520355 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-24 19:54:36 +00:00
bcac5c18d0 Merge pull request #160 from dhiltgen/fix_scope
[18.09] Make engine scope a build time setting
Upstream-commit: 4a425676ac9183011f84fafda1a103fe93121dd1
Component: packaging
2018-08-24 12:01:27 -07:00
66e16d32fe Make engine scope a build time setting
This should make it easier to change downstream builds
to change the scope.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 72406691244c12d5360889f8658bd4989b588364
Component: packaging
2018-08-24 11:40:42 -07:00
ca36ebeff9 Merge pull request #550 from seemethere/v
[18.09] bump version to 18.09.0-ce-tp3
2018-08-23 11:02:40 -07:00
b5ee375fd4 bump version to 18.09.0-ce-tp3
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-23 17:59:49 +00:00
6ac22f3d8e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2018-08-23 17:53:11 +00:00
0ee2fe2920 Merge component 'engine' from git@github.com:docker/engine 18.09 2018-08-23 17:53:02 +00:00
5e417d9bd2 Merge pull request #158 from andrewhsu/ac
[18.09] use systemctl is-active to check for containerd
Upstream-commit: 7e5cc1a95e11a48148f1972d625322ae1399c0bc
Component: packaging
2018-08-23 09:59:48 -07:00
51edf81efb use systemctl is-active to check for containerd
The other way was not working.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit f00df1bf1efa2ed1ea508ea7b1c291500441571d)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: a9b0387bb0f40bd7687d8653a0714724eb66f3b9
Component: packaging
2018-08-23 16:57:41 +00:00
97dd93e978 Merge pull request #157 from seemethere/remove_overlay_1809
[18.09] Remove overlay as the default storage driver
Upstream-commit: 54dc76c596e5f5fe8ee76e65a0ac601f8a1d8e8b
Component: packaging
2018-08-23 09:44:14 -07:00
dc460e810c Remove overlay as the default storage driver
Should rely on list in the daemon

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 605758124d0750c14d24bfb1ebcf77d102591f4a)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 6cc81c2e8c95127baac275750bc544452fec7799
Component: packaging
2018-08-23 16:39:44 +00:00
dbb89de17a Merge pull request #155 from seemethere/fix_up_dockerfile_1809
[18.09] Fix up Dockerfile.engine to compile docker-proxy statically
Upstream-commit: 9162117ba4c76ad329c4c4abeab02b91e76cbd4c
Component: packaging
2018-08-23 08:50:54 -07:00
6c6bc2f8c9 Remove linux-headers as a dependency
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 82258262f90bfaca3a2ef14e6b53238c2fac3147
Component: packaging
2018-08-23 15:08:24 +00:00
46e2c8ce3b Merge pull request #35 from tiborvass/18.09-fix-network-buildkit
[18.09] builder: fix bridge networking when using buildkit
Upstream-commit: be371291bcbf5ce89ed5d9122d046ff18f8fdaba
Component: engine
2018-08-23 06:21:34 -07:00
cb322aa233 builder: fix bridge networking when using buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit dc7e472db986fa3c07806f56e82db756c47567fb)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 1d531ff64f99e07ac8733894416de8212a6c7278
Component: engine
2018-08-23 05:32:51 +00:00
45b43d2050 Wire up dependencies for debian, source -> .
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 99bbb6e33f46b6e2621204aac3b05344783ccfaa)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 3aeb8e9365fefea1be6e6b64624fccb81d5a70ad
Component: packaging
2018-08-22 23:28:39 +00:00
adca33ea9c Fix whitespace, add Dockerfile.engine to clean
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 831482a3296e9a7b1ad10f6b8c850a7a4095b881)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: ce1d295cf4f7049dc48813d825511a85ebf7e9c1
Component: packaging
2018-08-22 23:28:39 +00:00
cea6d4e302 Make GO_IMAGE configurable, default to official go
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 4cdbe08bf929d5c731b61e1cea217fa40156a3a8)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 5bfb6ce9464fea13abc71fb6c12b9f5cb01a29a4
Component: packaging
2018-08-22 23:28:39 +00:00
4bb0619413 Merge pull request #548 from seemethere/ignore_tars
[18.09] Ignore tar's
2018-08-22 10:58:23 -07:00
df8a9dde61 Ignore tar's
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-22 17:56:22 +00:00
729a38cb5a Merge pull request #546 from seemethere/gitignore_1809
[18.09] Update gitignore to ignore more files
2018-08-22 10:05:12 -07:00
f57c2cbfc8 Update gitignore to ignore more files
We're messing with git porcelain checks

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-22 17:01:28 +00:00
85c21a40b5 Merge pull request #545 from andrewhsu/new
[18.09] update new 18.09 branch
2018-08-21 22:25:49 -07:00
83021751fa update for new 18.09 branch
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-08-22 05:23:08 +00:00
b02cbd3734 Bump version to 18.09.0-ce-rc1
Signed-off-by: GordonTheTurtle <engine-team@docker.com>
2018-08-22 05:03:35 +00:00
8880c3ba4f Merge branch 'master' of github.com:docker/docker-ce 2018-08-22 05:01:10 +00:00
deaac15230 Merge component 'engine' from git@github.com:docker/engine master 2018-08-22 05:01:00 +00:00
aa9377e7ab Merge component 'engine' from git@github.com:docker/engine master 2018-08-22 04:57:57 +00:00
b1b684bc76 Merge pull request #37691 from tiborvass/tmp-disable-bridge
builder: temporarily disable bridge networking when using buildkit
Upstream-commit: 3ba4f9b2212d617057f0fe570aa8481b65d5b276
Component: engine
2018-08-21 20:41:57 -07:00
ebad0ccbe4 builder: temporarily disable bridge networking when using buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 16084ea8c82fe3b3a0aae2573def0d1857365408
Component: engine
2018-08-22 03:29:17 +00:00
b9ccf0e1c6 Merge pull request #37688 from tiborvass/features-not-flat
Fix logic when enabling buildkit
Upstream-commit: ef50da44b30dd041896cfc6be45b777e10cc1d75
Component: engine
2018-08-21 18:56:41 -07:00
6c90f5dd52 Merge component 'cli' from git@github.com:docker/cli master 2018-08-22 00:14:18 +00:00
a610952c4f Merge pull request #1303 from thaJeztah/remove_buildkit_experimental_annotations
Remove "experimental" annotations for buildkit
Upstream-commit: 08cf36daa6
Component: cli
2018-08-22 00:57:27 +01:00
65b88273a4 Merge pull request #37684 from thaJeztah/add_remote_api_warning
Add warning if REST API is accessible through an insecure connection
Upstream-commit: 1cc3deebc40733fb6dcd98fbb5412399dc764876
Component: engine
2018-08-21 16:52:37 -07:00
ed97b30d09 Fix logic when enabling buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c973cde7606dc7a2557094fc90d8e6bb595fa354
Component: engine
2018-08-21 23:49:08 +00:00
821e8ae86c Merge pull request #37686 from andrewhsu/bk-no-ex
remove experimental guard for buildkit
Upstream-commit: 9972a826c81630ed6136a198586ae4a36c6f9dfe
Component: engine
2018-08-21 16:43:46 -07:00
ab4d7a2303 Move "session" support out of experimental for API 1.39 and up
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a500c394df
Component: cli
2018-08-22 00:51:19 +02:00
2594f77b01 move /session api endpoint out of experimental
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 01c9e7082eba71cbe60ce2e47acb9aad2c83c7ef
Component: engine
2018-08-21 22:43:34 +00:00
ab525d6a99 Remove "experimental" annotations for buildkit
BuildKit can now be enabled without the daemon having
experimental features enabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 60c75fda67
Component: cli
2018-08-22 00:38:59 +02:00
cea4607c21 remove experimental guard for buildkit
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 239047c2d36706f2826b0a9bc115e0a08b1c3d27
Component: engine
2018-08-21 22:19:45 +00:00
c0b7cd4ffb Merge pull request #37636 from thaJeztah/add_swarm_label_tests
Add unit test for swarm labels on containers
Upstream-commit: 3bd1e7b59b0bf4ee4e581e1d27c49aee7987f1f1
Component: engine
2018-08-21 23:02:46 +01:00
e5f0e2d12d Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-08-21 21:03:58 +00:00
fc316c8fb4 Merge pull request #1225 from thaJeztah/told_you_so_I_wont_warn_you_again
Use warnings provided by daemon
Upstream-commit: ca782599fb
Component: cli
2018-08-21 13:42:16 -07:00
0528c321e1 Merge component 'cli' from git@github.com:docker/cli master 2018-08-21 20:36:57 +00:00
d6a674adf4 Use warnings provided by daemon
Warnings are now generated by the daemon, and returned as
part of the /info API response.

If warnings are returned by the daemon; use those instead
of generating them locally.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3c27ce21c9
Component: cli
2018-08-21 22:29:57 +02:00
5c668597be bump docker/docker
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7da71329bc
Component: cli
2018-08-21 22:29:43 +02:00
7469deec1a Add warning if REST API is accessible through an insecure connection
The remote API allows full privilege escalation and is equivalent to
having root access on the host. Because of this, the API should never
be accessible through an insecure connection (TCP without TLS, or TCP
without TLS  verification).

Although a warning is already logged on startup if the daemon uses an
insecure configuration, this warning is not very visible (unless someone
decides to read the logs).

This patch attempts to make insecure configuration more visible by sending
back warnings through the API (which will be printed when using `docker info`).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 547b993e07330f3e74cba935975fce05e8661381
Component: engine
2018-08-21 22:03:24 +02:00
e421ac528c Merge pull request #1233 from selansen/default_addr_pool
Global Default Address Pool feature support
Upstream-commit: e97d004395
Component: cli
2018-08-21 14:55:24 -04:00
534b83a7cb Global Default Address Pool feature support
This feature brings new attribute/option for swarm init command.
default-addr-pool will take string input which can be in below format.
"CIDR,CIDR,CIDR...:SUBNET-SIZE".
Signed-off-by: selansen <elango.siva@docker.com>
Upstream-commit: 587a94c935
Component: cli
2018-08-21 14:34:00 -04:00
bd24fd7ae6 Merge pull request #148 from dhiltgen/license_message
Set up default product license for community engines
Upstream-commit: 7195f2116059c01b3a4cc4314c345510d04a2feb
Component: packaging
2018-08-21 11:15:36 -07:00
a16152031b Merge pull request #151 from docker/develop
Merging the develop changes into master
Upstream-commit: a119f42ef86517dc79e0b3749acdb457a63dea6d
Component: packaging
2018-08-21 11:15:07 -07:00
f9e3c69ec9 Merge component 'engine' from git@github.com:docker/engine master 2018-08-21 13:02:40 +00:00
ab69f491e3 Merge pull request #37502 from thaJeztah/you_have_been_warned
Add "Warnings" to /info endpoint, and move detection to the daemon
Upstream-commit: 2629fe93266e82751af4f1c7568e21060f065b73
Component: engine
2018-08-21 10:37:27 +01:00
07c22f44e1 Add "Warnings" to /info endpoint, and move detection to the daemon
When requesting information about the daemon's configuration through the `/info`
endpoint, missing features (or non-recommended settings) may have to be presented
to the user.

Detecting these situations, and printing warnings currently is handled by the
cli, which results in some complications:

- duplicated effort: each client has to re-implement detection and warnings.
- it's not possible to generate warnings for reasons outside of the information
  returned in the `/info` response.
- cli-side detection has to be updated for new conditions. This means that an
  older cli connecting to a new daemon may not print all warnings (due to
  it not detecting the new conditions)
- some warnings (in particular, warnings about storage-drivers) depend on
  driver-status (`DriverStatus`) information. The format of the information
  returned in this field is not part of the API specification and can change
  over time, resulting in cli-side detection no longer being functional.

This patch adds a new `Warnings` field to the `/info` response. This field is
to return warnings to be presented by the user.

Existing warnings that are currently handled by the CLI are copied to the daemon
as part of this patch; This change is backward-compatible with existing
clients; old client can continue to use the client-side warnings, whereas new
clients can skip client-side detection, and print warnings that are returned by
the daemon.

Example response with this patch applied;

```bash
curl --unix-socket /var/run/docker.sock http://localhost/info | jq .Warnings
```

```json
[
  "WARNING: bridge-nf-call-iptables is disabled",
  "WARNING: bridge-nf-call-ip6tables is disabled"
]
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a3d4238b9ce653d2863fbc93057ed4162a83221e
Component: engine
2018-08-21 11:36:15 +02:00
6fd76fec3f Merge pull request #37679 from Microsoft/jjh/disable-rs5-failing-test
Disable TestExecWindowsOpenHandles on RS5 temporarily
Upstream-commit: 969adfc647f54a9aa1fc3f8a0c6541111cfcaf84
Component: engine
2018-08-21 11:35:47 +02:00
0aeba9b7ad Merge component 'engine' from git@github.com:docker/engine master 2018-08-21 05:02:44 +00:00
3736c7fe0e Disable TestExecWindowsOpenHandles on RS5 temporarily
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 15a25f6eb94d0f033045fadc3b8beedcb32e426f
Component: engine
2018-08-20 19:48:20 -07:00
e4dc477de6 Merge pull request #37558 from selansen/master
Global Default Address Pool feature support
Upstream-commit: 1800883bd16664846db1572b8c8fbe8c85892cee
Component: engine
2018-08-20 18:15:44 -07:00
438b026631 Merge pull request #37604 from dperny/task-wait-for-attachments
Block task starting until node attachments are ready
Upstream-commit: 9d71a574fe0197434b543d77332597c722129c1b
Component: engine
2018-08-20 18:14:44 -07:00
9a4c2433fd Merge component 'engine' from git@github.com:docker/engine master 2018-08-21 01:02:44 +00:00
bf1cdbb0f9 Merge component 'cli' from git@github.com:docker/cli master 2018-08-21 00:36:49 +00:00
06c4880d2c Set up default product license for community engines
This will report a fixed string for community engines
Upstream-commit: 140dd867085cbe97947a64353fe245b858284172
Component: packaging
2018-08-20 16:41:23 -07:00
a459cbb061 Merge pull request #1275 from AntaresS/buildkit-support
[enhancement] enable buildkit from daemon side
Upstream-commit: 2461cd618d
Component: cli
2018-08-20 16:15:32 -07:00
17cb083800 vendor dependency
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: acf43b62b5
Component: cli
2018-08-20 15:32:25 -07:00
10e40bd154 Merge component 'engine' from git@github.com:docker/engine master 2018-08-20 22:19:44 +00:00
3569cbf496 Merge pull request #37620 from tonistiigi/buildkit-net-modes
buildkit: enable net modes and bridge
Upstream-commit: cf72051c3746fa60d7e7995c0342eaca91f07bfd
Component: engine
2018-08-20 14:56:24 -07:00
4bfe96dbc6 Merge component 'cli' from git@github.com:docker/cli master 2018-08-20 21:53:07 +00:00
6536c488a2 Merge pull request #150 from seemethere/require
Set containerd to be a systemd bind for docker
Upstream-commit: 710ecfcf0992363047d1f9bf57be20b7459ae0c7
Component: packaging
2018-08-20 14:31:22 -07:00
dbc4cb6ea0 Set containerd to be a systemd bind for docker
The daemon won't actually start without containerd

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 16037618282dc5076089c7b749cdd07376650f8d
Component: packaging
2018-08-20 21:17:32 +00:00
524fe098d4 Merge pull request #37675 from cpuguy83/unused_logging_code
Remove now unused multireader.
Upstream-commit: 715aa064ade3576b778f0f71ba43829ba625bf69
Component: engine
2018-08-20 22:12:38 +01:00
e44dbe9123 Block task starting until node attachments are ready
Blocks the execution of tasks during the Prepare phase until there
exists an IP address for every overlay network in use by the task. This
prevents a task from starting before the NetworkAttachment containing
the IP address has been sent down to the node.

Includes a basic test for the correct use case.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 3c81dc3103d9c88cb333c80e0810f80ab80c374e
Component: engine
2018-08-20 15:28:15 -05:00
ca4ed4129e Merge pull request #149 from seemethere/offline_engine
Do offline bundles for engine installs
Upstream-commit: 99edae9143f8189a75aab661536c995d46c55231
Component: packaging
2018-08-20 13:23:00 -07:00
b3c9a88509 Do offline bundles for engine installs
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: fe03039776edbc90053b510ae6e72657340b1ccb
Component: packaging
2018-08-20 20:08:07 +00:00
c9c36cf7eb Global Default Address Pool feature support
This feature allows user to specify list of subnets for global
default address pool. User can configure subnet list using
'swarm init' command. Daemon passes the information to swarmkit.
We validate the information in swarmkit, then store it in cluster
object. when IPAM init is called, we pass subnet list to IPAM driver.

Signed-off-by: selansen <elango.siva@docker.com>
Upstream-commit: f7ad95cab9cc7ba8925673a933028d53284c13f5
Component: engine
2018-08-20 15:07:08 -04:00
01ffacab2e enable buildkit as builder from daemon; no env var needs to be set
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: ef09ca8987
Component: cli
2018-08-20 11:59:39 -07:00
0f3d3cb192 Disable buildkit's subreaper until the issue is understood
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 4a40f921d3c73b056271bad128f9da7d90b1cd2a
Component: engine
2018-08-20 18:55:01 +00:00
0a604d1631 builder: enable add-host for buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d46fa93cb637e7de964769717f3b5770f6732bee
Component: engine
2018-08-20 18:55:01 +00:00
4020288a72 builder: allow setting host/none network mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c6c680ad5b1e4d17faaebc753e1123d8662ad297
Component: engine
2018-08-20 18:55:01 +00:00
3214172ab1 builder: setup code for a bridge networking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d6424a088dacc902b674f402e6a62aa8f5f4a803
Component: engine
2018-08-20 18:55:01 +00:00
560eea56b4 vendor: update buildkit to 46f9075a
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: bc67a7886273ad8cc270e9c6792c787e0cf7745e
Component: engine
2018-08-20 18:54:10 +00:00
ebd369251b Merge pull request #37593 from AntaresS/add-enable-buildkit
[enhancement] add optional fields in daemon.json to enable buildkit
Upstream-commit: 991682749612d6613d5f49035f62e2a479c0dc59
Component: engine
2018-08-20 19:41:56 +01:00
6eb2284e77 Merge pull request #1302 from andrewhsu/venbk
vndr buildkit, containerd, console
Upstream-commit: 466e1b0741
Component: cli
2018-08-20 11:10:46 -07:00
aab5441f89 vndr buildkit, containerd, and console
vndr buildkit to e8c7acc
vndr containerd to v1.2.0-beta.0
vndr console to 4d8a41f

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 7a73d112ff
Component: cli
2018-08-20 17:59:40 +00:00
66cdb5a200 Merge pull request #1260 from dhiltgen/ce_q3
Add CLI support for running dockerd in a container on containerd
Upstream-commit: 0c444c521f
Component: cli
2018-08-20 13:39:49 -04:00
f36591e04d Remove now unused multireader.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5da8bc2e5b4f19d2201f8642cbb3663a7cc70c8a
Component: engine
2018-08-20 09:42:19 -07:00
f4a7b44342 Add engine commands built on containerd
This new collection of commands supports initializing a local
engine using containerd, updating that engine, and activating
the EE product

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: fd2f1b3b66
Component: cli
2018-08-20 09:42:05 -07:00
18e4f23013 Vendoring bump for containerd and licensing
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 11a312118f
Component: cli
2018-08-20 09:42:05 -07:00
d59e776158 Merge pull request #147 from seemethere/c
Make ENGINE_IMAGE configurable for dockerd.json
Upstream-commit: 411a80222b89308419e138708cc2cfc7442721b7
Component: packaging
2018-08-20 08:08:55 -07:00
3f276a5ee3 Make ENGINE_IMAGE configurable for dockerd.json
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 657c7899302691373836bbd28fc4c069da64d90e
Component: packaging
2018-08-20 14:59:56 +00:00
22c23f16cc Merge component 'engine' from git@github.com:docker/engine master 2018-08-20 13:03:43 +00:00
a019105186 Merge component 'cli' from git@github.com:docker/cli master 2018-08-20 08:36:51 +00:00
38b4ba8a68 Merge pull request #1300 from mmacy/1299-trust-inspect-typo
Fix 'trust inspect' typo: "AdminstrativeKeys"
Upstream-commit: 3f7c6c8200
Component: cli
2018-08-20 10:08:45 +02:00
d2993cf016 Merge pull request #37092 from cpuguy83/local_logger
Add "local" log driver
Upstream-commit: e0ad6d045c752e0523d8591b235ec2db32bc71fc
Component: engine
2018-08-20 07:01:41 +01:00
b81518c06e [WIP] fix trust inspect typo 'AdminstrativeKeys'
Signed-off-by: mmacy <marsma@microsoft.com>
Upstream-commit: c11acddfb5
Component: cli
2018-08-19 17:57:04 -07:00
3d82540b92 Merge component 'cli' from git@github.com:docker/cli master 2018-08-20 00:36:37 +00:00
02ca9d77c5 add optional fields in daemon.json to enable buildkit
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 2be17666b4cf21995da3e4ddf4ed615e6e6ca63a
Component: engine
2018-08-19 14:58:23 -07:00
a5d51f25eb Merge pull request #1297 from tiborvass/tls-update
vendor: update tlsconfig in go-connections to 7395e3f8aa162843a74ed6d48e79627d9792ac55
Upstream-commit: 5706f9518a
Component: cli
2018-08-19 14:46:46 -07:00
740a46a7d4 Merge component 'engine' from git@github.com:docker/engine master 2018-08-19 01:02:41 +00:00
6e4bcc873b Merge pull request #146 from seemethere/configurable
Make IMAGE_TAG configurable for dockerd.json
Upstream-commit: e344a52260c8774a3de2a648d8b055e83d27b6f7
Component: packaging
2018-08-18 14:50:04 -07:00
a59390fe70 Remove s390x for now
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 660431eec07bb7a934c483bb2355b9f121fb98e2
Component: packaging
2018-08-18 21:49:50 +00:00
d0741cffba Make IMAGE_TAG configurable for dockerd.json
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: aabd5d3b852b3b3f7131cdd622a9e5078f193819
Component: packaging
2018-08-18 21:27:35 +00:00
a50883aec2 Merge pull request #37664 from dmcgowan/vendor-containerd-1.2
Update containerd vendor to 1.2 beta
Upstream-commit: 7d4fa69e33e64cf637d6fb3a0130e8aa3cc83072
Component: engine
2018-08-18 22:22:41 +01:00
036d053ead Merge component 'cli' from git@github.com:docker/cli master 2018-08-18 04:36:55 +00:00
1b348ba107 Merge pull request #1296 from tiborvass/build-progress-flag-no-api-requirement
build: Remove API requirement for --progress as it is CLI only
Upstream-commit: f472a1a480
Component: cli
2018-08-17 18:31:25 -07:00
e3c0a7e0f8 Merge pull request #1295 from tiborvass/cmd-builder-prune-no-options
builder: Implement `builder prune` to prune build cache
Upstream-commit: b3d8c5deda
Component: cli
2018-08-17 18:28:37 -07:00
edcfdbb75b Merge component 'engine' from git@github.com:docker/engine master 2018-08-18 01:02:44 +00:00
8701fc500f Expose license status in Info (#37612)
* Expose license status in Info

This wires up a new field in the Info payload that exposes the license.
For moby this is hardcoded to always report a community edition.
Downstream enterprise dockerd will have additional licensing logic wired
into this function to report details about the current license status.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>

* Code review comments

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>

* Add windows autogen support

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 896d1b1c61a48e2df1a7b4644ddde6ee97db6111
Component: engine
2018-08-17 17:05:21 -07:00
dc90119f4b Merge pull request #37659 from Microsoft/jjh/37356
LCOW: Mount to short container paths to avoid command-line length limit
Upstream-commit: 8613b34a7e363948555eb986fd6078d9f9c808d7
Component: engine
2018-08-17 15:48:35 -07:00
0500a90795 Merge pull request #145 from seemethere/rpm_override
Make the build variables eval at reference
Upstream-commit: 303a2454cdee1ba71caad664a1861e3386b01592
Component: packaging
2018-08-17 14:39:38 -07:00
82d8af2891 Make the build variables eval at reference
Makes it so that you can overwrite them better if you include this
makefile in another makefile...

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 446f8d31394ae35fc38187aa5e40627b33a95a27
Component: packaging
2018-08-17 21:22:05 +00:00
1551262dc8 Merge component 'engine' from git@github.com:docker/engine master 2018-08-17 21:02:05 +00:00
eacc99c223 Merge pull request #144 from seemethere/resilience
Make the curl for containerd-proxy more resilient
Upstream-commit: 9e0c559930ad836e8926e1766bead587d9c6fa5b
Component: packaging
2018-08-17 13:42:42 -07:00
26a46ac890 Make the curl for containerd-proxy more resilient
Was reporting 404's using the old url for some reason, might have to
refactor this in the future to just use a git clone...

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 763ad6aa7ac24c269dc1dfa223771671acffc8fc
Component: packaging
2018-08-17 20:25:50 +00:00
0d4c43ea08 Update containerd vendor to 1.2 beta
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 98e23f2a8ef5703861eb98bf78c0354f2ece8c0f
Component: engine
2018-08-17 13:08:22 -07:00
851fdda625 Merge pull request #37563 from Microsoft/jjh/fix-vso17531561v2
LCOW: Ensure platform is populated on COPY/ADD
Upstream-commit: 14d5569f1942d22e364dc4844198b58e702299fc
Component: engine
2018-08-17 12:51:17 -07:00
aa6259f758 Merge pull request #143 from seemethere/configurability_plz
Merged with https://github.com/seemethere/unir
Upstream-commit: c2de74bb370d514115888d5626c6649b079166d1
Component: packaging
2018-08-17 18:40:56 +00:00
126bb1b3a0 Add some changes to make things more configurable
Allows us to switch out debian files and rpm specs on the fly and also
gives us an out to have ARCH specific dockerfiles if we need them for
RPM's. The same strategy can be used for DEB's if need be

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: b72dc2edb8329151bfe2df6989fb329f41e720fb
Component: packaging
2018-08-17 18:33:02 +00:00
98e7273292 Merge pull request #35521 from salah-khan/35507
Add --chown flag support for ADD/COPY commands for Windows
Upstream-commit: b3e9f7b13b0f0c414fa6253e1f17a86b2cff68b5
Component: engine
2018-08-17 11:31:16 -07:00
5a2db4495f vendor: update tlsconfig in go-connections to 7395e3f8aa162843a74ed6d48e79627d9792ac55
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 8ae74b38d5
Component: cli
2018-08-17 17:53:22 +00:00
f8aa818e3b Merge pull request #37613 from tiborvass/buildkit-pull
builder: implement PullParent option with buildkit
Upstream-commit: ba5c92f1bf78d884bcca1b8a4443bdf0f09fb0e6
Component: engine
2018-08-17 18:17:06 +01:00
6fd88edfc3 Merge component 'cli' from git@github.com:docker/cli master 2018-08-17 16:36:57 +00:00
e5b37c1dc8 Add new local log driver
This driver uses protobuf to store log messages and has better defaults
for log file handling (e.g. compression and file rotation enabled by
default).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a351b38e7217af059eb2f8fc3dba14dc03836a45
Component: engine
2018-08-17 09:36:56 -07:00
6144be607e build: Remove API requirement for --progress as it is CLI only
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 50f918801f
Component: cli
2018-08-17 16:24:02 +00:00
8c8e199673 Merge pull request #1288 from tiborvass/build-secrets
Build --secret with buildkit
Upstream-commit: cb142fa49f
Component: cli
2018-08-17 17:20:32 +01:00
fefaefabba vendor: Bump default API version to 1.39
vendors github.com/docker/docker to a7ff19d69a90dfe152abd146221c8b9b46a0903d

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b4057f0293
Component: cli
2018-08-17 15:52:11 +00:00
e4ceae5ee2 Add new builder subcommand and implement builder prune to prune build cache.
This patch adds a new builder subcommand, allowing to add more builder-related
commands in the future. Unfortunately `build` expects an argument so could not
be used as a subcommand.

This also implements `docker builder prune`, which is needed to prune the builder
cache manually without having to call `docker system prune`.

Today when relying on the legacy builder, users are able to prune dangling images
(used as build cache) by running `docker image prune`. This patch allows the
same usecase with buildkit.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f597f2d026
Component: cli
2018-08-17 15:18:18 +00:00
a75ae7bafa build: implement build secrets with buildkit
This patch implements `docker build --secret id=mysecret,src=/secret/file`
for buildkit frontends that request the mysecret secret.

It is currently implemented in the tonistiigi/dockerfile:secrets20180808
frontend via RUN --mount=type=secret,id=mysecret

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c4c4825591
Component: cli
2018-08-17 14:01:32 +00:00
084c64a455 Merge component 'engine' from git@github.com:docker/engine master 2018-08-17 13:03:18 +00:00
b6f5424fe0 Merge pull request #37660 from andrewhsu/go-con
vndr go-connections to v0.4.0
Upstream-commit: a7ff19d69a90dfe152abd146221c8b9b46a0903d
Component: engine
2018-08-17 10:58:01 +02:00
fbda033233 builder: implement PullParent option with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 7c1c8f1fe29c28ef62017d99a99eb1ec6be4513c
Component: engine
2018-08-17 08:40:58 +00:00
2db873cf38 LCOW: Capture stderr on external process. Log actual error rather than throwaway
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dffc96616503936fc282c0e3a3eea8695ee11b67
Component: engine
2018-08-16 19:20:14 -07:00
cef8826091 LCOW: Mount to short container paths to avoid command-line length limit
Signed-off-by: John Howard <jhoward@microsoft.com>

Fixes #36764

@johnstep PTAL. @jterry75 FYI.

There are two commits in this PR. The first ensure that errors are actually returned to the caller - it was being thrown away.

The second commit changes the LCOW driver to map, on a per service VM basis, "long" container paths such as `/tmp/c8fa0ae1b348f505df2707060f6a49e63280d71b83b7936935c827e2e9bde16d` to much shorter paths, based on a per-service VM counter, so something more like /tmp/d3. This means that the root cause of the failure where the mount call to create the overlay was failing due to command line length becomes something much shorter such as below.

`mount -t overlay overlay -olowerdir=/tmp/d3:/tmp/d4:/tmp/d5:/tmp/d6:/tmp/d7:/tmp/d8:/tmp/d9:/tmp/d10:/tmp/d11:/tmp/d12:/tmp/d13:/tmp/d14:/tmp/d15:/tmp/d16:/tmp/d17:/tmp/d18:/tmp/d19:/tmp/d20:/tmp/d21:/tmp/d22:/tmp/d23:/tmp/d24:/tmp/d25:/tmp/d26:/tmp/d27:/tmp/d28:/tmp/d29:/tmp/d30:/tmp/d31:/tmp/d32:/tmp/d33:/tmp/d34:/tmp/d35:/tmp/d36:/tmp/d37:/tmp/d38:/tmp/d39:/tmp/d40:/tmp/d41:/tmp/d42:/tmp/d43:/tmp/d44:/tmp/d45:/tmp/d46:/tmp/d47:/tmp/d48:/tmp/d49:/tmp/d50:/tmp/d51:/tmp/d52:/tmp/d53:/tmp/d54:/tmp/d55:/tmp/d56:/tmp/d57:/tmp/d58:/tmp/d59:/tmp/d60:/tmp/d61:/tmp/d62,upperdir=/tmp/d2/upper,workdir=/tmp/d2/work /tmp/c8fa0ae1b348f505df2707060f6a49e63280d71b83b7936935c827e2e9bde16d-mount`

For those worrying about overflow (which I'm sure @thaJeztah will mention...): It's safe to use a counter here as SVMs are disposable in the default configuration. The exception is when running the daemon in unsafe LCOW "global" mode (ie `--storage-opt lcow.globalmode=1`) where the SVMs aren't disposed of, but a single one is reused. However, to overflow the command line length, it would require several hundred-thousand trillion (conservative, I should sit down and work it out accurately if I get -really- bored) of SCSI hot-add operations, and even to hit that would be hard as just running containers normally uses the VPMEM path for the containers UVM, not to the global SVM on SCSI. It gets incremented by one per build step (commit more accurately) as a general rule. Hence it would be necessary to have to be doing automated builds without restarting the daemon for literally years on end in unsafe mode. 😇

Note that in reality, the previous limit of ~47 layers before hitting the command line length limit is close to what is possible in the platform, at least as of RS5/Windows Server 2019 where, in the HCS v1 schema, a single SCSI controller is used, and that can only support 64 disks per controller per the Hyper-V VDEV. And remember we have one slot taken up for the SVMs scratch, and another for the containers scratch when committing a layer. So the best you can architecturally get on the platform is around the following (it's also different by 1 depending on whether in unsafe or default mode)

```
PS E:\docker\build\36764\short> docker build --no-cache .
Sending build context to Docker daemon  2.048kB
Step 1/4 : FROM alpine as first
 ---> 11cd0b38bc3c
Step 2/4 : RUN echo test > /test
 ---> Running in 8ddfe20e5bfb
Removing intermediate container 8ddfe20e5bfb
 ---> b0103a00b1c9
Step 3/4 : FROM alpine
 ---> 11cd0b38bc3c
Step 4/4 : COPY --from=first /test /test
 ---> 54bfae391eba
Successfully built 54bfae391eba
PS E:\docker\build\36764\short> cd ..
PS E:\docker\build\36764> docker build --no-cache .
Sending build context to Docker daemon  4.689MB
Step 1/61 : FROM alpine as first
 ---> 11cd0b38bc3c
Step 2/61 : RUN echo test > /test
 ---> Running in 02597ff870db
Removing intermediate container 02597ff870db
 ---> 3096de6fc454
Step 3/61 : RUN echo test > /test
 ---> Running in 9a8110f4ff19
Removing intermediate container 9a8110f4ff19
 ---> 7691808cf28e
Step 4/61 : RUN echo test > /test
 ---> Running in 9afb8f51510b
Removing intermediate container 9afb8f51510b
 ---> e42a0df2bb1c
Step 5/61 : RUN echo test > /test
 ---> Running in fe977ed6804e
Removing intermediate container fe977ed6804e
 ---> 55850c9b0479
Step 6/61 : RUN echo test > /test
 ---> Running in be65cbfad172
Removing intermediate container be65cbfad172
 ---> 0cf8acba70f0
Step 7/61 : RUN echo test > /test
 ---> Running in fd5b0907b6a9
Removing intermediate container fd5b0907b6a9
 ---> 257a4493d85d
Step 8/61 : RUN echo test > /test
 ---> Running in f7ca0ffd9076
Removing intermediate container f7ca0ffd9076
 ---> 3baa6f4fa2d5
Step 9/61 : RUN echo test > /test
 ---> Running in 5146814d4727
Removing intermediate container 5146814d4727
 ---> 485b9d5cf228
Step 10/61 : RUN echo test > /test
 ---> Running in a090eec1b743
Removing intermediate container a090eec1b743
 ---> a7eb10155b51
Step 11/61 : RUN echo test > /test
 ---> Running in 942660b288df
Removing intermediate container 942660b288df
 ---> 9d286a1e2133
Step 12/61 : RUN echo test > /test
 ---> Running in c3d369aa91df
Removing intermediate container c3d369aa91df
 ---> f78be4788992
Step 13/61 : RUN echo test > /test
 ---> Running in a03c3ac6888f
Removing intermediate container a03c3ac6888f
 ---> 6504363f61ab
Step 14/61 : RUN echo test > /test
 ---> Running in 0c3c2fca3f90
Removing intermediate container 0c3c2fca3f90
 ---> fe3448b8bb29
Step 15/61 : RUN echo test > /test
 ---> Running in 828d51c76d3b
Removing intermediate container 828d51c76d3b
 ---> 870684e3aea0
Step 16/61 : RUN echo test > /test
 ---> Running in 59a2f7c5f3ad
Removing intermediate container 59a2f7c5f3ad
 ---> cf84556ca5c0
Step 17/61 : RUN echo test > /test
 ---> Running in bfb4e088eeb3
Removing intermediate container bfb4e088eeb3
 ---> 9c8f9f652cef
Step 18/61 : RUN echo test > /test
 ---> Running in f1b88bb5a2d7
Removing intermediate container f1b88bb5a2d7
 ---> a6233ad21648
Step 19/61 : RUN echo test > /test
 ---> Running in 45f70577d709
Removing intermediate container 45f70577d709
 ---> 1b5cc52d370d
Step 20/61 : RUN echo test > /test
 ---> Running in 2ce231d5043d
Removing intermediate container 2ce231d5043d
 ---> 4a0e17cbebaa
Step 21/61 : RUN echo test > /test
 ---> Running in 52e4b0928f1f
Removing intermediate container 52e4b0928f1f
 ---> 99b50e989bcb
Step 22/61 : RUN echo test > /test
 ---> Running in f7ba3da7460d
Removing intermediate container f7ba3da7460d
 ---> bfa3cad88285
Step 23/61 : RUN echo test > /test
 ---> Running in 60180bf60f88
Removing intermediate container 60180bf60f88
 ---> fe7271988bcb
Step 24/61 : RUN echo test > /test
 ---> Running in 20324d396531
Removing intermediate container 20324d396531
 ---> e930bc039128
Step 25/61 : RUN echo test > /test
 ---> Running in b3ac70fd4404
Removing intermediate container b3ac70fd4404
 ---> 39d0a11ea6d8
Step 26/61 : RUN echo test > /test
 ---> Running in 0193267d3787
Removing intermediate container 0193267d3787
 ---> 8062d7aab0a5
Step 27/61 : RUN echo test > /test
 ---> Running in f41f45fb7985
Removing intermediate container f41f45fb7985
 ---> 1f5f18f2315b
Step 28/61 : RUN echo test > /test
 ---> Running in 90dd09c63d6e
Removing intermediate container 90dd09c63d6e
 ---> 02f0a1141f11
Step 29/61 : RUN echo test > /test
 ---> Running in c557e5386e0a
Removing intermediate container c557e5386e0a
 ---> dbcd6fb1f6f4
Step 30/61 : RUN echo test > /test
 ---> Running in 65369385d855
Removing intermediate container 65369385d855
 ---> e6e9058a0650
Step 31/61 : RUN echo test > /test
 ---> Running in d861fcc388fd
Removing intermediate container d861fcc388fd
 ---> 6e4c2c0f741f
Step 32/61 : RUN echo test > /test
 ---> Running in 1483962b7e1c
Removing intermediate container 1483962b7e1c
 ---> cf8f142aa055
Step 33/61 : RUN echo test > /test
 ---> Running in 5868934816c1
Removing intermediate container 5868934816c1
 ---> d5ff87cdc204
Step 34/61 : RUN echo test > /test
 ---> Running in e057f3201f3a
Removing intermediate container e057f3201f3a
 ---> b4031b7ab4ac
Step 35/61 : RUN echo test > /test
 ---> Running in 22b769b9079c
Removing intermediate container 22b769b9079c
 ---> 019d898510b6
Step 36/61 : RUN echo test > /test
 ---> Running in f1d364ef4ff8
Removing intermediate container f1d364ef4ff8
 ---> 9525cafdf04d
Step 37/61 : RUN echo test > /test
 ---> Running in 5bf505b8bdcc
Removing intermediate container 5bf505b8bdcc
 ---> cd5002b33bfd
Step 38/61 : RUN echo test > /test
 ---> Running in be24a921945c
Removing intermediate container be24a921945c
 ---> 8675db44d1b7
Step 39/61 : RUN echo test > /test
 ---> Running in 352dc6beef3d
Removing intermediate container 352dc6beef3d
 ---> 0ab0ece43c71
Step 40/61 : RUN echo test > /test
 ---> Running in eebde33e5d9b
Removing intermediate container eebde33e5d9b
 ---> 46ca4b0dfc03
Step 41/61 : RUN echo test > /test
 ---> Running in f920313a1e85
Removing intermediate container f920313a1e85
 ---> 7f3888414d58
Step 42/61 : RUN echo test > /test
 ---> Running in 10e2f4dc1ac7
Removing intermediate container 10e2f4dc1ac7
 ---> 14db9e15f2dc
Step 43/61 : RUN echo test > /test
 ---> Running in c849d6e89aa5
Removing intermediate container c849d6e89aa5
 ---> fdb770494dd6
Step 44/61 : RUN echo test > /test
 ---> Running in 419d1a8353db
Removing intermediate container 419d1a8353db
 ---> d12e9cf078be
Step 45/61 : RUN echo test > /test
 ---> Running in 0f1805263e4c
Removing intermediate container 0f1805263e4c
 ---> cd005e7b08a4
Step 46/61 : RUN echo test > /test
 ---> Running in 5bde05b46441
Removing intermediate container 5bde05b46441
 ---> 05aa426a3d4a
Step 47/61 : RUN echo test > /test
 ---> Running in 01ebc84bd1bc
Removing intermediate container 01ebc84bd1bc
 ---> 35d371fa4342
Step 48/61 : RUN echo test > /test
 ---> Running in 49f6c2f51dd4
Removing intermediate container 49f6c2f51dd4
 ---> 1090b5dfa130
Step 49/61 : RUN echo test > /test
 ---> Running in f8a9089cd725
Removing intermediate container f8a9089cd725
 ---> b2d0eec0716d
Step 50/61 : RUN echo test > /test
 ---> Running in a1697a0b2db0
Removing intermediate container a1697a0b2db0
 ---> 10d96ac8f497
Step 51/61 : RUN echo test > /test
 ---> Running in 33a2332c06eb
Removing intermediate container 33a2332c06eb
 ---> ba5bf5609c1c
Step 52/61 : RUN echo test > /test
 ---> Running in e8920392be0d
Removing intermediate container e8920392be0d
 ---> 5b3a95685c7e
Step 53/61 : RUN echo test > /test
 ---> Running in 4b9298587c65
Removing intermediate container 4b9298587c65
 ---> d4961a349141
Step 54/61 : RUN echo test > /test
 ---> Running in 8a0c960c2ba1
Removing intermediate container 8a0c960c2ba1
 ---> b413197fcfa2
Step 55/61 : RUN echo test > /test
 ---> Running in 536ee3b9596b
Removing intermediate container 536ee3b9596b
 ---> fc16b69b224a
Step 56/61 : RUN echo test > /test
 ---> Running in 8b817b8d7b59
Removing intermediate container 8b817b8d7b59
 ---> 2f0896400ff9
Step 57/61 : RUN echo test > /test
 ---> Running in ab0ed79ec3d4
Removing intermediate container ab0ed79ec3d4
 ---> b4fb420e736c
Step 58/61 : RUN echo test > /test
 ---> Running in 8548d7eead1f
Removing intermediate container 8548d7eead1f
 ---> 745103fd5a38
Step 59/61 : RUN echo test > /test
 ---> Running in 1980559ad5d6
Removing intermediate container 1980559ad5d6
 ---> 08c1c74a5618
Step 60/61 : FROM alpine
 ---> 11cd0b38bc3c
Step 61/61 : COPY --from=first /test /test
 ---> 67f053c66c27
Successfully built 67f053c66c27
PS E:\docker\build\36764>
```

Note also that subsequent error messages once you go beyond current platform limitations kind of suck (such as insufficient resources with a bunch of spew which is incomprehensible to most) and we could do better to detect this earlier in the daemon. That'll be for a (reasonably low-priority) follow-up though as and when I have time. Theoretically we *may*, if the platform doesn't require additional changes for RS5, be able to have bigger platform limits using the v2 schema with up to 127 VPMem devices, and the possibility to have multiple SCSI controllers per SVM/UVM. However, currently LCOW is using HCS v1 schema calls, and there's no plans to rewrite the graphdriver/libcontainerd components outside of the moving LCOW fully over to the containerd runtime/snapshotter using HCS v2 schema, which is still some time off fruition.

PS OK, while waiting for a full run to complete, I did get bored. Turns out it won't overflow line length as max(uint64) is 18446744073709551616 which would still be short enough at 127 layers, double the current platform limit. And I could always change it to hex or base36 to make it even shorter, or remove the 'd' from /tmp/dN. IOW, pretty sure no-one is going to hit the limit even if we could get the platform to 256 which is the current Hyper-V SCSI limit per VM (4x64), although PMEM at 127 would be the next immediate limit.
Upstream-commit: f586fe5637bbadd919ce4a126c6d95e4f3b1523b
Component: engine
2018-08-16 19:18:55 -07:00
acb98b01dc Merge component 'engine' from git@github.com:docker/engine master 2018-08-17 01:02:58 +00:00
ce5c73493b Merge pull request #142 from seemethere/remove_rpm_arch
Remove arch specific dockerfiles for RPM building
Upstream-commit: 0d23632daafbdbf93bba0005bc8b595582e88f00
Component: packaging
2018-08-16 16:59:22 -07:00
9df43900d6 Remove arch specific dockerfiles
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 0fd20b90cd322f0eeb06440833ba119b26f44d05
Component: packaging
2018-08-16 23:50:31 +00:00
dfe2d66f01 vndr go-connections to v0.4.0
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 626c097f8c29bf432e5465a961496bf41aa74cad
Component: engine
2018-08-16 23:46:53 +00:00
6fee85f2ef Merge pull request #141 from seemethere/fix_xenial
Build this on xenial instead
Upstream-commit: fbc1757b6cf0084c4ae399b2893f7188ad693107
Component: packaging
2018-08-16 16:35:52 -07:00
cfdb136fbd Build this on xenial instead
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 587c5995b3283f49410fc8bb89f9d7dad67a6ab7
Component: packaging
2018-08-16 23:23:36 +00:00
1cdc07f84f Merge pull request #140 from seemethere/deb_new
Merged with https://github.com/seemethere/unir
Upstream-commit: ecfdd4c83e0cf1640fd0a6e03ceb7a292be4acca
Component: packaging
2018-08-16 23:09:24 +00:00
c60644846d Merge pull request #37657 from thaJeztah/bump_api_v1.39
Swagger: bump API version to v1.39
Upstream-commit: b6242da4ee29d7692dec32a5e00fd50b7c886d75
Component: engine
2018-08-16 15:51:52 -07:00
d0d5b8bd04 Do not conflict with docker-ee-cli
docker-ee-cli will obsolete docker-ce-cli

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: e6e563fc93f86bc17a61858ac755e74af1691081
Component: packaging
2018-08-16 22:50:16 +00:00
d9d726eb2b Intial deb package split for 18.09.x
Get's rid of architecture specific dockerfiles (yay manifest lists),
also follows very closely to what the RPM makefile does with the
sources.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: ab1ba336ad1720a166e8ed4469c616851d89a8d1
Component: packaging
2018-08-16 22:39:37 +00:00
564cbe9f35 Merge component 'engine' from git@github.com:docker/engine master 2018-08-16 21:00:55 +00:00
00eadcc8c5 Merge pull request #131 from seemethere/rpm_new
Merged with https://github.com/seemethere/unir
Upstream-commit: 6944fe6659317d20343947e22f71f24eb129ed30
Component: packaging
2018-08-16 18:37:48 +00:00
05cae6be4e Merge component 'engine' from git@github.com:docker/engine master 2018-08-16 17:02:54 +00:00
9dae42985b Merge pull request #37149 from dmcgowan/split-libcontainerd
libcontainerd: split client and daemon supervision
Upstream-commit: 4d6219264655bbb4510642e40d7914fd56962596
Component: engine
2018-08-16 19:00:10 +02:00
088a8059a2 Swagger: bump API version to v1.39
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 871894e95e62be58a2b7e6037590e0235072f1bb
Component: engine
2018-08-16 16:24:48 +02:00
adf79edc07 Merge pull request #37472 from thaJeztah/no_unknown
Do not return "<unknown>" in /info response
Upstream-commit: 0a4f89566a22a07427d850a8d70f264210062da0
Component: engine
2018-08-16 14:56:31 +02:00
a635bc1d4a Merge component 'engine' from git@github.com:docker/engine master 2018-08-16 09:01:01 +00:00
3baa6424ff Merge pull request #37592 from kolyshkin/no-go-version-env
hack/make.ps1: don't rely on GO_VERSION
Upstream-commit: b1ba744a24d09dc853aef970985fa03452084e06
Component: engine
2018-08-16 09:22:55 +02:00
9f84af0b04 Merge component 'engine' from git@github.com:docker/engine master 2018-08-16 05:01:14 +00:00
dddebc37ad Merge component 'cli' from git@github.com:docker/cli master 2018-08-16 04:36:35 +00:00
cbac77a8f2 Some changes to get this working on CentOS 7
Old versions of things on CentOS 7 strike again!

infinity is not a thing for TimeoutSec on systemd < 229

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 86dafe5391e2ef298248536cd038e27230a4df63
Component: packaging
2018-08-16 04:03:40 +00:00
aecdb056f0 Merge pull request #1276 from tiborvass/buildkit-progress-flag
build: change --console=[auto,false,true] to --progress=[auto,plain,tty]
Upstream-commit: 964173997d
Component: cli
2018-08-15 20:42:47 -07:00
2418c55ad0 Merge pull request #37597 from tiborvass/fix-cancel-bug
builder: do not cancel buildkit status request
Upstream-commit: 080c27dd1374d9be2e3e53bcffe62d7bb3ec0a3b
Component: engine
2018-08-16 12:42:35 +09:00
3606edfdc9 Merge component 'engine' from git@github.com:docker/engine master 2018-08-16 01:01:30 +00:00
4b8490a8fe Improve containerd detection, don't rely on root
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 2134ee524ecf6a96c99a518652b4ec65680abc34
Component: packaging
2018-08-16 00:10:04 +00:00
588ae61588 Merge pull request #37600 from edrevo/conemu-fix
Fix #28814: use emulation for ConEmu and ConsoleZ
Upstream-commit: 74c43af1a3ba70a044971679c91c283ecf2b34df
Component: engine
2018-08-15 16:50:05 -07:00
4670e93b92 Revive pre / post steps, update offline location
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 558cd9c4bb28a11fe1ff3da45a4efd19265d7ce5
Component: packaging
2018-08-15 23:17:54 +00:00
cbb6da8c29 Update to use a base golang image instead of curl
Why didn't we do this the whole time? `¯\_(ツ)_/¯`

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: df2a0d6fc5a59a7a8b352689238eddf5a46d3ed4
Component: packaging
2018-08-15 23:12:28 +00:00
4a4db9a651 Round out systemd for RPM packaging
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: f99ffa4b5ef8c85fa5fbeb8fdc95403f9a02ceaf
Component: packaging
2018-08-15 23:01:10 +00:00
bc6836aa1b Merge component 'engine' from git@github.com:docker/engine master 2018-08-15 21:02:36 +00:00
b8b3a2fa72 Merge pull request #37640 from dhiltgen/bump_api_version
Bump API version to 1.39
Upstream-commit: bf3d6a50137d1b7ded440634cec65f894f952a29
Component: engine
2018-08-15 11:57:04 -07:00
6a77a79235 hack/make.ps1: don't use ENV GO_VERSION
Modify hack/make.ps1 to use the version value used in
"FROM golang" statement.

While at it:
 1. Make search expression a bit more strict (use ^ to match at BOL only).
 2. Simplify by removing Get-Contents as Select-String can read files.

After this, ENV GO_VERSION can be removed from Dockerfile.
Unfortunately it can't be done in one commit as Windows CI
fails (presumably because Dockerfile is being modified in
place).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 6a2851332d5f86bb61a69d277f663f369377037b
Component: engine
2018-08-15 12:16:39 +03:00
c114e9c465 Merge component 'cli' from git@github.com:docker/cli master 2018-08-15 00:07:01 +00:00
0b9441c0bb Bump API version to 1.39
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e05b657120a665a54715d3999cd18ae9a3f8d711
Component: engine
2018-08-15 00:01:30 +00:00
a46d6924fa Merge pull request #1014 from AkihiroSuda/connhelper-sshonly
support SSH connection
Upstream-commit: e92614a175
Component: cli
2018-08-14 15:12:06 -07:00
2b0a9fe44a Merge component 'cli' from git@github.com:docker/cli master 2018-08-14 20:36:50 +00:00
03fa2aa531 Add systemd files, add containerd-proxy config
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 481c39539b723230a258f02e3d33d3baed03d2ce
Component: packaging
2018-08-14 20:30:22 +00:00
74209bb90a Remove rpmlint checks, add BuildRequires
rpmlint checks can be re-added later

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c245ce12c1e0a092ef21094b287b8cb94a51ee1e
Component: packaging
2018-08-14 17:27:32 +00:00
e37773a24d Merge component 'engine' from git@github.com:docker/engine master 2018-08-14 17:02:40 +00:00
d8d0aaab1d Merge pull request #1284 from adshmh/refactor-stack-ps-tests
refactor stack ps tests 
Upstream-commit: 4d4392ba04
Component: cli
2018-08-14 18:59:56 +02:00
1f463af629 Add containerd-shim-process installation
Also split off containerd.mk into it's own thing since most of this
stuff will be re-used with debian packaging anyways.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 5513629a1b4868d82a41249eac634edbff51e315
Component: packaging
2018-08-14 16:50:27 +00:00
4db1f97e23 Add containerd-proxy building
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: ca519bb1194b6ab673b5ade7861f220cac949ec6
Component: packaging
2018-08-14 16:50:27 +00:00
2645463a17 Remove engine-$(ARCH).tar dependency for now
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 111b5babb924137df28c233ac40c23f7553a39da
Component: packaging
2018-08-14 16:50:27 +00:00
9e2e0e95d9 Add RPM package building for docker-ce-cli
Splits out the docker-ce package and docker-ce-cli package into their
own things.

Still TODO: need to have a cleanup on the dependencies for the
Dockerfiles

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 2a27fb1dad0f91c25acb885c117563a33f6c5e88
Component: packaging
2018-08-14 16:50:27 +00:00
788de7687c Merge pull request #139 from andrewhsu/multi
Merged with https://github.com/seemethere/unir
Upstream-commit: e5c3bb43d2d20f1a9e5a3443c1c6be748b7f571c
Component: packaging
2018-08-14 16:43:54 +00:00
1eafd46aad Merge pull request #37412 from AzureCR/naduggar/logissue
Select polling based watcher for docker log file watcher on Windows
Upstream-commit: 678d4b3a6d4cd7824d26592090b4dec507ce4bc2
Component: engine
2018-08-14 14:40:44 +02:00
0de052caee Merge pull request #37635 from kolyshkin/test-logs
integration-cli: error logging improvements
Upstream-commit: 3c5eac362884bb60f9c7778966559d04b44cfb6a
Component: engine
2018-08-14 14:38:34 +02:00
94eb6513c1 Add unit test for swarm labels on containers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6f8d17dad3cf29c2ff2d019204c68227ebadfcc8
Component: engine
2018-08-14 12:31:53 +02:00
0b5da3a767 integration-cli: error report improvements
1. After running d.Cmd(), in case an error is returned, it makes sense
to print command output, as its stderr may contain a clue about what
went wrong. This is by no means complete, just as far as I could go.

2. In case the comment in c.Assert is a constant string, it's better
to provide it as a comment which will be printed.

3. An arbitrary string should not be passed on to a function expecting
%-style formatting. Use %s to fix this.

4. Print the output string before transformation, not after.

5. Unify the output format (drop "out:" prefix").

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ac038eab298eeecab55a62440de302e3bb3f4889
Component: engine
2018-08-14 12:52:30 +03:00
fe821da2fd integration: use %s for check.Commentf()
It is wrong to pass an arbitrary string to a function expecting
%-style formatting. One solution would be to replace any % with %%,
but it's easier to just do what this patch does.

Generated with:

for f in $(git grep -l 'check.Commentf(out)'); do \
	sed -i -e 's/check\.Commentf(out)/check.Commentf("%s", out)/g' $f; \
done

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 83363fb2d4d97d952a0052d079faa8ae39aa20b6
Component: engine
2018-08-14 10:45:39 +03:00
7414934b6c Add ADD/COPY --chown flag support to Windows
This implements chown support on Windows. Built-in accounts as well
as accounts included in the SAM database of the container are supported.

NOTE: IDPair is now named Identity and IDMappings is now named
IdentityMapping.

The following are valid examples:
ADD --chown=Guest . <some directory>
COPY --chown=Administrator . <some directory>
COPY --chown=Guests . <some directory>
COPY --chown=ContainerUser . <some directory>

On Windows an owner is only granted the permission to read the security
descriptor and read/write the discretionary access control list. This
fix also grants read/write and execute permissions to the owner.

Signed-off-by: Salahuddin Khan <salah@docker.com>
Upstream-commit: 763d8392612942ff5c32a35f8bdafd7ae93d3321
Component: engine
2018-08-13 21:59:11 -07:00
945372fa23 Merge pull request #137 from seemethere/scratch
Merged with https://github.com/seemethere/unir
Upstream-commit: e1e487b7de1138d3abf965c505dc6af0c213e86b
Component: packaging
2018-08-13 22:19:10 +00:00
b04c87dc5b Merge component 'engine' from git@github.com:docker/engine master 2018-08-13 05:01:54 +00:00
96af87df0a Merge pull request #37443 from Projjol/new_names
Add in two new names for names-generator
Upstream-commit: 1fd7e4c28d3a4a21c3540f03a045f96a4190b527
Component: engine
2018-08-12 19:04:56 -07:00
5b9122fbe9 refactor fedora-28 Dockerfile for multi-stage
Also moved package deps into spec file BuildRequires. Had to hard-code
Epoch in spec file in order to realize deps with yum-builddep.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 07f46e8e96692c511c04f29fbc78c2aa9592e479
Component: packaging
2018-08-12 07:54:44 +00:00
1bf6cebb40 refactor fedora-27 Dockerfile for multi-stage
Also moved package deps into spec file BuildRequires. Had to hard-code
Epoch in spec file in order to realize deps with yum-builddep.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: b09bb012dd220e822aa6e90ef20d9cb83ccada8b
Component: packaging
2018-08-12 07:54:44 +00:00
26c6ae9770 refactor centos-7 Dockerfile for multi-stage
Also moved package deps into spec file BuildRequires. Had to hard-code
Epoch in spec file in order to realize deps with yum-builddep.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 784a53cec5061e6a718acc3a7104c61215c15078
Component: packaging
2018-08-12 07:54:44 +00:00
b290116fb4 hardcode epoch so yum-builddep will work
Looks like yum-builddep will only work if rpmlint passed on the spec
file and the spec file errors out on Epoch not being hardcoded.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 42b49f6556022ecba47801f4639ddbc7864c9fe0
Component: packaging
2018-08-12 07:48:14 +00:00
4ae3a83348 DISABLE_WARN_OUTSIDE_CONTAINER when building RPMs
This will save time waiting for timeout to expire.
Upstream-commit: 11a6221a830d7ffc3291e5b8749e364b18e07626
Component: packaging
2018-08-12 07:42:50 +00:00
feccebcffe Decouple logfile from tailfile.
This makes it so consumers of `LogFile` should pass in how to get an
io.Reader to the requested number of lines to tail.

This is also much more efficient when tailing a large number of lines.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 94a10150f64a24793216f5324a34e62be3f31a2d
Component: engine
2018-08-10 21:02:19 -07:00
2835149d80 Add func to get an io.Reader for tail operations
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 874867d4e575ef805d71759e703e4f11cce05bd3
Component: engine
2018-08-10 21:01:15 -07:00
be5744ef79 Add partial log metadata to log driver proto
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e78ec2aab69068074038ee01bc89b75254a044b7
Component: engine
2018-08-10 20:44:30 -07:00
f395016eaa Change runc compilation to static
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 1cd96d5f686b389920ba01d0b230d7c29148e8ba
Component: packaging
2018-08-10 21:33:59 +00:00
79bec603a6 Merge pull request #138 from jose-bigio/fix_Makefile_var
Merged with https://github.com/seemethere/unir
Upstream-commit: d7f8fe075d4bd078afbd71e5d29c2f2a3dae4ce7
Component: packaging
2018-08-10 20:19:28 +00:00
1f4ebac506 Fix static version variable
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 507c9f84ccc3f83c978aeefa2f0377ed0c14c3b8
Component: packaging
2018-08-10 13:12:48 -07:00
0b69793ee3 refactor stack ps tests to table-driven
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 340e4ee8e5
Component: cli
2018-08-10 15:13:45 -04:00
16b520e100 builder: do not cancel buildkit status request
This fixes a bug when the build results in an error and instead of sending
the logs of the container to the client, it signals a cancelation.

The context should not be wired to the status request, as only the
build requests need to be canceled.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f1ef16c736b477be17f6bc1bce18d0958a87d840
Component: engine
2018-08-10 17:29:32 +00:00
31a1aed04a Change final image to be a scratch image
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 08c4ef675e42077a7407143f5e94d53b198b1a0f
Component: packaging
2018-08-10 16:53:25 +00:00
af7228d929 Merge component 'cli' from git@github.com:docker/cli master 2018-08-10 12:36:59 +00:00
70a91dd01b Merge pull request #1283 from adshmh/refactor-trust-revoke-tests
refactor trust revoke command unit tests
Upstream-commit: 3a3e720f91
Component: cli
2018-08-10 11:03:58 +02:00
e3e25812ec Merge pull request #1280 from adshmh/refactor-trust-inspect-tests
refactor trust inspect command unit tests
Upstream-commit: 560b0cd863
Component: cli
2018-08-10 10:37:53 +02:00
ea09ac3378 refactored trust revoke command unit tests to use table-driven style
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 984d76b9dd
Component: cli
2018-08-09 15:58:54 -04:00
f68f53a53c Merge component 'cli' from git@github.com:docker/cli master 2018-08-09 16:36:51 +00:00
e2e1350a4c Merge pull request #1266 from adshmh/use-natural-sort-order-for-network-list
use sortorder library for sorting network list output
Upstream-commit: 6ef11c516d
Component: cli
2018-08-09 12:05:55 +02:00
ea9e6f1a60 Merge component 'engine' from git@github.com:docker/engine master 2018-08-09 01:03:02 +00:00
b552588bbc Merge pull request #37609 from seratch/fix-typos
Fix the several typos detected by github.com/client9/misspell
Upstream-commit: 4122eb1a43a42c4c8b827b4d0fb3d6543f9f2c91
Component: engine
2018-08-09 08:48:05 +09:00
2cb7dab3fc Merge component 'engine' from git@github.com:docker/engine master 2018-08-08 21:00:38 +00:00
71cb67c2af Merge pull request #37582 from andrewhsu/bk
vndr containerd to a88b631, buildkit to e57eed4, and fsutil to b19464c
Upstream-commit: a3e78ca0c6a1a20c5ffeeaa51e3e0b4ff623a464
Component: engine
2018-08-08 10:55:19 -07:00
64bf68b122 refactor trust inspect command unit tests to table-driven style
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: f8f0d72cf9
Component: cli
2018-08-08 13:50:00 -04:00
7435e1c862 use sortorder lib for sorting the output of volume list command
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 5cc1f9006a
Component: cli
2018-08-08 12:20:21 -04:00
73b3c56c30 use sortorder lib for sorting in trust package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 04bb3c770f
Component: cli
2018-08-08 12:20:10 -04:00
21c2c41660 use sortorder lib for sorting network list output
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: a921313caf
Component: cli
2018-08-08 12:06:59 -04:00
71a3e53c36 Fix the several typos detected by github.com/client9/misspell
Signed-off-by: Kazuhiro Sera <seratch@gmail.com>
Upstream-commit: 1e49fdcafc6601cd9dd5c46551ee283baa0272ef
Component: engine
2018-08-09 00:45:00 +09:00
ae672e2b0e Merge pull request #135 from jose-bigio/top_level_make
Merged with https://github.com/seemethere/unir
Upstream-commit: 0b376627615b15ea2a17b5c97bd7b975b910ea10
Component: packaging
2018-08-07 21:52:06 +00:00
7c303cf2e5 Add top level make target
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 9bb08342efcf1d9e69cbeca9b820309c9622bef5
Component: packaging
2018-08-07 14:28:11 -07:00
2f9ebb742f Merge pull request #134 from jose-bigio/make_image_tars
Add tar targets for engine image
Upstream-commit: d645291be026da9e2aab9906e0d0918d0799c3f3
Component: packaging
2018-08-07 13:47:31 -07:00
13fe238674 Add extra dollar in Makefile/image
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 65a9bb677ebffccb2d5d1002c3e1bdd4dd46d76c
Component: packaging
2018-08-07 13:22:53 -07:00
3570421f62 Remove shell directive so target will work
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 93fcc8443b504c94beaef697ec6f27748b40d656
Component: packaging
2018-08-07 13:21:18 -07:00
d72fa21d55 Add tar targets for engine image
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 2ffde00d61af1074e100ca0c725dbd4f685299a1
Component: packaging
2018-08-07 13:06:47 -07:00
9e965fad85 build: change --console=[auto,false,true] to --progress=[auto,plain,tty]
This changes the experimental --console flag to --progress following
feedback indicating avoidable confusion.

In addition to naming changes, the help output now has an additional
clarification, specifically: container output during builds are only
shown when progress output is set to plain. Not mentioning this was also
a big cause of confusion.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: faeb8bb571
Component: cli
2018-08-07 18:18:13 +00:00
0510b8b031 Merge pull request #133 from jose-bigio/fix_clean
Merged with https://github.com/seemethere/unir
Upstream-commit: 35f96bda01dd7df034a42f606f6aa46a7352e9fc
Component: packaging
2018-08-07 18:07:14 +00:00
5c8dc24b07 Don't delete the engine when cleaning
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 16e6737bf2976e83c4c140c95ae69d04905d150f
Component: packaging
2018-08-07 10:22:58 -07:00
5f75afe983 Merge branch 'master' of github.com:docker/docker-ce 2018-08-07 17:03:38 +00:00
53e0010b72 Merge component 'cli' from git@github.com:docker/cli master 2018-08-07 16:37:00 +00:00
ad843ef36b Merge component 'cli' from git@github.com:docker/cli master 2018-08-07 16:32:36 +00:00
d098202034 Merge pull request #1277 from vdemeester/template-subtests-followup
Migrate `TestExtractVariables` to subtests…
Upstream-commit: 1d04f7d66b
Component: cli
2018-08-07 16:30:11 +02:00
68e01b8ab7 Migrate TestExtractVariables to subtests…
… as suggested in previous PR comment.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9cd7c1361c
Component: cli
2018-08-07 16:06:13 +02:00
a18736f217 Fix #28814
Signed-off-by: Ximo Guanter Gonzálbez <joaquin.guantergonzalbez@telefonica.com>
Upstream-commit: ea65a0b1349b532e9d10d63835c751d291a7c0f4
Component: engine
2018-08-07 10:20:13 +02:00
a3a5617ab6 builder: fix compilation errors after vendoring
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c53d7e71046581775a8888706c0fd6baddb81a0b
Component: engine
2018-08-07 06:03:10 +00:00
7133d76b99 Merge pull request #130 from dhiltgen/revamp_packages
Merged with https://github.com/seemethere/unir
Upstream-commit: a3231d16bd2b7f7a21f9686514617e76bb65cf41
Component: packaging
2018-08-06 18:28:39 +00:00
084e7423dc libcontainerd: split client and supervisor
Adds a supervisor package for starting and monitoring containerd.
Separates grpc connection allowing access from daemon.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: dd2e19ebd58cd8896d79b4b8db61144b93717b33
Component: engine
2018-08-06 10:23:04 -07:00
426d022fb6 Merge pull request #129 from jose-bigio/build_manifest_images
Merged with https://github.com/seemethere/unir
Upstream-commit: 840f3a247d472ce692f1652da60d380613b0298f
Component: packaging
2018-08-06 16:51:23 +00:00
77d0975ce7 Merge component 'engine' from git@github.com:docker/engine master 2018-08-05 17:02:36 +00:00
c811febb3c Merge pull request #37586 from thaJeztah/bump_swarmkit
Bump SwarmKit to 8852e8840e30d69db0b39a4a3d6447362e17c64f
Upstream-commit: f57f260b49b6142366e6bc1274204ee0a1205945
Component: engine
2018-08-05 09:11:58 -07:00
7e95203d7f Merge component 'engine' from git@github.com:docker/engine master 2018-08-04 01:01:42 +00:00
4706b6f33a Merge component 'cli' from git@github.com:docker/cli master 2018-08-04 00:36:35 +00:00
c213d85ec3 Merge pull request #1271 from albers/completion-shellcheck
Fix shellcheck warnings
Upstream-commit: b5768bea9b
Component: cli
2018-08-04 01:36:36 +02:00
46906a5687 Build docker image with engine binary on multiple arches
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
Upstream-commit: 2dfaf0dd0fa7b7a7aef76d1254b2b48dc04d0211
Component: packaging
2018-08-03 16:32:19 -07:00
6d14e4f6a2 Merge pull request #1269 from albers/completion-cp--archive
Add bash completion for `cp --archive`
Upstream-commit: e8cd06c8eb
Component: cli
2018-08-03 23:48:52 +02:00
22b9c5ed2c Merge pull request #1270 from Ace-Tang/master
bash completion: fix uncorrect completion
Upstream-commit: ad28cec012
Component: cli
2018-08-03 23:26:09 +02:00
baf9cf6d1a Merge pull request #37583 from Microsoft/jjh.37562
Don't invoke HCS shutdown if terminate called; removes unused vars and no-op calls
Upstream-commit: eeea12db7a65e6ad633747e49928c80b0f18d86b
Component: engine
2018-08-03 22:05:06 +02:00
a972373b51 Bump SwarmKit to 8852e8840e30d69db0b39a4a3d6447362e17c64f
Relevant changes;

- swarmkit #2593 agent: return error when failing to apply network key
- swarmkit #2645 Replace deprecated grpc functions
- swarmkit #2720 Test if error is nil before to log it
- swarmkit #2712 [orchestrator] Fix task sorting
- swarmkit #2677 [manager/orchestrator/reaper] Fix the condition used for skipping over running tasks

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 660fa129c0ea09c1aa1770b5f2d26ec762213484
Component: engine
2018-08-03 18:55:53 +02:00
73443cfafe Fix shellcheck warnings
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e587ec293b
Component: cli
2018-08-03 15:28:09 +02:00
1dfbd7519a bash completion: fix uncorrect completion
fix uncorrect completion for command
docker docker <tab>

Signed-off-by: Ace-Tang <aceapril@126.com>
Upstream-commit: 7b4e2f3145
Component: cli
2018-08-03 21:27:27 +08:00
13b26eee62 Add bash completion for cp --archive
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b9b3754ad3
Component: cli
2018-08-03 14:30:30 +02:00
d2ad7723be Address review comments on PR #128
Upstream-commit: 0cd6b38d6dbf77a661030303e5cfeb7b26f60d82
Component: packaging
2018-08-02 16:53:29 -07:00
295ddc5339 Don't invoke HCS shutdown if terminate called
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5cfededc7ca552260f8eb7319184437a816e480d
Component: engine
2018-08-02 16:29:37 -07:00
0185509c33 Merge pull request #128 from dhiltgen/revamp_packages
Merged with https://github.com/seemethere/unir
Upstream-commit: 8756f9830c465471b449ec6b2096d069409a2947
Component: packaging
2018-08-02 22:57:00 +00:00
851e1e2005 Merge component 'cli' from git@github.com:docker/cli master 2018-08-02 20:36:49 +00:00
f92453678a Merge pull request #1259 from adshmh/add-unit-test-to-cover-network-list-sort
Add unit test to cover network list sort, refactor to table-driven tests
Upstream-commit: e902ae9f84
Component: cli
2018-08-02 20:28:53 +02:00
4658043fcf vndr buildkit to e57eed4 and fsutil to b19464c
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 67da8c84b66a79261032478637b26c5baa3908b4
Component: engine
2018-08-02 18:19:13 +00:00
115f23480e refactor network list unit tests to table-driven style
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 021bf39d76
Component: cli
2018-08-02 14:07:06 -04:00
d4fe2b6044 add unit test to cover the sort order of network list command
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 4f388ffca3
Component: cli
2018-08-02 14:07:06 -04:00
cd93f23d9c Merge component 'engine' from git@github.com:docker/engine master 2018-08-02 17:02:15 +00:00
7bd15e7b10 CE package conversion
This splits out the CLI into a discrete package and removes
the engine from the engine package.  Instead the engine
is initialized via a post-inst script using the new CLI UX.
Upstream-commit: 662e248f680eb49a9951a8b34125506b8f82dfed
Component: packaging
2018-08-02 10:01:06 -07:00
1ae49cf365 Merge component 'cli' from git@github.com:docker/cli master 2018-08-02 16:36:50 +00:00
a727cc8ee8 Merge pull request #1262 from vdemeester/allow-custom-pattern
Allow custom pattern when extracting variable…
Upstream-commit: ff1a34d9a9
Component: cli
2018-08-02 18:00:38 +02:00
c1168064aa Merge pull request #1254 from albers/completion-kubernetes
Add bash completion for kubernetes orchestrator
Upstream-commit: 731b4f1fb4
Component: cli
2018-08-02 17:30:31 +02:00
4cbdb398d7 Allow custom pattern when extracting variable…
… as it is possible to do it when interpolating. It also fixes when
there is 2 variables on the same *value* (in the composefile, on the
same line)

Finaly, renaming the default, used in cli, pattern to `defaultPattern`
to not be shadowed unintentionally.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4c87725c35
Component: cli
2018-08-02 16:50:40 +02:00
e08a81b044 Merge pull request #37541 from yongtang/07282018-ipc-container
Migrate some ipc container test from integration-cli to integration
Upstream-commit: 75fe41444009947d319f76e68b5e1f2124c79b4d
Component: engine
2018-08-02 15:51:25 +02:00
f2b2ca3774 Merge component 'cli' from git@github.com:docker/cli master 2018-08-02 12:36:56 +00:00
841a592280 Add bash completion for kubernetes orchestrator
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 08f8ee1320
Component: cli
2018-08-02 13:54:31 +02:00
907c1bdfa8 Only complete swarm specific options with orchestrator=swarm
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8ef01e869e
Component: cli
2018-08-02 13:54:31 +02:00
19734fb410 Add support for orchestrator specific bash completions
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ff953751d3
Component: cli
2018-08-02 13:54:31 +02:00
5f6d6806ac Merge pull request #1251 from silvin-lubecki/fix-stack-help-command
Fix help message flags on docker stack commands and sub-commands
Upstream-commit: 4fbb009d39
Component: cli
2018-08-02 13:10:36 +02:00
4a36f11243 support SSH connection
e.g. docker -H ssh://me@server

The `docker` CLI also needs to be installed on the remote host to
provide `docker system dial-stdio`, which proxies the daemon socket to stdio.

Please refer to docs/reference/commandline/dockerd.md .

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 6f61cf053a
Component: cli
2018-08-02 13:10:06 +09:00
66b7137cbd Merge component 'engine' from git@github.com:docker/engine master 2018-08-02 01:02:21 +00:00
a055aa9d40 Migrate some ipc container test from integration-cli to integration
This fix migrates some ipc container tests from integration-cli
to integration test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 80c92c9b692b79273200b6e37f14a6d4e984ab8d
Component: engine
2018-08-01 21:51:45 +00:00
f4ebc73a60 Merge pull request #37465 from Russtopia/master
namesgenerator: new adjective, two inspiring Computing Science authors
Upstream-commit: 09f5e9dae3b83ee9eaa09b8097134d5d4251fce8
Component: engine
2018-08-01 23:50:05 +02:00
6e92e59096 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-08-01 21:04:19 +00:00
ff8bdfb5f9 Merge component 'engine' from git@github.com:docker/engine master 2018-08-01 21:04:10 +00:00
1e5cba450a Merge pull request #37489 from poizan42/fix-mips-no-pie
-buildmode=pie is not supported on Linux on MIPS either
Upstream-commit: 724c5f317e0aabb3fb95933e5dd95ab9d71b5cdb
Component: engine
2018-08-01 10:39:55 -07:00
7359851606 Merge pull request #126 from dhiltgen/image_build
Merged with https://github.com/seemethere/unir
Upstream-commit: 1aa29931980e51171a57cae931de9cd17966dbb0
Component: packaging
2018-08-01 17:28:21 +00:00
c8b3283839 Merge component 'cli' from git@github.com:docker/cli master 2018-08-01 16:36:51 +00:00
ed3a613040 Merge pull request #1258 from wyckster/patch-2
Fixed wrong apostrophe character
Upstream-commit: 261ff66d61
Component: cli
2018-08-01 18:09:36 +02:00
691f30bc72 Fixed wrong apostrophe character
Changed unexpected Unicode character 0x1fbf GREEK PSILI that was standing in as an imposter for an apostrophe:  an _impostrophe_.

Signed-off-by: Chad Faragher <wyckster@hotmail.com>
Upstream-commit: b59823c784
Component: cli
2018-08-01 11:06:07 -04:00
f232ca8480 Switch image name on hub
For the Q3 release the names will be refined slightly, and "ce" will no
longer be used - it's now just the docker engine, with "community" or
"enterprise" at the end if disambiguation is needed.
Upstream-commit: e69e4ea4997e468d20d93247ba19cd5e86daf24f
Component: packaging
2018-08-01 08:03:20 -07:00
52c1a41d81 Merge pull request #1249 from vdemeester/compose-template-pkg-enhancement
Add a new `ExtractVariables` function to `compose/template` package
Upstream-commit: da544e8938
Component: cli
2018-08-01 16:18:46 +02:00
0bdf126d62 Add a new ExtractVariables function to compose/template package
It allows to get easily all the variables defined in a
composefile (the `map[string]interface{}` representation that
`loader.ParseYAML` returns at least) and their default value too.

This commit also does some small function extract on substitution
funcs to reduce a tiny bit duplication.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: afb87e42f2
Component: cli
2018-08-01 16:12:49 +02:00
6951f936e1 Merge pull request #1256 from silvin-lubecki/update-reviewers
Remove outdated completion reviewers file
Upstream-commit: 2093fd6e52
Component: cli
2018-08-01 15:19:36 +02:00
d180792961 Remove outdated completion reviewers file
Clean maintainers and code owners files

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 9022a00fbe
Component: cli
2018-08-01 15:08:36 +02:00
b6bdcc10a5 Merge pull request #37485 from fcrisciani/resolv
Systemd-resolved proper handling
Upstream-commit: e1584514c15f6ad91b9ef5bc530a1eef46f18267
Component: engine
2018-08-01 14:52:33 +02:00
1e6a95f11f Merge pull request #37522 from vdemeester/bump-some-deps
Bump a bunch of dependencies to more recent versions
Upstream-commit: 1dfcf4fe77e47d740939271aea516e11b5f9bcba
Component: engine
2018-08-01 13:45:30 +02:00
5483ae0078 Merge pull request #37573 from thaJeztah/windows-rs3-ci
Temporarily disable failing tests on Windows RS3
Upstream-commit: 27f663a2532bb1b4c7fc375f8597d08064ce1890
Component: engine
2018-08-01 12:16:12 +02:00
14dcb25448 Bump a bunch of dependencies to more recent versions
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b0d108aa6ba4a52db1dd2bba0fd512903ab725ca
Component: engine
2018-08-01 10:37:27 +02:00
546812f824 Merge pull request #37438 from adshmh/fix-flaky-test-TestRunContainerWithBridgeNone
fix the race condition in the integration test TestRunContainerWithBridgeNone
Upstream-commit: 9149ef67be8ac945d68fafb16a1aa4ccb2f72249
Component: engine
2018-08-01 09:57:29 +02:00
ba693dc4c7 Fix help message flags on docker stack commands and sub-commands
PersistentPreRunE needs to be called within the help function to initialize all the flags (notably the orchestrator flag)
Add an e2e test as regression test

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 21cce52b30
Component: cli
2018-08-01 01:48:27 +02:00
ef87b4e0a0 Temporarily disable failing tests on Windows RS3
Signed-off-by: John Stephens <johnstep@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1b05ea472703ddc47ec5052bc031fc23e60356c4
Component: engine
2018-07-31 23:49:36 +02:00
ba6994fe02 Merge component 'cli' from git@github.com:docker/cli master 2018-07-31 20:37:42 +00:00
42c10fc02b Merge pull request #1215 from albers/completion-service-logs-options
Add bash completion for `service logs --details|--raw`
Upstream-commit: 08f5f52cdc
Component: cli
2018-07-31 22:25:36 +02:00
97d44663f5 Added additional scientists for balance per names-generator.go policy
Signed-off-by: Russ Magee <rmagee@gmail.com>
Upstream-commit: 72a5e621e574aae8d374559867bf8a5c17d2387b
Component: engine
2018-07-31 11:34:56 -07:00
f13fff9319 Merge pull request #1246 from vdemeester/bump-mergo
Bump mergo to v0.3.6
Upstream-commit: 24b7effa30
Component: cli
2018-07-31 10:59:41 -07:00
de583a8acb Merge pull request #36630 from AkihiroSuda/hijack-dialer
client: add WithDialContext() and client.Dialer()
Upstream-commit: 562df8c2d6f48601c8d1df7256389569d25c0bf1
Component: engine
2018-07-31 10:49:27 -07:00
038c38eeb6 Merge pull request #37570 from kolyshkin/typpo
loggerutils: fix a typo
Upstream-commit: 62739828d0bdf75b6dfc38e43d9d496c3da3db96
Component: engine
2018-07-31 18:57:18 +02:00
9822d56542 Merge component 'cli' from git@github.com:docker/cli master 2018-07-31 16:36:41 +00:00
99b63333cb Merge pull request #1248 from marcov/add-help-target
Add `help` and remove `watch` targets in docker.Makefile
Upstream-commit: 74071f2347
Component: cli
2018-07-31 16:52:07 +02:00
a8fa741f70 loggerutils: fix a typo
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 2c6fbd864ae089e9cb544666949b8b2d897b3b23
Component: engine
2018-07-31 15:44:46 +03:00
eda72c01e5 Add help and remove watch targets in docker.Makefile
* Add the `help` target to document make targets when building using a
container
* Remove the `watch` target (filewatcher was removed with c0588a9c) from
docker.Makefile and Makefile

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Upstream-commit: 760ca04709
Component: cli
2018-07-31 14:38:51 +02:00
5bd951adc2 Merge component 'cli' from git@github.com:docker/cli master 2018-07-31 12:36:48 +00:00
2514c7af88 Merge pull request #1247 from marcov/make-help
Allow running `make help` without out-of-container warning
Upstream-commit: 7f853fee87
Component: cli
2018-07-31 14:04:10 +02:00
7007293101 Merge pull request #37567 from vdemeester/bump-mergo
Bump mergo to v0.3.6
Upstream-commit: 9cf8feebbf9d94629882a14d77a2b73ce3b14b70
Component: engine
2018-07-31 13:10:13 +02:00
63b2aa93fd -buildmode=pie is not supported on Linux on MIPS either
Signed-off-by: Kasper Fabæch Brandt <poizan@poizan.dk>
Upstream-commit: daba5daf4fc76fe530f093125efe094c2dd93e8c
Component: engine
2018-07-31 13:02:01 +02:00
04c5e8c6df Allow running make help without out-of-container warning
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Upstream-commit: 265dec037b
Component: cli
2018-07-31 10:56:48 +02:00
928dc2de5e Merge component 'cli' from git@github.com:docker/cli master 2018-07-31 08:36:45 +00:00
a87b47f24d Merge pull request #1242 from cyphar/buildmode-pie
build: add -buildmode=pie
Upstream-commit: 40650cfbd5
Component: cli
2018-07-31 10:09:11 +02:00
0f058dae99 Bump mergo to v0.3.6
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a550b0ae475ebbfcffe92d9bf40734f5b3de2f7e
Component: engine
2018-07-31 10:03:43 +02:00
89febef540 Bump mergo to v0.3.6
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1f1507b0a4
Component: cli
2018-07-31 09:57:56 +02:00
1f48874f14 Merge pull request #1244 from vdemeester/expose-compose-transform
Exposes compose `loader.Transform` function…
Upstream-commit: 70d5cb0dd0
Component: cli
2018-07-31 09:43:13 +02:00
7ff97deeb6 Exposes compose loader.Transform function…
This should make it easier for people to write custom composefile
parser without duplicating too much code. It takes the default
transformers and any additional number of transformer for any
types. That way it's possible to transform a `cli/compose` map into a
custom type that would use some of `cli/compose` types and its own.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0246bc1b3b
Component: cli
2018-07-31 09:37:09 +02:00
3e57bf0941 LCOW: Ensure platform is populated on COPY/ADD
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ae6b5828ce0cee380267fb9060695bc3ae40e25b
Component: engine
2018-07-30 12:49:33 -07:00
c19b8d90ba Merge component 'cli' from git@github.com:docker/cli master 2018-07-30 16:36:46 +00:00
a013875ea3 Merge pull request #1230 from vdemeester/update-k8s-and-other-deps
Update k8s and other deps
Upstream-commit: b4e50635a2
Component: cli
2018-07-30 17:49:11 +02:00
499075c042 Merge pull request #1240 from thaJeztah/datapath_addr_api_annotation
Add API-version anotation for --data-path-addr
Upstream-commit: 19653e7fad
Component: cli
2018-07-30 17:47:52 +02:00
d5c619e6c1 Merge pull request #1222 from thaJeztah/its_not_standard_but_its_in
Update --compose-file flag description to mention stdin
Upstream-commit: 6cd0e2fe70
Component: cli
2018-07-30 16:23:29 +02:00
cb923e6307 Re-order vendor.conf alphabeticaly
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fffec04374
Component: cli
2018-07-30 16:14:52 +02:00
2533a526f1 Merge component 'cli' from git@github.com:docker/cli master 2018-07-30 12:36:43 +00:00
fca724f301 Merge pull request #37543 from Snorch/do_not_lose_error_message
Don not lose an error message from d.StartWithError in d.Start
Upstream-commit: 73d73ba9622596b9c405f1ac955474804b286be6
Component: engine
2018-07-30 13:20:01 +02:00
3cb14e951e Merge pull request #37462 from cwgem/37453_slash_prefix_removal
Remove slash prefix when matching name filters (Fixes #37453)
Upstream-commit: 7b46fbc17ab991804126588a8dfd09e54ec5902b
Component: engine
2018-07-30 13:17:40 +02:00
6f7a62be58 Merge pull request #990 from vdemeester/e2e-iddfile-from-moby
Import TestBuildIidFileSquash from moby to cli
Upstream-commit: ed335aba8c
Component: cli
2018-07-30 11:37:36 +02:00
4a40f4d761 build: add -buildmode=pie
Make all dynbinary builds be position-independent (this adds both
security benefits and can help with flaky builds on POWER
architectures).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 164e812b7a
Component: cli
2018-07-30 19:34:01 +10:00
6ec35e4b2d Add API-version anotation for --data-path-addr
This flag was added in Docker 17.06, API version 1.31 through
moby@8dc8cd4719f165c01c98e7d3ce1d6cea6a8f60b8, but didn't add
API-version annotations.

This patch adds the missing annotations to hide this flag if
the CLI is connected to an older version of the daemon that
doesn't support that API.

Before this patch:

    DOCKER_API_VERSION=1.30 docker swarm init --help | grep data-path-addr
          --data-path-addr string           Address or interface to use for data path traffic (format: <ip|interface>)

    DOCKER_API_VERSION=1.31 docker swarm init --help | grep data-path-addr
          --data-path-addr string           Address or interface to use for data path traffic (format: <ip|interface>)

With this patch applied:

    DOCKER_API_VERSION=1.30 docker swarm init --help | grep data-path-addr
    # (no result)

    DOCKER_API_VERSION=1.31 docker swarm init --help | grep data-path-addr
          --data-path-addr string           Address or interface to use for data path traffic (format: <ip|interface>)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 91b1ad9d2b
Component: cli
2018-07-30 11:05:20 +02:00
0cd2e6ef4a Don not lose an error message from d.StartWithError in d.Start
Else it is harder to understand where we've failed in StartWithLogFile

We have an errror:

[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
[d42ce729d0b06] waiting for daemon to start
docker_cli_userns_test.go:27:
    s.d.StartWithBusybox(c, "--userns-remap", "default")
/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:203:
    t.Fatalf("Error starting daemon with arguments: %v", args)
... Error: Error starting daemon with arguments: [--userns-remap default]

[d42ce729d0b06] exiting daemon

Likely it is "[..] Daemon exited during startup" case, but these error
message is lost

Also we lose the error returned by waiting daemon so also add it

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Upstream-commit: 2ed53943f37c26017260759b12d32cfdd75be152
Component: engine
2018-07-30 10:33:03 +02:00
2525e6162b Merge pull request #37542 from kolyshkin/int-msg
integration: fix log message
Upstream-commit: b9bb3bae5161f931c1dede43c67948c599197f50
Component: engine
2018-07-30 10:31:29 +02:00
2d0e7870e2 Merge pull request #37551 from Quasilyte/quasilyte/fixErrorReturn
pkg/system: return nil explicitly
Upstream-commit: 0211de67ab92cd62ab4484bac28c33f9cbd92b7f
Component: engine
2018-07-30 10:22:51 +02:00
2d2f5454b7 pkg/system: return nil explicitly
Makes code less confusing.
Otherwise it looks like an error (typo of "==" instead "!=").

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
Upstream-commit: cda9d5f7f0c4a155d1ae9e06c203fcb89600ff2a
Component: engine
2018-07-29 01:31:08 +03:00
37b7f3706f client: add WithDialContext() and client.Dialer()
WithDialContext() allows specifying custom dialer for hijacking and supposed to
replace WithDialer().
WithDialer() is also updated to use WithDialContext().

client.Dialer() returns the dialer configured with WithDialContext().

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: edac92409a3b1d0cfb7f5c0e2d10b3bb71f27245
Component: engine
2018-07-28 23:35:47 +09:00
6d2b321997 Merge pull request #37545 from vdemeester/revert-flaky-tests
Revert "migrated service integration tests from integration-cli/docke…
Upstream-commit: b785a4dcb6738ec9d32f30f200c5d9e81876bc01
Component: engine
2018-07-28 12:34:15 +01:00
c3d8713381 Merge pull request #37514 from jterry75/linux_metadata
Adds LinuxMetadata support by default on Windows
Upstream-commit: 13a8031e1c8593e820f20edc713c89dbe65cee3b
Component: engine
2018-07-27 17:51:10 +01:00
46d3079148 Merge component 'cli' from git@github.com:docker/cli master 2018-07-27 16:36:49 +00:00
82168dfb82 Revert "migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service"
This reverts commit fbaef1b0d3c5656a8aa5f0424b89c118ca277427.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c2e3657b17d8a1fcb80d39e92bdea1a478f82f34
Component: engine
2018-07-27 17:35:52 +02:00
d36e39d22c Merge pull request #1237 from vdemeester/use-non-deprecated-filters-funcs
Migrate to non-deprecated functions of `api/types/filters`
Upstream-commit: edfd623594
Component: cli
2018-07-27 14:47:01 +00:00
e74e974112 Migrate to non-deprecated functions of api/types/filters
- Use `Contains` instead of `Include`
- Use `ToJSON` instead of `ToParam`
- Remove usage of `ParseFlag` as it is deprecated too

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 55edeb497a
Component: cli
2018-07-27 15:37:43 +02:00
02f7f926ab integration: fix log message
The message was mistakenly replaced with a completely different one.

Fixes: cf2ea7613899477

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 2c2834ba4d59bb1bbb3efee07c8d3f09445c66b7
Component: engine
2018-07-27 11:47:59 +03:00
c2e4933538 Merge component 'cli' from git@github.com:docker/cli master 2018-07-27 08:36:45 +00:00
5ff8cde8dc Merge pull request #1140 from Vimal-Raghubir/1110-Fix-Warning-Message
Fix: Warning Message and Fallback search
Upstream-commit: a3464c0a20
Component: cli
2018-07-27 07:27:00 +00:00
e27a09f4ba Merge pull request #37492 from adshmh/migrate-docker_cli_service_update_test-to-integration-service
migrate service update integration tests from integration-cli to integration/service package
Upstream-commit: 3f4410163b8bfbfb67fa2730107235f16c6bbe59
Component: engine
2018-07-26 22:48:19 -07:00
d481c9e35d Vendor libnetwork
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: fc4ebe0b8bc5e41b3b2d108c21dc19ea08a9fcb7
Component: engine
2018-07-26 11:17:56 -07:00
1d8c80a782 Fixes for resolv.conf
Handle the case of systemd-resolved, and if in place
use a different resolv.conf source.
Set appropriately the option on libnetwork.
Move unix specific code to container_operation_unix

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: e353e7e3f0ce8eceeff657393cba2876375403fa
Component: engine
2018-07-26 11:17:56 -07:00
1fb6cc9e1e Add a way to get a pid of a process
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 0fc52ca6dd628f2b9163f5d328d1d749c6708de4
Component: engine
2018-07-26 11:17:46 -07:00
b473fee671 Merge component 'cli' from git@github.com:docker/cli master 2018-07-26 16:36:50 +00:00
e905f40a10 Merge pull request #1235 from vdemeester/compose-add-missing-field
Add missing fields in compose/types
Upstream-commit: b3b2ace735
Component: cli
2018-07-26 15:20:42 +00:00
ce042f6ff4 Add missing fields in compose/types
Even though those fields are not supported by `docker stack deploy`
they are defined in versions `3.x` of compose schema, so the `compose`
package should be able to marshal/unmarshal them.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d13e2df65b
Component: cli
2018-07-26 17:04:22 +02:00
38f6818cef Merge pull request #37360 from bjbroder/checkpoint-exit
Fix checkpoint's exiting semantics.
Upstream-commit: c3a02077149ea8ee1d53b2b60a3d36c29d1505f8
Component: engine
2018-07-26 14:25:49 +02:00
0d95964029 Merge pull request #37519 from dmcgowan/disable-cri
Add configuration option for cri-containerd 
Upstream-commit: 8239526f17aacb12f317fcd41501d69f2c1fafc2
Component: engine
2018-07-25 15:44:37 -07:00
7307ff9185 Merge pull request #37515 from Microsoft/jjh/revendoropengcs
Revendor Microsoft/opengcs @ v0.3.8
Upstream-commit: 6f8d85c441be3943eaa82d01430b39b90261d20c
Component: engine
2018-07-25 23:41:10 +02:00
cfcd7a95da migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: fbaef1b0d3c5656a8aa5f0424b89c118ca277427
Component: engine
2018-07-25 14:49:02 -04:00
2c6eafe9a7 Merge component 'cli' from git@github.com:docker/cli master 2018-07-25 12:36:54 +00:00
c76e6866ad Merge pull request #1232 from tommilligan/1231-zsh-autocomplete-update-invalid
Fixed typo breaking zsh docker update autocomplete (closes #1231)
Upstream-commit: effe36a155
Component: cli
2018-07-25 14:17:57 +02:00
e4c8ba34da Bump some dependencies to more recent versions (and tagged if available)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8788a4804f
Component: cli
2018-07-25 14:16:41 +02:00
4c5f6c0dc0 Fixed typo breaking zsh docker update autocomplete
Signed-off-by: Tom Milligan <tommilligan@users.noreply.github.com>
Upstream-commit: da00d1c49f
Component: cli
2018-07-25 12:23:08 +01:00
f83ff2718a Bump kubernetes dependencies to 1.11
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c8f0e211b9
Component: cli
2018-07-25 11:34:59 +02:00
6817733c2a Fix checkpoint's exiting semantics.
Previously, dockerd would always ask containerd to pass --leave-running
to runc/runsc, ignoring the exit boolean value. Hence, even `docker
checkpoint create --leave-running=false ...` would not stop the
container.

Signed-off-by: Brielle Broder <bbroder@google.com>
Upstream-commit: db621eb7ee6a837f6879959ac56c67fa2b30ae1d
Component: engine
2018-07-25 09:21:33 +02:00
b9ebe2f524 Add configuration option for containerd cri
Disable cri plugin by default in containerd and
allows an option to enable the plugin. This only
has an effect on containerd when supervised by
dockerd. When containerd is managed outside of
dockerd, the configuration is not effected.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 8fb5f4d5c9b4933be31bf5371d65a95edb037261
Component: engine
2018-07-24 11:34:47 -07:00
fd8de2c620 Revendor Microsoft/opengcs @ v0.3.8
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: 25aaf9772bbef81ee6557d23f37ac69f988d1050
Component: engine
2018-07-23 10:45:24 -07:00
4ac052187e Adds LinuxMetadata support by default on Windows
1. Sets the LinuxMetadata flag by default on Windows LCOW v1
MappedDirectories.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
Upstream-commit: e93077bcdf77be2e7e3aec9f9686dace9e18c850
Component: engine
2018-07-23 09:59:35 -07:00
647c857859 Merge component 'cli' from git@github.com:docker/cli master 2018-07-22 20:36:44 +00:00
9be707763d Merge pull request #1227 from pszczekutowicz/master
Added events filter scope for bash and zsh completion
Upstream-commit: 601131634e
Component: cli
2018-07-22 22:33:25 +02:00
3f95fbc9ad Merge component 'engine' from git@github.com:docker/engine master 2018-07-21 13:02:32 +00:00
19f93d0875 Merge pull request #37498 from kolyshkin/tarsum
pkg/tarsum: fix unit test for Go 1.11+
Upstream-commit: 1ef1cc8388165b2b848f9b3f53ec91c87de09f63
Component: engine
2018-07-21 10:51:48 +02:00
f61e0f76b4 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-07-20 21:48:33 +00:00
cffafa97f1 Merge pull request #125 from thaJeztah/a_nightly_to_remember
Merged with https://github.com/seemethere/unir
Upstream-commit: a5aa7e5a5e7f418cf1bc399055c9700aab475315
Component: packaging
2018-07-20 18:09:14 +00:00
ee1fbd1db2 Merge component 'cli' from git@github.com:docker/cli master 2018-07-20 16:41:41 +00:00
e1ab6a31da Added events filter scope zsh completion
Signed-off-by: Paweł Szczekutowicz <pszczekutowicz@gmail.com>
Upstream-commit: 13db1bc95f
Component: cli
2018-07-20 15:47:00 +02:00
e91cf840e6 Added events filter scope bash completion
Signed-off-by: Paweł Szczekutowicz <pszczekutowicz@gmail.com>
Upstream-commit: c922ea2f45
Component: cli
2018-07-20 15:37:49 +02:00
957aa92a67 Merge pull request #1226 from thaJeztah/harder_better_slower_stronger
Bump version to 18.09.0-dev
Upstream-commit: 543d6fb8da
Component: cli
2018-07-20 10:30:41 +02:00
243d4a2f49 Bump version to 18.09.0-dev
Releases will be supported for a longer term, and
will be done on a 6-month(ish) cycle.

https://blog.docker.com/2018/07/extending-support-cycle-docker-community-edition/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7fba38acad
Component: cli
2018-07-20 10:14:32 +02:00
374a6c3cbc Update nightly builds to use Golang pseudo-version
based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4

> using a "pseudo-version" of the form v0.0.0-yyyymmddhhmmss-abcdefabcdef,
> where the time is the commit time in UTC and the final suffix is the prefix
> of the commit hash. The time portion ensures that two pseudo-versions can
> be compared to determine which happened later, the commit hash identifes
> the underlying commit, and the v0.0.0- prefix identifies the pseudo-version
> as a pre-release before version v0.0.0, so that the go command prefers any
> tagged release over any pseudo-version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d2baf8f4891e82117bce354e0b0761258a0eafc9
Component: packaging
2018-07-20 00:28:26 +02:00
7a97868409 Merge component 'engine' from git@github.com:docker/engine master 2018-07-19 13:08:12 +00:00
08fd30fe8f Update --compose-file flag description to mention stdin
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c7822b036
Component: cli
2018-07-19 14:55:48 +02:00
2753c62859 Merge pull request #37499 from kolyshkin/ct-go-111
vendor: bump google/certificate-transparency-go to 1.0.20
Upstream-commit: 683738900eec52f86b834234eeef054c4e135031
Component: engine
2018-07-19 14:06:07 +02:00
9e7eb9d07a Merge pull request #37500 from kolyshkin/osusergo
Add osusergo build tar for static binaries
Upstream-commit: 24711b7eba4471170301ca0d8cb40451dda2495d
Component: engine
2018-07-19 13:57:44 +02:00
197ec1c2ab Add osusergo build tar for static binaries
Go 1.11 includes a fix to os/user to be working in a static binary
(fixing https://github.com/golang/go/issues/23265). The fix requires
`osusergo` build tag to be set for static binaries, which is what
this commit adds (also for containerd).

[v2: sort build tags alphabetically]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 70cdb1c66429582ecfdc5abed67189dd90ab7572
Component: engine
2018-07-19 12:25:46 +03:00
2a78eeac5b vendor: bump google/certificate-transparency-go to 1.0.20
This is to include the Windows + Go1.11 fix
(https://github.com/google/certificate-transparency-go/issues/284).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: dacefc32b27816c26caeba713b88f6767d2486d7
Component: engine
2018-07-19 10:47:53 +03:00
e5efa80e0f pkg/tarsum: fix unit test for Go 1.11+
Since go-1.11beta1 archive/tar, tar headers with Typeflag == TypeRegA
(numeric 0) (which is the default unless explicitly initialized) are
modified to have Typeflag set to either tar.TypeReg (character value
'0', not numeric 0) or tar.TypeDir (character value '5') [1].
This results in different Typeflag value in the resulting header,
leading to a different Checksum, and causing the following test
case errors:

> 12:09:14 --- FAIL: TestTarSums (0.05s)
> 12:09:14 tarsum_test.go:393: expecting
> [tarsum+sha256:8bf12d7e67c51ee2e8306cba569398b1b9f419969521a12ffb9d8875e8836738],
> but got
> [tarsum+sha256:75258b2c5dcd9adfe24ce71eeca5fc5019c7e669912f15703ede92b1a60cb11f]
> ... (etc.)

All the other code explicitly sets the Typeflag field, but this test
case is not, causing the incompatibility with Go 1.11. Therefore,
the fix is to set TypeReg explicitly, and change the expected checksums
in test cases).

Alternatively, we can vendor archive/tar again (for the 100th time),
but given that the issue is limited to the particular test case it
does not make sense.

This fixes the test for all Go versions.

[1] https://go-review.googlesource.com/c/go/+/85656

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 05cbe23db9836476677e7071d21ad53bf93dc2e7
Component: engine
2018-07-19 10:38:45 +03:00
0761ac7d2d Merge component 'engine' from git@github.com:docker/engine master 2018-07-19 01:04:46 +00:00
0606266d6e Merge pull request #37467 from thaJeztah/bump_containerd_1.1.2
Bump containerd daemon to v1.1.2
Upstream-commit: 7f91801cc86ea6be117fad9c11080fe1702ad96f
Component: engine
2018-07-18 22:29:23 +02:00
687d8eed17 Merge component 'engine' from git@github.com:docker/engine master 2018-07-18 17:07:02 +00:00
6f81e7d4d9 Merge pull request #37483 from thaJeztah/fix-nit-pick
Use constant for task runtime value
Upstream-commit: cc7cda1968062fc6dde28c93e85a0192d58b6d90
Component: engine
2018-07-18 17:31:44 +02:00
f78dc3e804 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-07-18 01:05:28 +00:00
b1a209fcca Merge component 'engine' from git@github.com:docker/engine master 2018-07-18 01:05:20 +00:00
676377e3f3 Merge pull request #122 from seemethere/remove_artful
Remove Ubuntu Artful (17.10)
Upstream-commit: bfc221bc25df21890d10cc52c54285f1ac0a3392
Component: packaging
2018-07-17 15:26:57 -07:00
e9484ed940 Merge pull request #37484 from thaJeztah/bump_swarmkit
Update swarmkit to 68266392a176434d282760d2d6d0ab4c68edcae6
Upstream-commit: 25ec60d3cdc14a444f54b741a65ef5ef199844a2
Component: engine
2018-07-17 15:12:00 -07:00
2471a85618 Merge component 'engine' from git@github.com:docker/engine master 2018-07-17 21:08:01 +00:00
1244bbdf28 Merge pull request #37439 from tiborvass/vendor-buildkit
Set BuildKit's ExportedProduct variable to show useful errors in the future
Upstream-commit: 9ebed53c5431a7c8296107869f1b3feabee9e8f3
Component: engine
2018-07-17 12:10:23 -07:00
6bdc6fed4e Update swarmkit to 68266392a176434d282760d2d6d0ab4c68edcae6
changes included:

- swarmkit #2706 address unassigned task leak when service is removed
- swarmkit #2676 Fix racy batching on the dispatcher
- swarmkit #2693 Fix linting issues revealed by Go 1.11

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c9377f45529d5dce21c264947b73c7053f316467
Component: engine
2018-07-17 20:55:07 +02:00
58b60f8a46 Use constant for task runtime value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b7d34977e72054d197a481a10addd773aa23ca4
Component: engine
2018-07-17 20:41:25 +02:00
b67ec60ca6 Merge pull request #37477 from thaJeztah/fix_TestExternalGraphDriver_pull
Fix flaky TestExternalGraphDriver/pull test
Upstream-commit: 8f683c6ed5395872656ace8d8b1b5ebfbb2a6de1
Component: engine
2018-07-17 20:36:22 +02:00
5087c7a333 Merge branch 'master' of github.com:docker/docker-ce 2018-07-17 17:09:57 +00:00
2885186d20 Merge component 'cli' from git@github.com:docker/cli master 2018-07-17 16:43:01 +00:00
6e8656ba72 Merge component 'cli' from git@github.com:docker/cli master 2018-07-17 16:40:18 +00:00
724ab95ba8 Merge pull request #1216 from justyntemme/patch-4
Update deploy.go
Upstream-commit: 48fbb12b7c
Component: cli
2018-07-17 16:20:46 +02:00
8dee127b92 Update deploy.go
Clarified ambiguous error message

Update kubernetes/cli.go

Infromed user of why the error was caused when file is not there

Signed-off-by: Justyn Temme <justyntemme@gmail.com>
Upstream-commit: bdd58a4096
Component: cli
2018-07-17 09:14:05 -05:00
bb64046f90 Fix flaky TestExternalGraphDriver/pull test
This test occassionally fails on s390x and Power;

    03:16:04 --- FAIL: TestExternalGraphDriver/pull (1.08s)
    03:16:04 external_test.go:402: assertion failed: error is not nil: Error: No such image: busybox:latest

Most likely these failures are caused due to Docker Hub updating
the busybox:latest image, but not all architectures yet being
available.

Instead of using `:latest`, pull an image by digest, so that
the test doesn't depend on Docker Hub having all architectures
available for `:latest`.

I selected the same digest as is currently used as "frozen image"
in the Dockerfile.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 352db26d5fd896b681046b1119f07e0ce1ed45b8
Component: engine
2018-07-17 10:45:33 +02:00
3b5e16f319 validate: please vet
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 81599222fc8f8a845b68ca15f3582e76de24a7b3
Component: engine
2018-07-16 21:41:54 +00:00
5dc7f8fc9b builder: set buildkit's exported product variable via PRODUCT
This introduces a PRODUCT environment variable that is used to set a constant
at dockerversion.ProductName.

That is then used to set BuildKit's ExportedProduct variable in order to show
useful error messages to users when a certain version of the product doesn't
support a BuildKit feature.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 195919d9d645aa4ab5680a2331c57ff33eb9e5d9
Component: engine
2018-07-16 21:41:54 +00:00
adc3470981 vendor: buildkit to 98f1604134f945d48538ffca0e18662337b4a850
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 0ab7c1c5bacdf8b18c66b729bb7f919f6acfcf29
Component: engine
2018-07-16 21:41:53 +00:00
b53f1ce26a Merge component 'engine' from git@github.com:docker/engine master 2018-07-16 17:04:53 +00:00
d384a456a6 Add bash completion for service logs --details|--raw
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4912846de2
Component: cli
2018-07-16 18:46:06 +02:00
22767a6190 Merge component 'cli' from git@github.com:docker/cli master 2018-07-16 16:41:25 +00:00
59e4a5a574 Do not return "<unknown>" in /info response
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e6e8ab50fad5397f7be07fa00ba2bca85860cbe8
Component: engine
2018-07-16 16:09:58 +02:00
4a2ba80f95 Merge pull request #37457 from adshmh/migrate-docker_cli_config_create_test-integration-tests-to-integration-config
moved integration tests from docker_cli_config_create_test.go to integration/config
Upstream-commit: a5495f289aafafac8a01c62f2a9cb44856658ece
Component: engine
2018-07-16 14:00:44 +02:00
1d3ba53158 Merge pull request #1019 from ktomk/fix-env-file
import environment variables that are present
Upstream-commit: 9e71207327
Component: cli
2018-07-16 13:41:29 +02:00
df467b49b6 Merge pull request #1192 from peter-kehl/master
For docker/docker.github.io/issues/6987
Upstream-commit: 7b82276c88
Component: cli
2018-07-16 12:22:02 +02:00
2fe05a785a Bump containerd daemon to v1.1.2
Updates cri version to 1.0.4, to add `max-container-log-line-size`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9e773a12fb1cc5da7bec13d46fe04673a4593632
Component: engine
2018-07-16 12:02:15 +02:00
3fa9808e55 Merge pull request #37396 from yui-knk/error_when_base_name_resolved_to_blank
Return error if basename is expanded to blank
Upstream-commit: 492545e139e7461aac044149a931bb4b2dd48f75
Component: engine
2018-07-15 15:42:57 -07:00
900616b995 Return error if basename is expanded to blank
Fix: https://github.com/moby/moby/issues/37325

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: c9542d313e2a52807644742e5fd684bc2de9f507
Component: engine
2018-07-15 22:29:03 +09:00
e409641b96 Remove slash prefix when matching name filters (Fixes #37453)
* Regex name filters were display undesired behavior due to
  names containing the trailing slash when being compared
* Adjusted filterByNameIDMatches and includeContainerInList to
  strip the slash prefix before doing name comparisons
* Added test case and helper functions for the test to list_test
* Force failed tests during development to ensure there were
  no false positives

Signed-off-by: Chris White <me@cwprogram.com>
Upstream-commit: 5c8da2e96738addd8a175e5b9a23b8c37d4a4dfe
Component: engine
2018-07-15 05:57:29 -05:00
e0dbe6d576 namesgenerator: new adjective and two inspiring Computing Science authors
Signed-off-by: Russ Magee <rmagee@gmail.com>
Upstream-commit: c1ab5c98a223faa7b37cf7dbabf7648bb78155d7
Component: engine
2018-07-15 00:59:27 -07:00
ef023f77a6 Merge pull request #37454 from thaJeztah/swagger-lint
Fix golint warning on generated "volume" types
Upstream-commit: 17dc10123f001d1481e4047de211c8aec7ed9d34
Component: engine
2018-07-14 12:46:26 -07:00
29bb93b3d8 Merge pull request #37449 from thaJeztah/in_a_different_context
Remove stray uses of "golang.org/x/net/context"
Upstream-commit: d080de7074a05a1534bf7e91d000a311885fa221
Component: engine
2018-07-15 01:15:36 +09:00
3c9a878585 Merge pull request #37451 from thaJeztah/refactor_system_info
Refactor daemon.info to reduce cyclomatic complexity
Upstream-commit: a2a1d04bcae54129b5c4ddad4e4f68458fb5ef3d
Component: engine
2018-07-13 16:47:28 -07:00
bd376a2767 Merge pull request #37455 from fcrisciani/fix-internal
Fix flakyness in TestDockerNetworkInternalMode
Upstream-commit: 126d038831dccf82bdcd1a19ee765e89bc07fcd7
Component: engine
2018-07-13 15:26:05 -07:00
14ed98c1a4 moved integration tests from docker_cli_config_create_test.go to integration/config
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 0e57ceae0dd42491ed81538bf4d9164218080b66
Component: engine
2018-07-13 17:29:02 -04:00
5fea4ae591 Fix flakyness in TestDockerNetworkInternalMode
Instead of waiting for the DNS to fail, try to access
a specific external IP and verify that 100% of the pakcets
are being lost.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: a2bb2144b3e0d49ac615976bfac462a307d85f0e
Component: engine
2018-07-13 11:43:38 -07:00
2ec1cede27 Merge component 'engine' from git@github.com:docker/engine master 2018-07-13 17:05:21 +00:00
9ec201f089 Merge component 'cli' from git@github.com:docker/cli master 2018-07-13 16:41:28 +00:00
d1e4c2c766 Fix golint warning on generated "volume" types
Should fix

```
api/types/volume/volume_create.go
Line 10: warning: comment on exported type VolumeCreateBody should be of the form "VolumeCreateBody ..." (with optional leading article) (golint)

api/types/volume/volume_list.go
Line 12: warning: comment on exported type VolumeListOKBody should be of the form "VolumeListOKBody ..." (with optional leading article) (golint)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bd06a5ea4df919ff323510fba10801b5673a3af6
Component: engine
2018-07-13 16:58:59 +02:00
95d9ce4032 Merge pull request #1212 from thaJeztah/bump_circleci_docker
Update CircleCI Docker version to 18.03
Upstream-commit: b395d2d6f5
Component: cli
2018-07-13 15:13:40 +02:00
de770aa887 Fix: Warning Message
Signed-off-by: Vimal-Raghubir <vraghubir0418@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ce3d069936
Component: cli
2018-07-13 13:39:24 +02:00
c1dba76a94 Unexport daemon.FillPlatformInfo
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c03d3a416b24c18dfbb938397052eebd8b67d1a3
Component: engine
2018-07-13 13:16:34 +02:00
91b7b13fc2 Refactor daemon.info to reduce cyclomatic complexity
Before this change;

    gocyclo daemon/info.go
    17 daemon (*Daemon).SystemInfo daemon/info.go:27:1
    2 daemon (*Daemon).SystemVersion daemon/info.go:150:1
    1 daemon (*Daemon).showPluginsInfo daemon/info.go:195:1

After this change;

    gocyclo daemon/info.go
    8 daemon (*Daemon).fillSecurityOptions daemon/info.go:150:1
    5 daemon operatingSystem daemon/info.go:201:1
    3 daemon (*Daemon).fillDriverInfo daemon/info.go:121:1
    2 daemon hostName daemon/info.go:172:1
    2 daemon memInfo daemon/info.go:192:1
    2 daemon kernelVersion daemon/info.go:182:1
    1 daemon (*Daemon).SystemVersion daemon/info.go:81:1
    1 daemon (*Daemon).SystemInfo daemon/info.go:27:1
    1 daemon (*Daemon).fillPluginsInfo daemon/info.go:138:1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 50eaed4d0c1492479ed4d83eb97424d21a3e458d
Component: engine
2018-07-13 13:10:05 +02:00
bd3a5eca16 Merge pull request #37445 from kolyshkin/continuity
vendor: update continuity to 0377f7d767206
Upstream-commit: 23f4a3d5091b878b252bef73ce6ab10a54641eb4
Component: engine
2018-07-13 12:12:09 +02:00
4dc1b1b81b Merge pull request #37446 from kolyshkin/lcow
lcow: fix debug in startServiceVMIfNotRunning()
Upstream-commit: bd0a4ac1c5bbf6a613c39be9cc2b74f1a1cc73ca
Component: engine
2018-07-13 12:10:26 +02:00
3980327921 Configure CircleCI remote daemon to use version 18.03.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 13eb2aa125
Component: cli
2018-07-13 11:51:41 +02:00
15f7e30815 Merge pull request #1208 from thaJeztah/update-linting
Update gometalinter to v2.0.6, remove nakedret
Upstream-commit: d57cc1782e
Component: cli
2018-07-13 11:41:59 +02:00
92fa05c733 Update CircleCI Docker version to 18.03
17.06 has reached EOL a long time ago; let's use a current
version in CI as well :D

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e2a56c47da
Component: cli
2018-07-13 11:26:07 +02:00
ca353ee7ae Update hints for linting
- remove some hints that are no longer needed
- added a nolint: unparam for removeSingleSigner() (return bool is only used in tests)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9847e96765
Component: cli
2018-07-13 11:18:50 +02:00
71a73ab18c Update gometalinter to v2.0.6 and remove alexkohler/nakedret
alexkohler/nakedret is now installed by default with gometalinter,
so it's no longer needed to install this manually

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f3811e865e
Component: cli
2018-07-13 11:17:43 +02:00
8ce22ea6b6 Fix API template to not use "golang.org/x/net/context"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a8b4e04e2f6ae95a5146c4c4d794cda1a725c634
Component: engine
2018-07-13 09:54:24 +02:00
bcde4812db Remove stray uses of "golang.org/x/net/context"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4c0a050ee24beb399b11c48829522e48f8d0b98a
Component: engine
2018-07-13 09:53:36 +02:00
0388cb645f Merge pull request #1210 from albers/completion-service-create--init
Add bash completion for `service create|update --init`
Upstream-commit: d97f378009
Component: cli
2018-07-13 09:44:11 +02:00
526010074d Add bash completion for service create|update --init
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 97d312e02a
Component: cli
2018-07-13 09:05:29 +02:00
1efda2126e vendor: update continuity to 0377f7d767206
This is to include the Go 1.11 fix
(https://github.com/containerd/continuity/pull/120).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c64a2448d1f2b7ba680dcb017cd46dcb8ac359c4
Component: engine
2018-07-12 16:38:05 -07:00
810635b34f Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-07-12 23:01:55 +00:00
882263fbf1 Merge pull request #37422 from thaJeztah/fix-linting-errors
Fix some golint and ineffassign issues
Upstream-commit: f9470d8189e25c297c6c7bd9ac592b6e5acd951e
Component: engine
2018-07-13 00:25:46 +02:00
8a9efc106f lcow: fix debug in startServiceVMIfNotRunning()
When go-1.11beta1 is used for building, the following error is
reported:

> 14:56:20 daemon\graphdriver\lcow\lcow.go:236: Debugf format %s reads
> arg #2, but call has 1 arg

While fixing this, let's also fix a few other things in this
very function (startServiceVMIfNotRunning):

1. Do not use fmt.Printf when not required.
2. Use `title` whenever possible.
3. Don't add `id` to messages as `title` already has it.
4. Remove duplicated colons.
5. Try to unify style of messages.
6. s/startservicevmifnotrunning/startServiceVMIfNotRunning/
...

In general, logging/debugging here is a mess and requires much more
love than I can give it at the moment. Areas for improvement:

1. Add a global var logger = logrus.WithField("storage-driver", "lcow")
and use it everywhere else in the code.
2. Use logger.WithField("id", id) whenever possible (same for "context"
and other similar fields).
3. Revise all the errors returned to be uniform.
4. Make use of errors.Wrap[f] whenever possible.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: b7a95a3ce4c731c0fca204435be758ea89d6050f
Component: engine
2018-07-12 13:42:23 -07:00
1a06c64c41 Add in two new names for names-generator
Added in : Blase Pascal and Kathleen Antonelli

Signed-off-by: Projjol Banerji <probaner23@gmail.com>
Upstream-commit: ad5d34ad0e6fd14c6aaad3f116a29e24a4f241ec
Component: engine
2018-07-13 00:41:17 +05:30
1ea5cae6b3 Merge pull request #123 from dhiltgen/image_build
Merged with https://github.com/seemethere/unir
Upstream-commit: 648a878d637a51826d3d7d17efe8f2f58383daa2
Component: packaging
2018-07-12 17:59:57 +00:00
78ba8bbfa1 Add support for image build
This adds a new packaging variant for engine with an image
Upstream-commit: 27766ed0f4576ced4026adc60359ad63a977008e
Component: packaging
2018-07-12 10:41:52 -07:00
ca6e81b42a Merge component 'engine' from git@github.com:docker/engine master 2018-07-12 17:07:16 +00:00
dcf499c9e9 Merge component 'cli' from git@github.com:docker/cli master 2018-07-12 16:41:44 +00:00
cb708746f4 Merge pull request #37440 from msabansal/errorfix
Fix error string in docker CLI test
Upstream-commit: 460297b5fb6bf091bc91b6f8cfbe396c6a483826
Component: engine
2018-07-12 13:47:47 +02:00
370f51742e Merge pull request #1204 from thaJeztah/improve-version-align
Improve version output alignment
Upstream-commit: ee8cdb3850
Component: cli
2018-07-12 10:53:50 +02:00
dc41641256 Fix error string in docker CLI test
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
Upstream-commit: 76ace9bb5e2c5ecdd02046956ab00f76c3b25a3a
Component: engine
2018-07-11 23:02:44 -07:00
747f6b750f Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-07-12 02:00:27 +00:00
78b4a1b16e Merge component 'engine' from git@github.com:docker/engine master 2018-07-12 02:00:19 +00:00
508c160462 Adapt min-column width to component information
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0f7ae34ea9
Component: cli
2018-07-12 01:34:34 +02:00
bc8e259b12 Extend version-align test with components
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 55ff66d967
Component: cli
2018-07-12 01:31:23 +02:00
6de0e3f629 Merge pull request #37436 from thaJeztah/bump_metalinter
Bump gometalinter to v2.0.6
Upstream-commit: 705774aa7683892fc214d2b028d226f24ad20f1c
Component: engine
2018-07-11 15:44:45 -07:00
c5fdcd4c55 Merge pull request #37437 from thaJeztah/format_fixes
Various formatting fixes / compilation issues caught by Go 1.11
Upstream-commit: 5fc12449d830ae9005138fb3d3782728fa8d137a
Component: engine
2018-07-11 23:14:19 +02:00
a5afbc072c Merge pull request #124 from seemethere/tilder
Merged with https://github.com/seemethere/unir
Upstream-commit: 8c000e19fc52ce65f008b0a7ff81871be9367915
Component: packaging
2018-07-11 21:13:35 +00:00
d799a9b46d Fix golint issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 35f7e7c50a131494c9d530800e80bf2da42fb89c
Component: engine
2018-07-11 22:19:03 +02:00
a174fffcfe Fix ineffassign linting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ddd8a6572d36a6d0db2aa21d697018f419a7b424
Component: engine
2018-07-11 22:18:45 +02:00
6029eff9d1 Merge pull request #37413 from yui-knk/do_not_Healthcheck_RUN_command
Ensure RUN instruction to run without Healthcheck
Upstream-commit: f0585d04d079d289b7b9cb572f8ee509f6768402
Component: engine
2018-07-11 20:38:03 +02:00
e408ff8937 Merge component 'engine' from git@github.com:docker/engine master 2018-07-11 18:35:11 +00:00
efc55d460d fixed the race condition in the integration test TestRunContainerWithBridgeNone
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 7cda9d8e97c3c82bad13fec9f1727a7de28609b2
Component: engine
2018-07-11 10:37:00 -04:00
99d1e1cf76 loggerutils: build fixes, improve errors
There are two build errors when using go-1.11beta1:

> daemon/logger/loggerutils/logfile.go:367: Warningf format %q arg f.Name is a func value, not called
> daemon/logger/loggerutils/logfile.go:564: Debug call has possible formatting directive %v

In the first place, the file name is actually not required as error
message already includes it.

While at it, fix a couple of other places for more correct messages, and
make sure to not add a file name if an error already has it.

Fixes: f69f09f44c
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 09ad434f10cff48741322854a3003686b28295b5
Component: engine
2018-07-11 15:52:25 +02:00
d01a9704de aufs: fix Wrapf args
Fix the following go-1.11beta1 build error:

> daemon/graphdriver/aufs/aufs.go:376: Wrapf format %s reads arg #1, but call has 0 args

While at it, change '%s' to %q.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2e30e9e6db42043cb2bd67d25a7152488c834f9f
Component: engine
2018-07-11 15:52:22 +02:00
14a71772f5 Compile fix
Go 1.11beta1 (rightfully) complains:

> 15:38:37 daemon/cluster/controllers/plugin/controller.go:183:
> Entry.Debugf format %#T has unrecognized flag #

This debug print was added by commit 72c3bcf2a5.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a9a136572dc2a2c2ec5da320c4d0a32b5a15c550
Component: engine
2018-07-11 15:52:19 +02:00
2a7994f372 daemon/*.go: fix some Wrap[f]/Warn[f] errors
In particular, these two:
> daemon/daemon_unix.go:1129: Wrapf format %v reads arg #1, but call has 0 args
> daemon/kill.go:111: Warn call has possible formatting directive %s

and a few more.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3737194b9f2875c10f3f2117c1816054ba0ff262
Component: engine
2018-07-11 15:51:51 +02:00
c5b67f5adc Bump gometalinter to v2.0.6
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bda793d1d4b4000154d057afb9621f5123bb0dac
Component: engine
2018-07-11 15:41:15 +02:00
9ef9ed7750 Merge pull request #37424 from thaJeztah/bump_libnetwork
Bump libnetwork to d00ceed44cc447c77f25cdf5d59e83163bdcb4c9
Upstream-commit: 94a8f4d0d4af128d656fa571fff2dd2b59278717
Component: engine
2018-07-11 12:04:41 +01:00
2a39d8293c Merge pull request #37431 from tonistiigi/mountable-fix
builder: fix duplicate calls to mountable
Upstream-commit: e6aa71b190a87406e327ca08680e691d6f1fcfe5
Component: engine
2018-07-10 18:26:57 -07:00
f481ae9371 ~ -> - for dev versions
tilde doesn't play nice with docker images so to be uniform let's
replace the tilde with a dash

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: ad988a9a4020eaf44245659a8fe7053a2e9b874b
Component: packaging
2018-07-11 00:27:21 +00:00
4c7a4e64a3 builder: fix duplicate calls to mountable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ffa7233d1538363fe12ad609e720b8d75e8768de
Component: engine
2018-07-10 15:21:29 -07:00
a6e2e0bba5 Select polling based watcher for Windows log watcher
Signed-off-by: Tejaswini Duggaraju <naduggar@microsoft.com>
Upstream-commit: df84cdd091631f32abaedd805791db89ac5c83d4
Component: engine
2018-07-10 10:20:10 -07:00
4fdca264ef Merge component 'engine' from git@github.com:docker/engine master 2018-07-10 17:07:24 +00:00
8e212141ba Merge component 'cli' from git@github.com:docker/cli master 2018-07-10 16:41:45 +00:00
1ea5486eb8 Merge pull request #37425 from cpuguy83/bump_containerd_1.1.1
Bump containerd daemon to v1.1.1
Upstream-commit: 56b14b8c259640e570becfaffa7aeb3209239991
Component: engine
2018-07-10 13:02:22 +02:00
d5d9154f1b Merge pull request #1178 from cyli/fix-swarm-ca-command
Propagate the provided external CA certificate to the external CA object in swarm
Upstream-commit: c8b9c21ef9
Component: cli
2018-07-10 01:31:32 +02:00
5bd73ec5be Bump containerd daemon to v1.1.1
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c083eb75953c266c4be9292cdeb7aad283ca47ba
Component: engine
2018-07-09 16:00:20 -07:00
d35ac81889 Remove Ubuntu Artful (17.10)
EOL is July 2018

https://wiki.ubuntu.com/Releases

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: eb635bdb3044b008344c8318c8d727ac94662526
Component: packaging
2018-07-09 22:18:11 +00:00
15fd6dfa94 Merge pull request #37398 from mykeul/master
mkimage-alpine.sh: Removed the "-i -t" arguments from the smoke test calling printf (the…
Upstream-commit: c04f9ae9d7af14d0fb49bb84e46c03b871f59a5d
Component: engine
2018-07-09 14:50:53 -06:00
f626c687df Merge pull request #37419 from thaJeztah/pass_loglevel_to_containerd
Pass log-level to containerd
Upstream-commit: 42bd8e1b1034a9caaf0fb537a5dd4e855ade9fda
Component: engine
2018-07-09 21:59:47 +02:00
d3875eff05 Bump libnetwork to d00ceed44cc447c77f25cdf5d59e83163bdcb4c9
The absence of the file /proc/sys/net/ipv6/conf/all/disable_ipv6
doesn't appear to affect functionality, at least at this time.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d58c4cbe6c781c78db352db2956e9949b8fc8609
Component: engine
2018-07-09 21:03:50 +02:00
730b7c1410 Merge pull request #37372 from ctelfer/scalable-lb
Improve scalability of the Linux load balancing
Upstream-commit: 328c089b5bca66594c4937e88cf9879879c4eed7
Component: engine
2018-07-09 20:06:37 +02:00
e3a4e3e405 Merge component 'engine' from git@github.com:docker/engine master 2018-07-09 17:05:35 +00:00
7f77443754 Merge component 'cli' from git@github.com:docker/cli master 2018-07-09 16:41:26 +00:00
77f98deb03 Merge pull request #1196 from adshmh/use-sort-slice-for-sorting-cli-compose
refactored commands to use sort.Slice
Upstream-commit: b91953f507
Component: cli
2018-07-09 07:18:11 -07:00
6d34b0ff1f Pass log-level to containerd
dockerd allows the `--log-level` to be specified, but this log-level
was not forwarded to the containerd process.

This patch sets containerd's log-level to the same as dockerd if a
custom level is provided.

Now that `--log-level` is also passed to containerd, the default "info"
is removed, so that containerd's default (or the level configured in containerd.toml)
is still used if no log-level is set.

Before this change:

containerd would always be started without a log-level set (only the level that's configured in `containerd.toml`);

```
root      1014  2.5  2.1 496484 43468 pts/0    Sl+  12:23   0:00 dockerd
root      1023  1.2  1.1 681768 23832 ?        Ssl  12:23   0:00  \_ docker-containerd --config /var/run/docker/containerd/containerd.toml
```

After this change:

when running `dockerd` without options (same as current);

```
root      1014  2.5  2.1 496484 43468 pts/0    Sl+  12:23   0:00 dockerd
root      1023  1.2  1.1 681768 23832 ?        Ssl  12:23   0:00  \_ docker-containerd --config /var/run/docker/containerd/containerd.toml
```

when running `dockerd --debug`:

```
root       600  0.8  2.1 512876 43180 pts/0    Sl+  12:20   0:00 dockerd --debug
root       608  0.6  1.1 624428 23672 ?        Ssl  12:20   0:00  \_ docker-containerd --config /var/run/docker/containerd/containerd.toml --log-level debug
```

when running `dockerd --log-level=panic`

```
root       747  0.6  2.1 496548 43996 pts/0    Sl+  12:21   0:00 dockerd --log-level=panic
root       755  0.7  1.1 550696 24100 ?        Ssl  12:21   0:00  \_ docker-containerd --config /var/run/docker/containerd/containerd.toml --log-level panic
```

combining `--debug` and `--log-level` (`--debug` takes precedence):

```
root       880  2.7  2.1 634692 43336 pts/0    Sl+  12:23   0:00 dockerd --debug --log-level=panic
root       888  1.0  1.1 616232 23652 ?        Ssl  12:23   0:00  \_ docker-containerd --config /var/run/docker/containerd/containerd.toml --log-level debug
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aaa1392279ffe67a63581d2a43b3a3c7b0fc47b1
Component: engine
2018-07-09 15:38:08 +02:00
68bf9d2bfa Merge pull request #37390 from thaJeztah/update_cfssl_for_swarmkit
Update cloudflare/cfssl to 1.3.2
Upstream-commit: c8bda42d1632163c62f6a3d32969af2ba5463ab3
Component: engine
2018-07-09 09:10:25 +02:00
a160d8d6ac refactored cli/compose and cli/command/trust to use sort.Slice and removed custom types used for sorting
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 71d650ee17
Component: cli
2018-07-08 15:08:17 -04:00
806ea23a1d Merge pull request #37409 from ctelfer/rm-libnet-error-wrapping
Fix faulty error type checking in removeNetwork()
Upstream-commit: 905811f366f28c1712626817f5fb086bd4072a78
Component: engine
2018-07-08 20:18:40 +02:00
cf69ae8a84 Merge component 'engine' from git@github.com:docker/engine master 2018-07-08 17:05:19 +00:00
329f09f208 Merge pull request #37415 from storykim/test-md-typo
Fix typo on test.md
Upstream-commit: d4bbd7938a533567182a07e13d1daf1d271a1bcb
Component: engine
2018-07-08 17:13:21 +02:00
a65c9b81e8 Fix typo on test.md
It said `TESTFLAGS='-test.run ^TestValidateIPAddress$' make test-unit`
runs `TestBuild` test, but actually runs `TestValidateIPAddress` test.

Signed-off-by: Donghwa Kim <shanytt@gmail.com>
Upstream-commit: 3048c3a7682919297d8d7d26897a59dc91b3be09
Component: engine
2018-07-08 18:22:21 +09:00
f4afbedc77 Ensure RUN instruction to run without Healthcheck
Before this commit Healthcheck run if HEALTHCHECK
instruction appears before RUN instruction.
By passing `withoutHealthcheck` to `copyRunConfig`,
always RUN instruction run without Healthcheck.

Fix: https://github.com/moby/moby/issues/37362

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: 44e08d8a7d1249a1956018c6c3d3655642a4f273
Component: engine
2018-07-08 16:49:04 +09:00
f1b7597661 Get err type in removeNetworks() w/ errors.Cause()
Commit c0bc14e8 wrapped the return value of nw.Delete() with some extra
information.  However, this breaks the code in
containerAdaptor.removeNetworks() which ignores certain specific
libnetwork error return codes.  Said codes actually don't represent
errors, but just regular conditions to be expected in normal operation.
The removeNetworks() call checked for these errors by type assertions
which the errors.Wrap(err...) breaks.

This has a cascading effect, because controller.Remove() invokes
containerAdaptor.removeNetworks() and if the latter returns an error,
then Remove() fails to remove the container itself.  This is not
necessarily catastrophic since the container reaper apparently will
purge the container later, but it is clearly not the behavior we want.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: 6225d1f15c5fd916c3e0ef3afe022f6cc14ac696
Component: engine
2018-07-07 18:18:53 -04:00
69398f8dbb Merge component 'engine' from git@github.com:docker/engine master 2018-07-07 18:12:23 +00:00
6905b9b449 Merge component 'cli' from git@github.com:docker/cli master 2018-07-07 17:47:00 +00:00
1f2ee25258 Merge pull request #1194 from adshmh/use-sort-slice-for-sorting-output
use sort.Slice for sorting commands' output
Upstream-commit: 2b221d8f1c
Component: cli
2018-07-07 18:13:12 +02:00
af3a05526e Merge pull request #37411 from tonistiigi/vendor-containerd
vendor: update containerd to b41633746
Upstream-commit: ae1160b8d8dd0b877bb58226852422c63b7210ce
Component: engine
2018-07-06 18:37:31 -07:00
642f2f54c1 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-07-06 23:32:26 +00:00
126b4ecc06 Merge pull request #120 from seemethere/k
Add a `0.` to be more consistent with dev version
Upstream-commit: 225a141f3098dda91541f0f193a4a3c88f39f654
Component: packaging
2018-07-06 15:30:07 -07:00
d8b48fcc0c Add a 0. to be more consistent with dev version
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: eed5a3519f43d4603cdbc410059d191d9f2c54ea
Component: packaging
2018-07-06 22:21:52 +00:00
981ec3d944 Merge pull request #118 from seemethere/j
Merged with https://github.com/seemethere/unir
Upstream-commit: 680e6a05a1d55d97bcba7b4179a1af5a7526a30d
Component: packaging
2018-07-06 22:01:37 +00:00
3c2cc200c2 vendor: update containerd to b41633746
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f0e61582664d16c5a608c3a742cc12b6b006bca6
Component: engine
2018-07-06 14:43:49 -07:00
9e7b5c6072 Merge pull request #37404 from runcom/no-acpi
Add /proc/acpi to masked paths
Upstream-commit: 86a41e4ef70ddeca610f2d0ed195a7834fc6bf4d
Component: engine
2018-07-06 22:40:08 +02:00
b6e6c32f70 refactored all commands under cli/command/ to use sort.Slice instead of declaring custom types for sorting
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: ceed42217d
Component: cli
2018-07-06 15:49:32 -04:00
90fd78493d Make static versioning match RPM and DEB versioning
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c2afc0508ba0af6f50e99b9f1756a72748ff2bb1
Component: packaging
2018-07-06 18:45:11 +00:00
7925889650 Bump EPOCH to 1
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 6456000a411bc00fa9f2b022ecda985d1e221869
Component: packaging
2018-07-06 18:23:35 +00:00
2c5fb6c781 Merge pull request #119 from seemethere/unir
Add unir yml
Upstream-commit: 946d2d4dd2648082955d55cd7f4d8348986a6517
Component: packaging
2018-07-06 14:05:07 -04:00
8c93c99508 Add unir yml
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 6a5e5179ef2160c98c8e96a82a676703322c24c9
Component: packaging
2018-07-06 18:04:36 +00:00
8dfe97f6a1 Change dev versioning to be purely git based
Switches dev versioning from being based on a set version like
`18.06.0-dev` to being based purely on the git commit timestamp / git
commit sha.

This should give us a bit more flexibility in terms of nightlies not
being tied to specific versions.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 559c9a323a77fe1215f91d851ce72053ce5dd99b
Component: packaging
2018-07-06 17:59:30 +00:00
dcf345fe9b Bump libnetwork to 3ac297bc
Bump libnetwork to 3ac297bc7fd0afec9051bbb47024c9bc1d75bf5b in order to
get fix 0c3d9f00 which addresses a flaw that the scalable load balancing
code revealed.  Attempting to print sandbox IDs where the sandbox name
was too short results in a goroutine panic.  This can occur with
sandboxes with names of 1 or 2 characters in the previous code. But due
to naming updates in the scalable load balancing code, it could now
occur for networks whose name was 3 characters and at least one of the
integration tests employed such networks (named 'foo', 'bar' and 'baz').

This update also brings in several changes as well:
 * 6c7c6017 - Fix error handling about bridgeSetup
 * 5ed38221 - Optimize networkDB queue
 * cfa9afdb - ndots: produce error on negative numbers
 * 5586e226 - improve error message for invalid ndots number
 * 449672e5 - Allows to set generic knobs on the Sandbox
 * 6b4c4af7 - do not ignore user-provided "ndots:0" option
 * 843a0e42 - Adjust corner case for reconnect logic

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: 0e162d992394d9216f590176991d33ff48ef3389
Component: engine
2018-07-06 13:58:09 -04:00
6c6aa8b73b Merge pull request #536 from andrewhsu/zero
set ver to 0.0.0-dev
2018-07-06 13:53:09 -04:00
721a77818d zero the version file in prep for nightly
Have the default version number not tied to next version number.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-07-06 17:50:15 +00:00
23d14578b4 Merge component 'engine' from git@github.com:docker/engine master 2018-07-06 17:07:46 +00:00
136964a8f1 Merge component 'cli' from git@github.com:docker/cli master 2018-07-06 16:41:46 +00:00
c81d2d67a0 Merge pull request #1102 from sfluor/1074-fix-mapping-a-range-of-host-ports-to-a-single-container-port
Fix mapping a range of host ports to a single container port
Upstream-commit: 2634562119
Component: cli
2018-07-06 14:41:00 +02:00
c8c1e95dc9 Merge pull request #37394 from yongtang/07052018-ipcmode
Migrate some ipcmode tests to integration
Upstream-commit: aba2735e3fe66333ac1064bed3b476f30b1d1c00
Component: engine
2018-07-06 10:00:03 +02:00
a960241d3c Merge pull request #37399 from cyli/bump-swarmkit
Bump swarmkit to include task reaper fixes and more metrics.
Upstream-commit: 13f9a25a42b58c66edb2c6bae6f689ec24ede18c
Component: engine
2018-07-06 09:30:40 +02:00
ce46cc96e7 Merge component 'engine' from git@github.com:docker/engine master 2018-07-06 00:59:10 +00:00
31c1953e39 Merge component 'cli' from git@github.com:docker/cli master 2018-07-06 00:33:04 +00:00
abfc316457 Merge pull request #1166 from adshmh/add-sort-to-plugin-list
Sort plugin names in a natural order
Upstream-commit: 8160759013
Component: cli
2018-07-05 16:34:25 -07:00
be1844eeef Bump swarmkit to include task reaper fixes and more metrics.
This includes the following behavior-modifying PRs:

- docker/swarmkit#2673
- docker/swarmkit#2669
- docker/swarmkit#2675
- docker/swarmkit#2664

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: b322705750cddef903a1097e65a46a6a86610d0a
Component: engine
2018-07-05 15:24:10 -07:00
ae87d856f8 For docker/docker.github.io/issues/6987
Signed-off-by: Peter Kehl <peter.kehl@gmail.com>
Upstream-commit: 249c8652a2
Component: cli
2018-07-05 14:12:47 -07:00
ca577823d1 Merge pull request #37157 from debayande/even-more-names
Adds a few more names to the name generator.
Upstream-commit: 656036ce2cc949939e7eccc6d87d1e8be26e6890
Component: engine
2018-07-05 21:06:12 +02:00
d053f8aaa0 Merge pull request #37378 from cpuguy83/fix_bindmount_src_create_race
Fix bindmount autocreate race
Upstream-commit: cfc75f91ab172f7a202494880c188c7fd963997b
Component: engine
2018-07-05 20:36:49 +02:00
43a91b94e2 Merge pull request #37392 from thaJeztah/bump_fsnotify
update fsnotify to v1.4.7
Upstream-commit: e9c043517889accd19dd426d9f4aadaa18190896
Component: engine
2018-07-05 10:50:25 -07:00
33125af849 Merge component 'engine' from git@github.com:docker/engine master 2018-07-05 17:07:30 +00:00
06dc7cf0b2 Merge component 'cli' from git@github.com:docker/cli master 2018-07-05 16:41:46 +00:00
301034f108 The output of plugin list command is sorted by plugin name
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 26151d910a
Component: cli
2018-07-05 12:35:53 -04:00
b0a8f8763d Add /proc/acpi to masked paths
The deafult OCI linux spec in oci/defaults{_linux}.go in Docker/Moby
from 1.11 to current upstream master does not block /proc/acpi pathnames
allowing attackers to modify host's hardware like enabling/disabling
bluetooth or turning up/down keyboard brightness. SELinux prevents all
of this if enabled.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 569b9702a59804617e1cd3611fbbe953e4247b3e
Component: engine
2018-07-05 17:39:52 +02:00
8a5048081a Removed the "-i -t" arguments from the smoke test calling printf (these flags seem not really needed, and break jenkins builds with error "the input device is not a TTY")
Signed-off-by: Mickaël Remars <github@remars.com>
Upstream-commit: 2137e866b98d29f6a96df8a61c49f25a3ea2cb0d
Component: engine
2018-07-05 17:29:17 +02:00
aaa1925293 Merge pull request #37393 from mykeul/master
Added "--no-cache" to apk call to reduce alpine base image by 10-12% …
Upstream-commit: 06dee4cc27a1e5db75f2cdbcdcb7f762641b57d3
Component: engine
2018-07-05 15:06:21 +02:00
7340763295 Merge pull request #37388 from ianre657/patch-1
add vim-plug setting
Upstream-commit: 65dce935a66de6894b9877b63ce2276eb681ba81
Component: engine
2018-07-05 14:50:28 +02:00
cb25218045 Merge pull request #37380 from yui-knk/update_doc_Detect
Update documents of `Detect`
Upstream-commit: 8d56fa0bb780beb7b7116a8a17771179074408ea
Component: engine
2018-07-05 14:49:18 +02:00
9d7371b15c Adding support of the long syntax publish notation
Signed-off-by: Sami Tabet <salph.tabet@gmail.com>
Upstream-commit: 29612ccefe
Component: cli
2018-07-05 00:33:13 +02:00
d5f0e16922 Replaced "--update-cache" argument with "--no-cache" in apk call to reduce alpine base image by 10-12% (avoid useless indexes in /var/cache/apk)
Signed-off-by: Mickaël Remars <github@remars.com>
Upstream-commit: e72047a37586f5a929aaec0b8c73863d7209904b
Component: engine
2018-07-04 23:34:30 +02:00
bf53bc318d Migrate some ipcmode tests to integration
This fix migrates some ipcmode tests in integration-cli
to integration tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e0403604e26868b1546a766ab0b40b6cb1677ee6
Component: engine
2018-07-04 16:32:18 +00:00
472b9e9903 Update cloudflare/cfssl to 1.3.2
Matching the version that is used in SwarmKit

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7084487fdcfaf0fdb76a98757d49033c817c5978
Component: engine
2018-07-04 17:47:22 +02:00
086353aeec update fsnotify to v1.4.7
Fixes a possible deadlock on closing the watcher on kqueue

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9f016c0fe1cd30381805fdb225854a36a806e961
Component: engine
2018-07-04 16:58:25 +02:00
76a7769a26 Merge pull request #1163 from thaJeztah/bump_engine
bump docker and dependencies
Upstream-commit: f285fe67e9
Component: cli
2018-07-04 16:17:12 +02:00
a79f6da5b0 add vim-plug setting
this should work ( tried on my machine)

Signed-off-by: Ian Chen <ianre657@gmail.com>
Upstream-commit: a7652107189336f243e5c9a89b33a577df34fdd2
Component: engine
2018-07-04 15:54:19 +08:00
f9fb05a1c6 Bump docker and dependencies
Updates docker/docker to 1436dc8f8d0f6f60b6e335fbd918d6b22ee6574d,
matching 18.06.0-rc1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5f6d5c7328
Component: cli
2018-07-04 01:14:40 +00:00
6f30c64548 Merge pull request #37381 from tiborvass/api-platforms-as-string-for-temp
api: Change Platform field back to string (temporary workaround)
Upstream-commit: b711437bbd8596312c962d4189e9ad4d2108c2dc
Component: engine
2018-07-03 17:54:42 -07:00
32dfa10dbf Merge pull request #37385 from tonistiigi/update-buildkit
vendor: update buildkit to 9acf51e491
Upstream-commit: 4b3df087a222fa34d771137b02348c51d9e107bc
Component: engine
2018-07-03 17:33:54 -07:00
6cd83dd22a Merge component 'engine' from git@github.com:docker/engine master 2018-07-03 23:43:12 +00:00
a72fa5b176 Merge pull request #1186 from tiborvass/buildkit-envvar-zero
build: use strconv.ParseBool to parse DOCKER_BUILDKIT to allow value "0"
Upstream-commit: bded5beb78
Component: cli
2018-07-04 01:28:03 +02:00
353f747d00 Merge component 'cli' from git@github.com:docker/cli master 2018-07-03 23:18:49 +00:00
8206a70295 build: use strconv.ParseBool to parse DOCKER_BUILDKIT to allow value "0"
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 721000e6c9
Component: cli
2018-07-03 23:14:06 +00:00
106b7430c8 Merge pull request #1176 from tiborvass/buildkit-iidfile
build: --iidfile support with buildkit
Upstream-commit: 7b255e653a
Component: cli
2018-07-03 15:36:23 -07:00
6283fee6a2 api: Change Platform field back to string (temporary workaround)
This partially reverts https://github.com/moby/moby/pull/37350

Although specs.Platform is desirable in the API, there is more work
to be done on helper functions, namely containerd's platforms.Parse
that assumes the default platform of the Go runtime.

That prevents a client to use the recommended Parse function to
retrieve a specs.Platform object.

With this change, no parsing is expected from the client.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: facad557440a0c955beb615495b8d0175f25e4e3
Component: engine
2018-07-03 22:33:42 +00:00
acd7279a5e vendor: update buildkit to 9acf51e491
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6144f50e553cf268a4d27cbe774a67b6ab283423
Component: engine
2018-07-03 15:22:39 -07:00
1e9fc972c9 Merge pull request #37368 from tiborvass/buildkit-iidfile
builder: return image ID in API when using buildkit
Upstream-commit: 1da7d2eebf0a7a60ce585f89a05cebf7f631019c
Component: engine
2018-07-04 00:20:25 +02:00
642a920980 builder: do not send duplicate status for completed jobs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6f7dd9428e2134239467815c51aaab85756adb11
Component: engine
2018-07-03 14:47:38 -07:00
9a3e0745ac build: --iidfile support with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c7e85c09d2
Component: cli
2018-07-03 19:11:11 +00:00
2a9011606f builder: return image ID in API when using buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ca8022ec63a9d0e2f9660e2a3455d821abf8f517
Component: engine
2018-07-03 19:11:02 +00:00
0f426dddd4 Merge pull request #1156 from dmcgowan/fix-manifest-list-size
Fix manifest lists to always use correct size
Upstream-commit: 69e1743e3d
Component: cli
2018-07-03 11:27:19 -07:00
aa918255d9 Update moby to use scalable-lb libnetwork APIs
This patch is required for the updated version of libnetwork and entails
two minor changes.

First, it uses the new libnetwork.NetworkDeleteOptionRemoveLB option to
the network.Delete() method to automatically remove the load balancing
endpoint for ingress networks.   This allows removal of the
deleteLoadBalancerSandbox() function whose functionality is now within
libnetwork.

The second change is to allocate a load balancer endpoint IP address for
all overlay networks rather than just "ingress" and windows overlay
networks.  Swarmkit is already performing this allocation, but moby was
not making use of these IP addresses for Linux overlay networks (except
ingress).  The current version of libnetwork makes use of these IP
addresses by creating a load balancing sandbox and endpoint similar to
ingress's  for all overlay network and putting all load balancing state
for a given node in that sandbox only.  This reduces the amount of linux
kernel state required per node.

In the prior scheme, libnetwork would program each container's network
namespace with every piece of load balancing state for every other
container that shared *any* network with the first container.  This
meant that the amount of kernel state on a given node scaled with the
square of the number of services in the cluster and with the square of
the number of containers per service.  With the new scheme, kernel state
at each node scales linearly with the number of services and the number
of containers per service.  This also reduces the number of system calls
required to add or remove tasks and containers.  Previously the number
of system calls required grew linearly with the number of other
tasks that shared a network with the container.  Now the number of
system calls grows linearly only with the number of networks that the
task/container is attached to.  This results in a significant
performance improvement when adding and removing services to a cluster
that already heavily loaded.

The primary disadvantage to this scheme is that it requires the
allocation of an additional IP address per node per subnet for every
node in the cluster that has a task on the given subnet.  However, as
mentioned, swarmkit is already allocating these IP addresses for every
node and they are going unused.  Future swarmkit modifications should be
examined to only allocate said IP addresses when nodes actually require
them.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: 8e0f6bc90351525f3e52f3bc357378fcccccdd27
Component: engine
2018-07-03 13:46:33 -04:00
fddf778dd0 bump libnetwork to b0186632
Bump libnetwork to b0186632522c68f4e1222c4f6d7dbe518882024f.   This
includes the following changes:
 * Dockerize protocol buffer generation and update (78d9390a..e12dd44c)
 * Use new plugin interfaces provided by plugin pkg (be94e134)
 * Improve linux load-balancing scalability (5111c24e..366b9110)

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: 92335eaef12fb0fb86e5e7503f88b8873a9fa973
Component: engine
2018-07-03 13:46:19 -04:00
5f211d1a2a Merge pull request #37242 from nvcastet/fix_sys_nice_seccomp
Whitelist syscalls linked to CAP_SYS_NICE in default seccomp profile
Upstream-commit: 6273dffbda8928327e8576dc58639edc09fd9c09
Component: engine
2018-07-03 19:23:07 +02:00
ff4ddbf44b Merge pull request #37371 from ctelfer/bump-libnw-430c00a
bump libnetwork to 430c00a
Upstream-commit: dca4cab55d501949b71c58cbd76452e6acfa9243
Component: engine
2018-07-03 19:09:41 +02:00
49fe8b5ca2 Merge component 'engine' from git@github.com:docker/engine master 2018-07-03 17:08:04 +00:00
02405253ed Merge pull request #37379 from yui-knk/fix_add_command_doc
Update documents of `dispatchAdd`
Upstream-commit: e54bbc0326608ee07c30062c24ebe7dc337407e1
Component: engine
2018-07-03 08:37:57 +02:00
065257683f Adds a few more names to the name generator.
Signed-off-by: Debayan De <debayande@users.noreply.github.com>
Upstream-commit: 9d61eee75a3681fdff7f0c7e3232f4ccd3dfcaf6
Component: engine
2018-07-03 02:12:46 +01:00
86e2e9ef1f Propagate the provided external CA certificate to the external CA object
in swarm.

Also, fix some CLI command confusions:
1. If the --external-ca flag is provided, require a --ca-cert flag as well, otherwise
   the external CA is set but the CA certificate is actually rotated to an internal
   cert
2. If a --ca-cert flag is provided, require a --ca-key or --external-ca flag be
   provided as well, otherwise either the server will say that the request is
   invalid, or if there was previously an external CA corresponding to the cert, it
   will succeed.  While that works, it's better to require the user to explicitly
   set all the parameters of the new desired root CA.

This also changes the `swarm update` function to set the external CA's CACert field,
which while not strictly necessary, makes the CA list more explicit.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 4243440e1f
Component: cli
2018-07-02 17:14:21 -07:00
b6f10654ea Update documents of Detect
By 0296797f0f39477d675128c93c1646b3186937ee, `progressReader`
and `remoteURL` were removed from arguments. So developers who
use `Detect` not need to care about when `ProgressReaderFunc`
is used.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: 0bbd476ceb8da679f818df529cc917ec807a16af
Component: engine
2018-07-03 09:13:25 +09:00
bd47f635c0 Update documents of dispatchAdd
`ADD` does not support git.

Ref: https://github.com/moby/moby/issues/14704#issuecomment-298134333

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: 9b374801ac843c3401bfb21d8fd5e205d0bba0d3
Component: engine
2018-07-03 08:51:07 +09:00
b8a63a0fab Fix bindmount autocreate race
When using the mounts API, bind mounts are not supposed to be
automatically created.

Before this patch there is a race condition between valiating that a
bind path exists and then actually setting up the bind mount where the
bind path may exist during validation but was removed during mountpooint
setup.

This adds a field to the mountpoint struct to ensure that binds created
over the mounts API are not accidentally created.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1caeb79963d3c9f770b23be2f12c584adf49538d
Component: engine
2018-07-02 13:42:33 -07:00
874373ffa1 Merge component 'engine' from git@github.com:docker/engine master 2018-07-02 17:07:15 +00:00
98b57eb113 Merge component 'cli' from git@github.com:docker/cli master 2018-07-02 16:41:41 +00:00
58cb4233e4 Merge pull request #1175 from vdemeester/bump-k8s
Bump kubernetes dependencies to 1.8.14
Upstream-commit: f5393c904a
Component: cli
2018-07-02 17:12:35 +02:00
f3c0910062 Bump kubernetes dependencies to 1.8.14
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b59c41b2a7
Component: cli
2018-07-02 16:32:07 +02:00
13348b3c97 Merge pull request #1172 from vdemeester/no-need-to-check-files
Remove composefiles length check on k8s RunDeploy
Upstream-commit: 95a9b4d5fe
Component: cli
2018-07-02 15:06:50 +02:00
779f6f7f88 Remove composefiles lenght check on k8s RunDeploy..
The compose file(s) are already loaded at that point.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 847e0c22d4
Component: cli
2018-07-02 15:00:19 +02:00
a01b362aaa Merge pull request #1171 from silvin-lubecki/fix-doc-typo
Fix Format example typo"
Upstream-commit: a2b4d30cd0
Component: cli
2018-07-02 14:47:39 +02:00
a7495f07aa Merge pull request #37359 from dmcgowan/register-oci-mediatypes
Register OCI media types
Upstream-commit: b0e6eedcf4252d56e62fc3de6de5d01e75a3dc44
Component: engine
2018-07-02 14:26:36 +02:00
15af5c3d50 Fixing issue #1167 "Format example typo"
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: d0ddf91539
Component: cli
2018-07-02 14:21:10 +02:00
d6559c14df Merge pull request #1170 from vdemeester/omit-silvin
Add omitempty on compose config top-level types
Upstream-commit: 18091ea7e2
Component: cli
2018-07-02 14:16:53 +02:00
8d5faaab34 Add omitempty on compose config top-level types
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f05ab2b1fb
Component: cli
2018-07-02 12:04:09 +02:00
88306c7201 Merge pull request #1169 from silvin-lubecki/schema-vendoring
Add a doc.go file so the compose/schema/data directory can be vendore…
Upstream-commit: 981c099b96
Component: cli
2018-07-02 10:47:25 +02:00
f23d411358 Merge pull request #1168 from vdemeester/update-testing
Update TESTING.md to replace testify by gotest.tools
Upstream-commit: 1c69e83034
Component: cli
2018-07-02 10:34:28 +02:00
dbc964790c Add a doc.go file so the compose/schema/data directory can be vendored in another project, without being pruned.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 3a8ef767f8
Component: cli
2018-07-02 10:08:25 +02:00
82ffaa807c Merge pull request #1160 from euank/simpler-pass
config/credentials: don't run 'pass' to detect it
Upstream-commit: 9e36ff4491
Component: cli
2018-07-02 09:40:47 +02:00
2d117d02fc Update TESTING.md to replace testify by gotest.tools
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 057bf6f4d1
Component: cli
2018-07-02 09:24:28 +02:00
2769003cb5 add test for zero length variable name
parsing an environment file should give an error in case a zero-length
variable name (definition w/o a variable name) is encountered.

previously these lines went through unnoticed not informing the user about
a potential configuration error.

Signed-off-by: Tom Klingenberg <tklingenberg@lastflood.net>
Upstream-commit: b91fd12996
Component: cli
2018-07-02 07:52:02 +02:00
ee0fc93fa0 import environment variables that are present
previously docker did import environment variables if they were present
but created them if they were not when it was asked via a --env-file
cli option to import but not create them.

fix is to only import the variable into the environment if it is present.

additionally do not import variable names of zero-length (which are lines
w/ a potential variable definition w/o a variable name).

refs:

- https://github.com/docker/for-linux/issues/284

Signed-off-by: Tom Klingenberg <tklingenberg@lastflood.net>
Upstream-commit: 96c026eb30
Component: cli
2018-07-02 07:37:12 +02:00
3e179a0b6f add test for undefined variable environment file import
test to show current behavior is wrong at parsing an environment file
defining an undefined variable - it must not be defined!

NOTE: this test assume the $HOME variable is always set (see POSIX, this
      normally is the case, e.g. the test suite remains stable).

Signed-off-by: Tom Klingenberg <tklingenberg@lastflood.net>
Upstream-commit: 1e89745704
Component: cli
2018-07-02 07:33:44 +02:00
a72ff16223 Merge component 'engine' from git@github.com:docker/engine master 2018-06-30 17:07:08 +00:00
0be5385ac6 Merge component 'cli' from git@github.com:docker/cli master 2018-06-30 16:41:41 +00:00
05cd9e777a Merge pull request #37374 from haikuoliu/branch_endpoint
Pass endpoint to the CloudWatch Logs logging driver
Upstream-commit: 8d1b280a2544c4692b72f80a4265102e111743a4
Component: engine
2018-06-30 11:22:55 +02:00
08169a61e4 Update tests w/ new libnetwork contraints
The TestDockerNetworkIPAMMultipleNetworks test allocates several
networks simultaneously with overlapping IP addresses.  Libnetwork now
forbids this.  Adjust the test case to use distinct IP ranges for the
networks it creates.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: efb7909befa0fe2236148543a6d50e2563bf386c
Component: engine
2018-06-29 15:15:52 -04:00
449c60abf1 Merge pull request #1157 from AzureCR/master
Updated the go-winio library to release 0.4.8 that has the fix for Windows Container
Upstream-commit: 34ba66b0c5
Component: cli
2018-06-29 21:11:53 +02:00
a4509c02c7 config/credentials: don't run 'pass' to detect it
'CheckInitialized' in the credential-helper library actually invokes
`pass`, which isn't desirable (see #699).

This moves the check to be simpler, and then pass will only be invoked
when it's needed (such as for `docker login` or when pulling from a
private registry).

This logic could also reasonably live in the credential-helper library,
but it's simple enough it seems fine in either location.

Signed-off-by: Euan Kemp <euank@euank.com>
Upstream-commit: 056015c3d8
Component: cli
2018-06-29 11:38:39 -07:00
2e315f18e1 Pass endpoint to the CloudWatch Logs logging driver
Signed-off-by: haikuoliu <haikuo@amazon.com>
Upstream-commit: 998478d369ad3784c3cd28038d836c3c94b16936
Component: engine
2018-06-29 11:27:37 -07:00
00a2e2286e Updated the go-winio library to release 0.4.8 that has the fix for Windows containers
Signed-off-by: Tejaswini Duggaraju <naduggar@microsoft.com>
Upstream-commit: c98c4080a3
Component: cli
2018-06-29 10:49:52 -07:00
2e0dedd096 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-06-29 17:08:25 +00:00
05e8c9ea29 Merge component 'engine' from git@github.com:docker/engine master 2018-06-29 17:08:17 +00:00
e74f89f95a Merge component 'cli' from git@github.com:docker/cli master 2018-06-29 16:41:45 +00:00
5ed5d1d659 Merge pull request #37369 from johnstep/update-windows-manifest-sorting
LCOW: Prefer Windows over Linux in a manifest list
Upstream-commit: a2a3b8fe9cb8a3c9afc11ce27eadebcdb8b40ee5
Component: engine
2018-06-29 09:19:30 -07:00
871e21254e Merge pull request #1145 from Vimal-Raghubir/590-Add-missing-option
Add: Add missing option
Upstream-commit: da59ccb601
Component: cli
2018-06-29 17:16:25 +02:00
51cfb2a768 bump libnetwork to 430c00a
Bump libnetwork to 430c00a6a6b3dfdd774f21e1abd4ad6b0216c629.  This
includes the following moby-affecting changes:

 * Update vendoring for go-sockaddr (8df9f31a)
 * Fix inconsistent subnet allocation by preventing allocation of
   overlapping subnets (8579c5d2)
 * Handle IPv6 literals correctly in port bindings (474fcaf4)
 * Update vendoring for miekg/dns (8f307ac8)
 * Avoid subnet reallocation until required (9756ff7ed)
 * Bump libnetwork build to use go version 1.10.2 (603d2c1a)
 * Unwrap error type returned by PluginGetter (aacec8e1)
 * Update vendored components to match moby (d768021dd)
 * Add retry field to cluster-peers probe (dbbd06a7)
 * Fix net driver response loss on createEndpoint (1ab6e506)
   (fixes https://github.com/docker/for-linux/issues/348)

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: f155f828a26cfb3ee0dd8ca48bd2c702c9032b0b
Component: engine
2018-06-29 11:03:20 -04:00
ab5a818454 Merge pull request #37370 from albers/custom-bashrc
Re-add support for a custom .bashrc file in build env
Upstream-commit: 7f3aeb84320a90a9a83672630b75e5e962e82489
Component: engine
2018-06-29 16:37:17 +02:00
a60dc52c9f Merge pull request #1155 from adshmh/add-unit-tests-to-plugin-list
added unit tests to cover plugin list command
Upstream-commit: 9faf728089
Component: cli
2018-06-29 15:49:30 +02:00
f354e71da3 Merge pull request #1152 from vdemeester/extract-converter
Extract StackConverter from the StackClient
Upstream-commit: 7c7c299eee
Component: cli
2018-06-29 13:36:55 +02:00
adf7112b0e Re-add support for a custom .bashrc file in build env
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f2c5857612309330a559500181ce454309ae3c1c
Component: engine
2018-06-29 12:39:36 +02:00
74cbabea8f Merge pull request #1158 from albers/completion-dockerd--default-address-pool
Add bash completion for `dockerd --default-address-pool`
Upstream-commit: 3991b2fae3
Component: cli
2018-06-29 11:48:43 +02:00
90d240e1f6 Merge pull request #1159 from albers/completion-events-exec_die
Add bash completion for `exec_die` event
Upstream-commit: fe7ec42566
Component: cli
2018-06-29 11:47:58 +02:00
312f1fe0aa Add bash completion for exec_die event
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8443982188
Component: cli
2018-06-29 11:20:23 +02:00
ee38cae4b8 Add bash completion for dockerd --default-address-pool
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0e6d9dfe85
Component: cli
2018-06-29 11:11:24 +02:00
d8b529a6bf Merge pull request #37364 from thaJeztah/bump_go_winio
Update Microsoft/go-winio to 0.4.8
Upstream-commit: 26becc002c406082a29f27462d322aee1162ab22
Component: engine
2018-06-29 09:01:13 +02:00
70dcc9b7b6 LCOW: Prefer Windows over Linux in a manifest list
When a manifest list contains both Linux and Windows images, always
prefer Windows when the platform OS is unspecified. Also, filter out any
Windows images with a higher build than the host, since they cannot run.

Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: ddcdb7255d960a4b2049439245a4f887b26af891
Component: engine
2018-06-28 20:30:41 -07:00
0f65f24d01 Register OCI image media types
OCI types are backwards compatible with Docker manifest
types, however the media types must be registered.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: c4f0515837b834ec66ec463d92a32015062a0804
Component: engine
2018-06-28 18:19:15 -07:00
b02499f190 Fix manifest lists to always use correct size
Stores complete OCI descriptor instead of digest and platform
fields. This includes the size which was getting lost by not
storing the original manifest bytes.

Attempt to support existing cached files, if not output
the filename with the incorrect content.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 1fd2d66df8
Component: cli
2018-06-28 18:17:38 -07:00
e6f427396a Merge pull request #37156 from cpuguy83/networking_api_types_only
Move network conversions out of API router
Upstream-commit: d912e9460e287238f879de791595193543ab2202
Component: engine
2018-06-29 02:47:27 +02:00
51cfefca93 Merge pull request #115 from seemethere/remove
Remove Debian Jessie for arm64
Upstream-commit: 4f79760ebf3d659be670d5079574b3fc199f14a0
Component: packaging
2018-06-28 15:49:32 -07:00
b31e4cd2ef added unit tests to cover plugin list command
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: c26121df5c
Component: cli
2018-06-28 16:51:54 -04:00
0cd9d46d0f Merge component 'engine' from git@github.com:docker/engine master 2018-06-28 17:07:34 +00:00
f83b2543cd Update Microsoft/go-winio to 0.4.8
Fixes named pipe support for hyper-v isolated containers

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 74095588baa0693a2c07bd05c001c42830f82ed3
Component: engine
2018-06-28 18:55:45 +02:00
859289c11a Merge component 'cli' from git@github.com:docker/cli master 2018-06-28 16:41:43 +00:00
06b2959259 Merge pull request #1154 from thaJeztah/bump_version_18.07_dev
Bump version to 18.07.0-dev
Upstream-commit: ea65e9043c
Component: cli
2018-06-28 16:24:08 +02:00
db488c0706 Remove Debian Jessie for arm64
It's not longer supported since Debian Jessie is now an LTS release as
of June 17, 2018. LTS releases of Debian only support i386, amd64, armel and armhf

Sources:
* https://wiki.debian.org/LTS
* https://wiki.debian.org/LTS/FAQ

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 24f8b422aaed0fba9d0f03bfd5b99c58f0d7f30d
Component: packaging
2018-06-28 13:46:30 +00:00
644d6fd60f Bump version to 18.07.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f1fa1f3f15
Component: cli
2018-06-28 15:44:15 +02:00
4efabde589 Merge pull request #1151 from vdemeester/update-docker-credential-helper-pass
Update docker-credential-helpers dependency
Upstream-commit: 293553944d
Component: cli
2018-06-28 14:57:05 +02:00
539051208f Update docker-credential-helpers dependency
This is mainly for the `pass` helper ; `pass` shouldn't be called
every docker command anymore ;).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d9741fc96b
Component: cli
2018-06-28 14:44:53 +02:00
b3ce456eca Merge pull request #37356 from Microsoft/jjh/new37316
LCOW: lazycontext: Use correct lstat, fix archive check
Upstream-commit: 1d7132e3d2d91168153db529b8900fb6e53aea92
Component: engine
2018-06-28 12:32:31 +02:00
23acff6a45 Merge pull request #1149 from adshmh/add-unit-tests-to-plugin-install
added unit tests covering content trust for plugin install command
Upstream-commit: b21f9dde61
Component: cli
2018-06-28 09:28:18 +02:00
270889f2c3 Bump version to 18.07.0-ce-dev
Signed-off-by: GordonTheTurtle <engine-team@docker.com>
2018-06-28 04:04:41 +00:00
b13ea5551c Merge component 'engine' from git@github.com:docker/engine master 2018-06-28 03:56:28 +00:00
2ae84e99a1 Merge pull request #37357 from dmcgowan/update-containerd-1.1.1-rc.2
Update containerd to v1.1.1-rc.2
Upstream-commit: 37079d66c65d78da66b963315c9102ce67a1d685
Component: engine
2018-06-28 12:41:05 +09:00
3f6be54aa7 Merge component 'engine' from git@github.com:docker/engine master 2018-06-28 02:53:18 +00:00
b30a6b365b Merge pull request #37350 from tonistiigi/platform-support
Fix platform struct passing
Upstream-commit: 1436dc8f8d0f6f60b6e335fbd918d6b22ee6574d
Component: engine
2018-06-27 19:23:27 -07:00
efa9f9914b added unit tests covering content trust for plugin install command
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: bc9b42ea9b
Component: cli
2018-06-27 22:16:19 -04:00
d86ac0bd5d Move network conversions out of API router
This stuff doesn't belong here and is causing imports of libnetwork into
the router, which is not what we want.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c0bc14e8dd5a31f5edc804e9a1347bb3eb44483e
Component: engine
2018-06-27 17:11:29 -07:00
1a09169ca0 distribution: remove custom matcher code
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 951faaed664dd51d2aacfdb782534f4c46bd9e23
Component: engine
2018-06-27 15:33:07 -07:00
d2c785277a system: add back lcow validation function
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f0997716651b6e6c2b07e3d514bf8452114a1433
Component: engine
2018-06-27 15:24:26 -07:00
30f83012e0 Merge pull request #37355 from tonistiigi/vendor-containerd
vendor: update containerd to 08f7ee98
Upstream-commit: 68e25cf5263c4348ac470d76d168c4878dbedf71
Component: engine
2018-06-27 15:08:22 -07:00
c377af1d4d builder: update platform support to puller
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0b50d6c315a41025de98617bd6cc79c3925838d5
Component: engine
2018-06-27 14:59:36 -07:00
b67a507422 distribution: fix passing platform struct to puller
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 337ba71fc1124603302e28d94e2f08674e31a756
Component: engine
2018-06-27 14:59:31 -07:00
052d68f05c Update containerd to v1.1.1-rc.2
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 735517928b3c0a9dabdc087b1b2f366d72df3f4e
Component: engine
2018-06-27 13:49:26 -07:00
fbe0a9291a LCOW: lazycontext: Use correct lstat, fix archive check
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a5aed699cfaa4d84b1b134033fb468b3a7a874f0
Component: engine
2018-06-27 13:29:21 -07:00
86aefcafc8 vendor: update containerd to 08f7ee98
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d66615be94d548c1d102006a477c3abbaff93274
Component: engine
2018-06-27 11:59:10 -07:00
09b295216f Merge component 'engine' from git@github.com:docker/engine master 2018-06-27 17:07:34 +00:00
9152b94149 Extract StackConverter from the StackClient
It makes it easier to get the correct stack from a compose config
struct without requiring the client (and thus talking to k8s API)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f2e6ee6899
Component: cli
2018-06-27 16:41:00 +02:00
2c564f1c70 Merge pull request #37347 from yui-knk/update_comment
Update comments about `InitRouter`
Upstream-commit: bab4c0dff73dc38d551ab1a1fdadcbd2757154e7
Component: engine
2018-06-27 13:46:24 +02:00
b383c8f747 Merge pull request #37351 from LotusFenn/unique-names-network-service-test
Use unique names in integration/network/service_test.go
Upstream-commit: 8f709d894811ec22b621a77fcc0e69476318d7f2
Component: engine
2018-06-27 20:32:20 +09:00
434a544ab5 Merge pull request #37298 from adshmh/refactor-network-integration-tests-service-use-network-create
integration/service/network integration tests to use network package
Upstream-commit: 408d317c6008e3d81912a81c3ea96d3f606cf210
Component: engine
2018-06-27 11:43:04 +02:00
bc8dee16e5 add unique names to integration/network/service_test.go
Signed-off-by: Lotus Fenn <fenn.lotus@gmail.com>
Upstream-commit: f94c97d3200ec11762fc3fb3c2eafd5866ffa976
Component: engine
2018-06-27 00:56:52 -07:00
28ca1b95b2 api: fix platform type
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 81f862a1fe6f24fea70b1278a4292eefc4029a03
Component: engine
2018-06-26 22:59:17 -07:00
23cd5508d9 builder: buildkit rebase update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 48b93419dcc3dc71584d674f045c30793b890395
Component: engine
2018-06-26 22:59:17 -07:00
ebe6026bac vendor: update buildkit to cce2080ddb
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 360d2f2ce7cba28fc5427bc346ea37aee7fe78f6
Component: engine
2018-06-26 22:58:59 -07:00
5be6ded435 Add: Add missing option
Signed-off-by: Vimal-Raghubir <vraghubir0418@gmail.com>
Upstream-commit: a205aecb80
Component: cli
2018-06-26 22:20:01 -04:00
f402d858a8 Update comments about InitRouter
This is a follow-up of commit 408c7ad (PR: #32453)

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: dbd4c290b7029d31fa69c906a8da864589f19e09
Component: engine
2018-06-27 09:45:06 +09:00
840124a196 refactored integration/service/network integration tests to use network package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 8b07ec58ea5792f906c006edc5db9f37c7a570de
Component: engine
2018-06-26 17:18:22 -04:00
0c25b296c2 Initial support for OCI multi-platform image
Add the OCI spec compatible image support in client side.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 7f334d3acfd7bfde900e16e393662587b9ff74a1
Component: engine
2018-06-26 11:39:29 -07:00
758ffaf745 LCOW: Auto-select OS
Signed-off-by: John Howard <jhoward@microsoft.com>

Addresses https://github.com/moby/moby/pull/35089#issuecomment-367802698.
This change enables the daemon to automatically select an image under LCOW
that can be used if the API doesn't specify an explicit platform.

For example:

FROM supertest2014/nyan
ADD Dockerfile /

And docker build . will download the linux image (not a multi-manifest image)

And similarly docker pull ubuntu will match linux/amd64
Upstream-commit: 35193c0e7dc301e1d2f6ea96e0ce34ffd2d4b88d
Component: engine
2018-06-26 11:37:43 -07:00
8a582e89b4 Merge component 'engine' from git@github.com:docker/engine master 2018-06-26 17:08:50 +00:00
fb5a734916 Merge component 'cli' from git@github.com:docker/cli master 2018-06-26 16:41:52 +00:00
d11d5a93ae Merge pull request #1128 from vdemeester/interpolation-options
Add options to the compose loader
Upstream-commit: 204ab4ca74
Component: cli
2018-06-26 15:05:54 +02:00
06ae3da352 Merge pull request #1147 from vdemeester/stack-refactoring
Refactor `stack` command/package
Upstream-commit: ae1618713f
Component: cli
2018-06-26 15:00:17 +02:00
1821b4879d Refactor stack command/package
- Handle `bundlefile` directly in the `top-level`
  command. `bundlefile` is still experimental and will be deprecated
  in future version — this should make be easier to remove it.
- Validate the `stack` name in all cases (i.e. whatever the
  orchestrator is used)
- Load the composefile ahead of choosing the orchestrator. This
  removes some slight duplication.
- Makes `RunDeploy` easier to use from outside packages (like
  `docker/app`) with a preloaded configuration.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0f9d24f78d
Component: cli
2018-06-26 14:07:26 +02:00
f0140f8d7c Merge pull request #37249 from AntaresS/add-test-guidline
add integration test guidelines
Upstream-commit: 8e610b2b55bfd1bfa9436ab110d311f5e8a74dcb
Component: engine
2018-06-25 20:44:42 +02:00
0278df1cff add integration test guidelines
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 2d5ea98b2c2223e97627aa0d03e68c3f84e3b662
Component: engine
2018-06-25 11:40:11 -07:00
c7d47a1863 Merge pull request #37301 from Mischi/fix-define-self
fix build on OpenBSD by defining Self()
Upstream-commit: cb37987ee11655ed6bbef663d245e55922354c68
Component: engine
2018-06-25 20:25:38 +02:00
74bdba8ede Merge component 'engine' from git@github.com:docker/engine master 2018-06-25 17:06:40 +00:00
1bace24aa7 Merge component 'cli' from git@github.com:docker/cli master 2018-06-25 16:41:38 +00:00
e9bc5ab185 Add options to the compose loader
- Add the possibility to skip interpolation
- Add the possibility to skip schema validation
- Allow customizing the substitution function, to add special cases.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9fdd14f399
Component: cli
2018-06-25 17:15:26 +02:00
fad2548681 Merge pull request #1138 from seemethere/env_experimental
Add env variable option for experimental
Upstream-commit: 61e53fc88a
Component: cli
2018-06-25 14:47:16 +02:00
23a1760da3 Make test-e2e run against experimental and non-experimental daemon
- `make test-e2e` runs the e2e tests twice : once against on
  non-experimental daemon (as before), once against an experimental
  daemon.
- adds `test-e2e-experimental` and `test-e2e-non-experimental` target
  to run tests for the specified cases

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a522a78231
Component: cli
2018-06-25 11:46:35 +02:00
bf5bb2a31e Import TestBuildIidFileSquash from moby to cli
It's a cli only feature so the test belongs to the cli.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0e83042e54
Component: cli
2018-06-25 11:44:09 +02:00
dcf4767db4 Merge pull request #1129 from vdemeester/init-in-composefile
Add `init` support in 3.7 schema
Upstream-commit: 0f6936d557
Component: cli
2018-06-25 11:18:20 +02:00
bd5f8ff9d8 Refactor tests
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 38056740d6
Component: cli
2018-06-25 11:13:32 +02:00
ee21c8c224 Add init support in 3.7 schema
> Run an init inside the container that forwards signals and reaps
  processes

This is supported on `run` and now on Swarm services too, so it's also
possible to have in on a composefile :).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cc26da94ed
Component: cli
2018-06-25 11:13:32 +02:00
c882d0eb09 Merge pull request #1126 from vdemeester/extra-extras
Add an `Extras` field on the compose config types.
Upstream-commit: e529043c51
Component: cli
2018-06-25 10:58:50 +02:00
27e77fdcd7 Add an Extras field on the compose config types.
That field is automaticaly populated with any `x-*` field in the yaml.
And marshalling the compose config struct put them back into place.

This make it possible to get those extra fields without re-inventing
the wheel (i.e. reimplementing 80% of the `cli/compose/*` packages.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 80c26f618e
Component: cli
2018-06-25 10:51:56 +02:00
135541dc2f Merge pull request #37337 from yongtang/37331-follow-up
Fix a small spacing issue
Upstream-commit: fda9397826dcb51b4e2fdc4bc1f8ce61fba7d884
Component: engine
2018-06-25 09:24:23 +02:00
138db9c689 Add env variable option for experimental
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: e3bb62ed51
Component: cli
2018-06-24 21:15:02 +00:00
6cedb2b4cc Fix a small spacing issue
As a follow up to https://github.com/moby/moby/pull/37331#pullrequestreview-131411625

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0ed55cd22071a9530feb2ea711cffdfa94e559d8
Component: engine
2018-06-24 17:27:50 +00:00
97928f596b Merge component 'engine' from git@github.com:docker/engine master 2018-06-24 17:07:27 +00:00
66045797ee Merge component 'cli' from git@github.com:docker/cli master 2018-06-24 16:41:54 +00:00
2bd0b7012e Merge pull request #1141 from adshmh/fix-output-leak-from-TestRunCommandWithContentTrustErrors
fixed output leak from TestRunCommandWithContentTrustErrors
Upstream-commit: 1c20e3f601
Component: cli
2018-06-24 09:20:56 +02:00
327777461f Merge pull request #37331 from MartinMuzatko/patch-1
Just satisfying my OCD - fixed comment spacing
Upstream-commit: 320e4fed2258ba9eea97f2e0b8a4e08d835bb080
Component: engine
2018-06-23 10:28:25 -07:00
4549d05aa4 Merge component 'cli' from git@github.com:docker/cli master 2018-06-23 16:42:01 +00:00
003f07b295 fixed output leak from TestRunCommandWithContentTrustErrors unit tests
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: d469cbdd14
Component: cli
2018-06-23 10:27:27 -04:00
4681fad5b4 Merge pull request #1139 from thaJeztah/add_orchestrator_warning
Warn if DOCKER_ORCHESTRATOR is still used but not DOCKER_STACK_ORCHESTRATOR
Upstream-commit: cc9495ac89
Component: cli
2018-06-23 14:33:28 +02:00
666c87bcf4 Warn if DOCKER_ORCHESTRATOR is still used but not DOCKER_STACK_ORCHESTRATOR
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e8c87f7cb3
Component: cli
2018-06-22 13:58:39 -07:00
a0daba149d Remove duplicated getOrchestrator(), and rename hideFlag()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e02c28f40a
Component: cli
2018-06-22 13:58:14 -07:00
4ba3dc6e89 Merge pull request #1137 from silvin-lubecki/stack-orchestrator
Fix broken swarm commands with Kubernetes defined as orchestrator
Upstream-commit: 151990de62
Component: cli
2018-06-22 13:56:42 -07:00
2ad83598ae Merge component 'engine' from git@github.com:docker/engine master 2018-06-22 17:04:56 +00:00
e4b46b89eb Just satisfying my OCD - fixed comment spacing and removed a hidden character
Signed-off-by: Martin Muzatko <martin@happy-css.com>
Upstream-commit: 7015fc03b72655e9484e68b4ec64b5fca80c68a0
Component: engine
2018-06-22 17:17:08 +02:00
763b3149b8 Remove shorthand -k option from docker version
The `-k` shorthand was alreaady removed from other
commands, so best to be consistent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f0a8598b8d
Component: cli
2018-06-21 23:33:55 -07:00
61fded22bf Update command usage and documentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0f07b9ffc7
Component: cli
2018-06-21 23:16:27 -07:00
a1104968c6 Remove "Stack Orchestrator" from "docker version"
The output of this information can be confusing,
so removing until we have a better design for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a63252ba71
Component: cli
2018-06-21 22:02:11 -07:00
3c9ebe0c45 Merge pull request #37293 from adshmh/migrate-TestNetworkCreateDelete-to-integration
migrate TestAPINetworkCreateDelete from integration-cli/ to integration/
Upstream-commit: af626ba08a4e11b0e140e7512ac2740b09833c29
Component: engine
2018-06-21 19:08:08 -07:00
58835a016b Merge pull request #37264 from adshmh/refactor-inspect-network-integration-tests-use-network-create
refactor network inspect integration tests to use network package
Upstream-commit: 5828df4e5fc325f872eaf33c21e28da41a3306a5
Component: engine
2018-06-21 19:01:24 -07:00
4f7a346b35 Scope orchestration selection to stack commands only
* Renaming DOCKER_ORCHESTRATOR to DOCKER_STACK_ORCHESTRATOR
* Renaming config file option "orchestrator" to "stackOrchestrator"
* "--orchestrator" flag is no more global but local to stack command and subcommands
* Cleaning all global orchestrator code
* Replicating Hidden flags in help and Supported flags from root command to stack command

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 71272dd203
Component: cli
2018-06-21 17:12:31 -07:00
053dc78e66 Merge component 'engine' from git@github.com:docker/engine master 2018-06-21 17:05:30 +00:00
28ecd8f494 refactor network inspect integration tests to use network package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: dda4128c7ea6df5565e4ad3c0f0958a0aad547da
Component: engine
2018-06-21 09:44:52 -04:00
a83c18a0ef Merge pull request #37313 from dmcgowan/fix-overlay2-changes
Update overlay2 to use naive diff for changes
Upstream-commit: 093424bec097cdf51154255226cf999d6824633b
Component: engine
2018-06-20 17:16:06 -07:00
198a405d97 Merge pull request #37285 from adshmh/refactor-macvlan-integration-tests-network-package
refactored remaining macvlan integration tests to use network package
Upstream-commit: 50f87331c6ea5c0ddb103bb8ab96ca26b87d61ef
Component: engine
2018-06-20 16:35:18 -07:00
e14292d034 Merge pull request #37304 from katakonst/fix_flacky_test_serviceget
Fix flaky test TestServiceGet
Upstream-commit: fc806236e507194289eeb6a3020580de33988a24
Component: engine
2018-06-20 16:22:14 -07:00
d5c5d1c094 refactored remaining macvlan integration tests to use network package for creating networks
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 1c923b28b81f22023ca8c562d359b9136efb93eb
Component: engine
2018-06-20 17:09:26 -04:00
dd4bb57e39 Fix flaky test TestServiceGet
Signed-off-by: Catalin Pirvu <pirvu.catalin94@gmail.com>
Upstream-commit: d6a97b188da2409f562a395e6c1656d68b161494
Component: engine
2018-06-20 22:38:29 +03:00
775daf1b72 Update overlay2 to use naive diff for changes
The archive changes function is not implemented correctly
to handle opaque directories.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: ac5d363e67e01c769b4d9e20ed76a278434ee4de
Component: engine
2018-06-20 11:07:36 -07:00
a7152c82de Merge component 'engine' from git@github.com:docker/engine master 2018-06-20 17:07:57 +00:00
89094a295b Merge pull request #37315 from thaJeztah/fix_TestDaemonNoSpaceLeftOnDeviceError
Fix TestDaemonNoSpaceLeftOnDeviceError
Upstream-commit: 62c6a8f8e5a4d412730af3499c69ac997ab0f4f2
Component: engine
2018-06-20 08:49:12 -07:00
b71fba1e62 Merge pull request #37312 from thaJeztah/update_containerd_1.1.1.rc1
Update to containerd v1.1.1-rc.1
Upstream-commit: b29a0ab45d5690f88d244333973959d8e680f820
Component: engine
2018-06-20 08:06:15 -07:00
825dbb0803 Whitelist syscalls linked to CAP_SYS_NICE in default seccomp profile
* Update profile to match docker documentation at
  https://docs.docker.com/engine/security/seccomp/

Signed-off-by: Nicolas V Castet <nvcastet@us.ibm.com>
Upstream-commit: 47dfff68e4365668279e235bf8c7778b637f2517
Component: engine
2018-06-20 07:32:08 -05:00
480ebf9169 Merge pull request #37294 from jstarks/lcow_caps
lcow: Allow the client to adjust capabilities and device cgroup rules
Upstream-commit: e2593239d949eee454935daea7a5fe025477322f
Component: engine
2018-06-19 22:14:07 -07:00
b774296769 Merge pull request #37244 from adshmh/refactor-ipvlan-network-integration-tests-use-network-create
Refactor ipvlan network integration tests to use network package
Upstream-commit: 3dfb26ab3cbf961298f8ce3f94659b5fe4146ceb
Component: engine
2018-06-19 17:25:08 -07:00
e1cb6f43e5 Fix TestDaemonNoSpaceLeftOnDeviceError
This test is testing if any "no space left on device" errors
that occur during `docker pull` will not be masked by other
errors. To test for this, a new loopback-device was created,
and used as `--data-dir` ("/var/lib/docker").

However, `/var/lib/docker` is used for storing various
other things, including a `cache.db` database, used by
BuildKit, which is created during startup of the daemon.
Creation of that file failed (due to `--data-dir` path
being on a mount with limited size), which caused daemon
start to fail before the test was able to run.

This patch changes the size-limited mount to be used for
the storage-driver directory only, so that the test is
not affected by other parts of the code attempting to
write files in it.

To have a predictable path; the daemon used in this test
is configured to use the `vfs` storage-driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 754aeb28fdb9dd3aafb7705224e57f28281db264
Component: engine
2018-06-19 16:14:12 -07:00
d6e8349fd4 Update to containerd v1.1.1-rc.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 83ec91a530f3884e685c197e60091c210162f02a
Component: engine
2018-06-19 10:55:53 -07:00
3863dd030a Merge component 'engine' from git@github.com:docker/engine master 2018-06-17 17:06:53 +00:00
c62d7149f1 fix build on OpenBSD by defining Self()
Signed-off-by: Fabian Raetz <fabian.raetz@gmail.com>
Upstream-commit: 21537b818de5e4167c5a3856c25b9b06cf16d87d
Component: engine
2018-06-16 19:09:04 +02:00
f8d73bea7c refactor ipvlan network integration tests to use network.Create
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 6fc9c7e5a9af409da932dfcd0847eaaf0e583111
Component: engine
2018-06-16 05:11:35 -04:00
3ead1493a1 Merge pull request #37295 from Benjamin28/master
Updated path to be consistent w/ current Windows build process
Upstream-commit: de0abf4315fd1d737aedc2e9f410c8125ad1a7fc
Component: engine
2018-06-15 18:09:03 -07:00
4ff27dc23c Merge component 'engine' from git@github.com:docker/engine master 2018-06-16 00:01:02 +00:00
5379f9201a Merge pull request #37292 from seemethere/runc
Fix compilation on 32bit machines
Upstream-commit: 59469c63dfe351eacd29a57e84abf8ee5eeb5948
Component: engine
2018-06-15 16:30:08 -07:00
92efea70f8 lcow: Allow the client to add device cgroup rules
Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: e9268d96420227550998212789f7058afc297de9
Component: engine
2018-06-15 16:14:17 -07:00
ccb4f79c21 lcow: Allow the client to add or remove capabilities
Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 349aeeab7c5e878ddc6c0c95a0a937476816c43e
Component: engine
2018-06-15 16:03:33 -07:00
330d020ac3 Updated path to be consistent w/ current Windows build process
Signed-off-by: Benjamin Baker <Benjamin.baker@utexas.edu>
Upstream-commit: 5122aaf26fdbb68e02cd31baf4a172f1210e49b5
Component: engine
2018-06-15 19:02:53 -04:00
4abb04c090 Fix compilation on 32 bit systems
* Update runc commit to ad0f525
* Update buildkit to dbf67a6

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c5ce4cf654b6cd6402957bd7c7570dd4fac1b902
Component: engine
2018-06-15 20:41:03 +00:00
79590fda36 migrate TestAPINetworkCreateDelete from integration-cli/ to integration/
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: f5426214295cb59d54ece5a24d4720e31947981b
Component: engine
2018-06-15 16:06:45 -04:00
7626935df5 Merge component 'cli' from git@github.com:docker/cli master 2018-06-15 16:41:43 +00:00
389a1f2402 Merge pull request #1112 from n4ss/fix-trust-signer-remove
Fix docker trust signer removal
Upstream-commit: 8de0753869
Component: cli
2018-06-15 08:18:29 -07:00
45bbf6eb63 Merge component 'engine' from git@github.com:docker/engine master 2018-06-14 17:07:17 +00:00
62a6d5e50f Merge component 'cli' from git@github.com:docker/cli master 2018-06-14 16:41:40 +00:00
ff053f79c8 Merge pull request #1124 from vdemeester/using-cli-interface-everywhere-possible
Use command.Cli interface instead of concrete type…
Upstream-commit: 805b34127a
Component: cli
2018-06-14 16:43:15 +02:00
453dd51bfc Merge pull request #1123 from vdemeester/export-save-push
Export Push and Save
Upstream-commit: 449f0c067d
Component: cli
2018-06-14 07:37:59 -07:00
ea955bc056 Use command.Cli interface instead of concrete type…
… wherever it's possible. Should make it even easier to test and use
another implementation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 88068b9dd7
Component: cli
2018-06-14 16:26:47 +02:00
bc1f18ae47 Export Push and Save
As we did for `Pull`, it will be helpful to expose the push and save
implementation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e43c7920ea
Component: cli
2018-06-14 15:48:21 +02:00
8be83cb75e Merge pull request #479 from Tim15/init-option
Add --init option to `docker service create`
Upstream-commit: 70db8dee74
Component: cli
2018-06-14 13:58:52 +02:00
ea934f5313 Add --init option to docker service create
Signed-off-by: Timothy Higinbottom <timhigins@gmail.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ff13f03def
Component: cli
2018-06-14 13:50:12 +02:00
1c5329a0c5 Merge pull request #37279 from adshmh/refactor-service-create-integration-tests-use-network-create
Create service integration tests use network package
Upstream-commit: 3f405c48fff297ae6ddeed58363b904d2d8e94f9
Component: engine
2018-06-14 12:57:48 +02:00
004c784b07 Merge pull request #1122 from thaJeztah/bump_golang_1.10.3
Bump Golang to 1.10.3
Upstream-commit: 722d08f076
Component: cli
2018-06-14 08:30:15 +02:00
a21fe6fe56 Merge pull request #37280 from Microsoft/jjh/fixbuildersources
Don't fail to start daemon if builder source is not available
Upstream-commit: d17b78bdfeceeedcc6addc470215d11b4f870960
Component: engine
2018-06-13 22:29:08 -07:00
09a8e539ea Merge component 'engine' from git@github.com:docker/engine master 2018-06-14 01:48:21 +00:00
ffb8cc81e3 Merge component 'cli' from git@github.com:docker/cli master 2018-06-14 01:24:28 +00:00
a3010b79b8 Merge pull request #1111 from tiborvass/experimental-buildkit
Support for experimental BuildKit
Upstream-commit: 2daec78609
Component: cli
2018-06-13 18:21:41 -07:00
d94fa1b676 build: address some review nits
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b3a5c153d5
Component: cli
2018-06-13 22:40:31 +00:00
9bd0104a83 build: change --no-console to --console=[true|false|auto]
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5a103e1844
Component: cli
2018-06-13 21:07:11 +00:00
a53be8bf33 Merge pull request #37270 from adshmh/refactor-service-network-integration-tests-use-network-create
refactored service network integration tests to use the network package
Upstream-commit: d3d58b68c628edd138f3956614bffccfe81814a4
Component: engine
2018-06-13 13:11:31 -07:00
1eb0321c55 Merge pull request #37276 from yui-knk/fix_anchor
Fix link anchors in CONTRIBUTING.md
Upstream-commit: 64b4936ca9e13d6e3c1327bf3145eadc258c556c
Component: engine
2018-06-13 13:09:59 -07:00
d2ef5d2bef build: ensure temporary folder is removed in error case
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 00792d1704
Component: cli
2018-06-13 18:32:29 +00:00
b8a5c63caf vendor: update docker/docker to c752b0991e31ba9869ab6a0661af57e9423874fb
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 6c60bb4436
Component: cli
2018-06-13 18:32:29 +00:00
93d874bdbf vendor: update buildkit and fsutil
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8945270cba
Component: cli
2018-06-13 18:32:29 +00:00
fe7ea0fc10 build: skip moby.buildkit.trace Aux message to be future proof
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: aef42093b8
Component: cli
2018-06-13 18:32:28 +00:00
a8a3e02093 build: fix lint issues + refactor
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5919e8a30f
Component: cli
2018-06-13 18:32:28 +00:00
61312d5fa4 build: simplify Close logic in WriteTempDockerfile
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 15674d9ee9
Component: cli
2018-06-13 18:32:28 +00:00
bba5c7c5cf build: add experimental --no-console flag to support non-tty human-readable output with buildkit
Unfortunately, this is for now the only way to see the output of RUN commands when using buildkit.
It is equivalent to `DOCKER_BUILDKIT=1 docker build . 2>&1 | cat`

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ed75f6202b
Component: cli
2018-06-13 18:32:28 +00:00
58b5fdcfda formatter: fix TestDiskUsageContextFormatWrite expected output
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 584d59d8f5
Component: cli
2018-06-13 18:32:28 +00:00
67e3360010 build: setting DOCKER_BUILDKIT environment variable to any non-empty string enables the use of buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b2b3f9c461
Component: cli
2018-06-13 18:32:28 +00:00
278bdeaf9d build: fix output handling with buildkit (quiet option, redirects)
With this patch the following become true even with buildkit enabled:
1. `docker build -q .` only outputs the created image's sha256 ID.
2. `docker build -q .` outputs as if no `-q` was specified, if error occurred
3. `docker build . &> out` outputs JSON (instead of TTY characters)

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 640cbb8d2f
Component: cli
2018-06-13 18:32:28 +00:00
250764fab8 build: fix -f handling with buildkit
This commit brings a more pedantic change in the following ambiguous case:
cat Dockerfile | docker build -f otherDockerfile -

The legacy builder does not error out and prefers the Dockerfile from stdin
while the buildkit-based one errors out.

Note that this is only in the case where stdin is a Dockerfile (not an archive)

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 82f0e1e5d8
Component: cli
2018-06-13 18:32:28 +00:00
39057b0c96 Merge component 'engine' from git@github.com:docker/engine master 2018-06-13 17:07:06 +00:00
89a8d08125 Don't fail to start daemon if builder source is not available
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ca3e3fcf7e66554d20acd990a506d6ee5e368ca1
Component: engine
2018-06-13 09:33:19 -07:00
7cdcffc8da create service integration tests use network package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: ad46a1f5e7e82b882390c2974a52faa06c5b8cb2
Component: engine
2018-06-13 12:10:02 -04:00
2d48a7f46a Merge pull request #37243 from vdemeester/gotestyourself-with-tools
Update gotestyourself to gotest.tools
Upstream-commit: 692df4699c3dcbe4645e9b90cc40091b1f2519d4
Component: engine
2018-06-13 16:23:26 +02:00
2e5e9bbe35 Fix link anchors in CONTRIBUTING.md
This is a follow up of #35168.

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: 7b3966245de27b753c6acfe0347833811ed9eed8
Component: engine
2018-06-13 21:58:48 +09:00
4cadaa03f8 Update tests to use gotest.tools 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 38457285242e57306c5b7ee652c7ccbb9fbd6713
Component: engine
2018-06-13 09:04:30 +02:00
9b920fd3e1 Replace gotestyourself by gotest.tools
github.com/gotestyourself/gotestyourself moved to gotest.tools with
version 2.0.0. Moving to that one, bumping it to v2.1.0.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c147e9e1a45b1c66bc5773814b53bcd27132557c
Component: engine
2018-06-13 09:04:03 +02:00
e027a9c59e Merge pull request #37151 from tonistiigi/experimental-buildkit
Experimental BuildKit support
Upstream-commit: c752b0991e31ba9869ab6a0661af57e9423874fb
Component: engine
2018-06-12 13:31:48 -07:00
2ba3b58b47 refactored network integration tests under integration/network/service_test.go to use network package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 694047183a9f72b3b2b45ef09f27dc0776fa3e10
Component: engine
2018-06-12 14:31:01 -04:00
ccbd518d6d Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-06-12 17:07:18 +00:00
97861a230a Merge component 'engine' from git@github.com:docker/engine master 2018-06-12 17:07:10 +00:00
80b3ed5123 Fix mapping a range of host ports to a single container port
Signed-off-by: Sami Tabet <salph.tabet@gmail.com>
Upstream-commit: 63e5c29e00
Component: cli
2018-06-12 11:54:02 +02:00
c917ff2fc9 Merge pull request #37239 from vdemeester/bump-mergo
Upgrade imdario/mergo to v0.3.5
Upstream-commit: a9fbbdc8dd8794b20af358382ab780559bca589d
Component: engine
2018-06-11 22:40:59 -07:00
b17401d002 Bump Golang to 1.10.3
go1.10.3 (released 2018/06/05) includes fixes to the go command, and the
crypto/tls, crypto/x509, and strings packages. In particular, it adds minimal
support to the go command for the vgo transition. See the Go 1.10.3 milestone
on our issue tracker for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1c71c957cb
Component: cli
2018-06-11 11:13:13 -07:00
3b5238767d Merge pull request #114 from thaJeztah/bump_golang_1.10.3
Bump Golang to 1.10.3
Upstream-commit: 0e26700e872244086288bd45426b37d5734a9ab7
Component: packaging
2018-06-11 10:56:03 -07:00
3d7a0f54f5 Bump Golang to 1.10.3
go1.10.3 (released 2018/06/05) includes fixes to the go command, and the
crypto/tls, crypto/x509, and strings packages. In particular, it adds minimal
support to the go command for the vgo transition. See the Go 1.10.3 milestone
on our issue tracker for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 65fc4f1c0cc81739df97605f1fbf91dbf2e7739f
Component: packaging
2018-06-11 10:35:39 -07:00
67f1296214 Merge component 'engine' from git@github.com:docker/engine master 2018-06-11 17:06:57 +00:00
9d7fa4df84 Merge component 'cli' from git@github.com:docker/cli master 2018-06-11 16:41:37 +00:00
36f219fce9 Upgrade imdario/mergo to v0.3.5
Mainly to get inline with `docker/cli` version of that dependency

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f929f15dd6e316402394143eeb60ad9ba95a81cb
Component: engine
2018-06-11 15:30:46 +02:00
6467f7f59f Merge pull request #1121 from vdemeester/gotestyourself-with-tools
Update gotestyourself to gotest.tools
Upstream-commit: 4cb3c70f36
Component: cli
2018-06-11 14:49:20 +02:00
5dc3589aac Merge pull request #37252 from thaJeztah/bump-libnetwork
bump libnetwork to 19279f0492417475b6bfbd0aa529f73e8f178fb5
Upstream-commit: d812dee47e26ad4db1d53102f0c16af01f70cf2c
Component: engine
2018-06-11 08:23:05 +02:00
cea0f5a067 Merge pull request #37259 from unclejack/bump_go_to_1.10.3
Dockerfile*: bump Go to 1.10.3
Upstream-commit: 27f5ba6d705926fee87c252656e2d3152ac5188b
Component: engine
2018-06-10 17:22:29 -07:00
3eed41c59d Merge pull request #37255 from adshmh/refactor-delete-network-integration-tests-use-network-create
refactor delete network integration tests to use network package
Upstream-commit: f010dba4901d07b5e1fd0f9227c0996267b3adae
Component: engine
2018-06-10 13:57:54 -07:00
ed25213177 builder: update ID of trace messages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8ccbc2c40a063dbd4251b684ded1573d99ded337
Component: engine
2018-06-10 10:05:32 -07:00
ea746c1733 builder: updates for newer containerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f41af1efd04ae054fea70c8999112b6dfd4dcf72
Component: engine
2018-06-10 10:05:31 -07:00
d3f78ce983 builder: override history dates from ref metadata
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0728fb2b6395bd52524a1e5c134a1b37848a9c56
Component: engine
2018-06-10 10:05:31 -07:00
bfaba7aa6b Add support for schema 1 pull
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 96c65a3adf95bc2d972123036d6b81ea3432af33
Component: engine
2018-06-10 10:05:31 -07:00
90ea116cca vendor: update runc for helper packages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2092adf3098f4d1b59ced05251a503f930b84805
Component: engine
2018-06-10 10:05:31 -07:00
f05bfde667 integration-cli: fix error message for non-buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b1942bc015f0ec6258c39748032171c09bf562ab
Component: engine
2018-06-10 10:05:31 -07:00
5f4f0d9ecc builder: correct output buffering order
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ab4cbe2c3f55ed63ef80d2886cb006d082271630
Component: engine
2018-06-10 10:05:31 -07:00
d75f0ca946 builder: more experimental/windows validation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 577732f655fc95396b8c2b9a45747c5c95760755
Component: engine
2018-06-10 10:05:30 -07:00
d23b97504d api: update godoc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6aa76adf59ce90701f9ccbd6f07caf97228a9f50
Component: engine
2018-06-10 10:05:30 -07:00
99ee72157e builder: notify output buffering on body close
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 1a6262e9efbf2062ade0ad01717f041e6cdfd6fa
Component: engine
2018-06-10 10:05:30 -07:00
8a84262fd3 builder: fix cancellation context issue
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2567dd9afc070428082aa1bec14ee037337dd5c4
Component: engine
2018-06-10 10:05:30 -07:00
b29ae02ee8 builder: move tagging to exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4cdb6853dcf7105bc355370dac7246d9061e23ee
Component: engine
2018-06-10 10:05:30 -07:00
e7c54d5a63 builder: lint fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 157b0b30dbf2f5af5c5b121bee60c1951af71fb5
Component: engine
2018-06-10 10:05:29 -07:00
e010ecad6a integration-cli: fix health test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 1f09adbe163f008e36dffa45c8f4b43605d7426e
Component: engine
2018-06-10 10:05:29 -07:00
f872f0f30d builder: support for images without layers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 9328f0479b810c76fd5944bf9c856cea1af0c498
Component: engine
2018-06-10 10:05:29 -07:00
629c647dcf builder: enable gateway through syntax directive
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 72d10ced7dfd013be91347e92723bbbf62539765
Component: engine
2018-06-10 10:05:29 -07:00
1a41f07112 builder: add support for separate upload-request
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a25846a67527b2a8de5159608979fc7ff9d70bdf
Component: engine
2018-06-10 10:05:29 -07:00
cd6ea182f9 builder: protect early progress writes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f3ef8c93d617bdcf250c7b682861c590e7fce411
Component: engine
2018-06-10 10:05:29 -07:00
b617d4ac86 builder: have TestBuildDockerignoringBadExclusion pass with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9cc49b4ab91d1083932b952dec7475c46732b5b5
Component: engine
2018-06-10 10:05:28 -07:00
6f67597200 builder: Add TODOBuildkit test requirement, specifically for TestBuildCancellationKillsSleep
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 60a911dfcab2304825e4e8f53999866cfc42d4d8
Component: engine
2018-06-10 10:05:28 -07:00
af99f154e1 builder: pass DOCKER_BUILDKIT to enable buildkit in tests
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f6e58ca3c8ed880eb6459fbf38e0014f18c9322c
Component: engine
2018-06-10 10:05:28 -07:00
f50adc2424 builder: fix compiling with buildkit on windows and integration tests
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3a1da5c534bb71149036eb67792a4eb4f6474144
Component: engine
2018-06-10 10:05:28 -07:00
a9e10d0f4d builder: add support for building from tarball
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 92395261b05610ca0a8ae799220ce29f8ee00fac
Component: engine
2018-06-10 10:05:28 -07:00
acec416240 builder: patch incomplete download handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8900e3c758457785b121368ce832946634b9da00
Component: engine
2018-06-10 10:05:28 -07:00
11b7f9664a builder: fixes after rebase
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ed651e796c6fd91d533eadaacfb57c36702edd39
Component: engine
2018-06-10 10:05:28 -07:00
3a980ed674 builder: expand prune to buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 760ecf958b741beb1c645a96e69065af9ebcad79
Component: engine
2018-06-10 10:05:27 -07:00
4cc215fd04 builder: add usage to snapshotter adapter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f0a9e54d200e317eb12ccbe9fee1d0c3a49366f5
Component: engine
2018-06-10 10:05:27 -07:00
33e5fdd844 builder: export build cache records
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b225258496f3ec8b6906b3fc6a3a2c76e50502d9
Component: engine
2018-06-10 10:05:27 -07:00
f1bc9dea89 builder: produce duplicate cache keys on pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: bb68c8132b593cb2fd633f2cb1c8761243c0b120
Component: engine
2018-06-10 10:05:27 -07:00
ccc559564d builder: adapter update after vendor update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b7424599f696ed30d6e29630e3324c2915732f2e
Component: engine
2018-06-10 10:05:27 -07:00
63a842126f builder: add cache-from support to buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 46bd229b5168e3d00e524e24c13545c718e3144f
Component: engine
2018-06-10 10:05:27 -07:00
edce20e895 builder: add graceful cancellation endpoint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0bddd4ccfee5b7f4f69cd4757f053214be2ad4cd
Component: engine
2018-06-10 10:05:26 -07:00
08ef676cdf builder: experimental buildkit base
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 22f7caee03b807f50f993eb387a4017acab1657e
Component: engine
2018-06-10 10:05:26 -07:00
7cbdbc32f3 builder: snapshotter and exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 27fa0e8a7b9b922dc3955cc2cee82b4fefc331c4
Component: engine
2018-06-10 10:05:26 -07:00
c086db14b7 layer: relax graphdriver ID format
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 9a0eb8d330797fa62dc59667aea6efbb7cdb9181
Component: engine
2018-06-10 10:05:26 -07:00
853163c7ac daemon: access to distribution internals
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ea36c3cbaf74c4e69307563cb4deb20e560217ac
Component: engine
2018-06-10 10:05:26 -07:00
1abaf0d46a vendor: add buildkit dependency
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6fcb36ff140f03574df7164e8dda10a20886a4b1
Component: engine
2018-06-10 10:05:19 -07:00
693307ee7d Dockerfile*: bump Go to 1.10.3
Signed-off-by: Cristian Staretu <unclejack@users.noreply.github.com>
Upstream-commit: 599a3b888cc96ba7bfac7f81a29d4e0688451805
Component: engine
2018-06-10 17:41:22 +03:00
1a5dac4574 build: error out if buildkit is on and stdin is used for both dockerfile and context
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 89e102474c
Component: cli
2018-06-09 20:51:34 +00:00
dcc459a896 build: Add support for using dockerfile from stdin with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5314a8fc06
Component: cli
2018-06-09 20:51:34 +00:00
0565bb3955 build: Add support for using context from stdin with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e0b3921a03
Component: cli
2018-06-09 20:51:34 +00:00
2dccbba621 build: use a separate upload request for early progress
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8cf213bd0c
Component: cli
2018-06-09 20:51:34 +00:00
1d7ec4c7d5 system: add buildcache formatting
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b19294ee42
Component: cli
2018-06-09 20:51:34 +00:00
f1e0dd5b11 build: basic buildkit progress support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0f97642915
Component: cli
2018-06-09 20:51:34 +00:00
a173c54ac8 build: add experimental buildkit base
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 656fe85c74
Component: cli
2018-06-09 20:51:30 +00:00
ecac08f83b Merge component 'engine' from git@github.com:docker/engine master 2018-06-09 17:07:47 +00:00
42c1cad746 Merge component 'cli' from git@github.com:docker/cli master 2018-06-09 16:41:42 +00:00
ef2084848e Merge pull request #37250 from tonistiigi/update-containerd-vendor
vendor: update containerd to 63522d9
Upstream-commit: 0c4ed4e4aef158b59b6d4d6a6dfea7f612129f9f
Component: engine
2018-06-09 09:18:46 -07:00
8026c92fb1 Fix removeSingleSigner description
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Upstream-commit: 92c39dd0ab
Component: cli
2018-06-09 08:14:34 -07:00
8c923be7a4 Merge pull request #36687 from cpuguy83/remove_custom_tls_dialer
Use stdlib TLS dialer
Upstream-commit: f5e60bbf21ea014a2854349ebc1c4e7e04e30398
Component: engine
2018-06-09 15:52:57 +02:00
ec203c5bb5 refactor delete network integration tests to use network package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 991d5121592eeb1e4442516f957ed484d8b687c7
Component: engine
2018-06-09 06:39:22 -04:00
3c1e80ab62 Merge pull request #1116 from vdemeester/vendor-bump-moby
Bump moby version (and its dependencies)
Upstream-commit: 75c1bb1f33
Component: cli
2018-06-08 21:35:58 -07:00
9caba3315b bump libnetwork to 19279f0492417475b6bfbd0aa529f73e8f178fb5
includes;

- docker/libnetwork#2178 Fix possible race on ingress programming
- docker/libnetwork#2180 Fix spurious deadlock in overlay driver

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6630f214fae3bc7c8b802a0b58e1bacd9adc6148
Component: engine
2018-06-08 20:34:29 -07:00
9a81ad55fc vendor: update containerd to 63522d9
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 44f3dd7653a1c5739d2c25d1227d945d9c686c86
Component: engine
2018-06-08 19:19:06 -07:00
1986a1408c Merge pull request #37172 from zq-david-wang/resizefix2
Fix race condition between exec start and resize.
Upstream-commit: 5e11f66cb6de472d11647e8b1a744afc941859ad
Component: engine
2018-06-08 15:43:25 -07:00
cbea8edb83 Use stdlib TLS dialer
Since go1.8, the stdlib TLS net.Conn implementation implements the
`CloseWrite()` interface.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2ac277a56f50d0ad1831603dccbca5c19ff717e9
Component: engine
2018-06-08 14:24:30 -07:00
bae6d423c4 Merge pull request #37184 from cpuguy83/attach_leak
Fix fd leak on attach
Upstream-commit: 5cb95f693dc7170a97401e6e3059e8fd134dc475
Component: engine
2018-06-08 13:08:06 -07:00
07f52be94c Merge pull request #37236 from johnstep/fix-client-test-env-cleanup
Clean up in TestNegotiateAPIVersionEmpty
Upstream-commit: 67f26c79d94ded25f0a2abcc0d631a94714af5e0
Component: engine
2018-06-08 13:06:53 -07:00
3dfd20c925 Merge component 'engine' from git@github.com:docker/engine master 2018-06-08 17:05:09 +00:00
2a42a9a588 Merge component 'cli' from git@github.com:docker/cli master 2018-06-08 16:41:22 +00:00
e92ec69f61 Update tests to use gotest.tools 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2c4de4fb5e
Component: cli
2018-06-08 18:24:26 +02:00
a7c8326a15 Replace gotestyourself by gotest.tools
github.com/gotestyourself/gotestyourself moved to gotest.tools with
version 2.0.0. Moving to that one, bumping it to v2.1.0.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dd9478a1f7
Component: cli
2018-06-08 18:23:38 +02:00
3833ae0f0f Move the successful removal print
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Upstream-commit: 2b3361cc1a
Component: cli
2018-06-08 09:21:36 -07:00
6a80f2d39d Merge pull request #36161 from fanjiyun/edit
When link id is empty for overlay2, do not remove this link.
Upstream-commit: a7b6643c5f12e9048e6434aca5855d2041bbaada
Component: engine
2018-06-08 09:12:22 -07:00
d697e2a9fb Bump mergo to v0.3.5
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 48ed659bc6
Component: cli
2018-06-08 17:15:12 +02:00
5522fc00fc Merge pull request #1119 from silvin-lubecki/fix-help-docker-client-initialization
Check errors when initializing the docker client in the help command
Upstream-commit: aac3124794
Component: cli
2018-06-08 17:05:21 +02:00
3a0f08270b Merge pull request #37240 from francescomari/toolbox-link
Fix link to Docker Toolbox
Upstream-commit: d072a3658b5dc81f31c6cb59eea42681db8df52c
Component: engine
2018-06-08 07:23:32 -07:00
17705eb1b4 Fix #1113 "Segfault on --help with --tlsverify if no ca certificate is present"
Errors were not checked while initializing the docker client in the help command

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f4b0780e20
Component: cli
2018-06-08 16:14:48 +02:00
1fd604f1f8 Fix link to Docker Toolbox
Signed-off-by: Francesco Mari <mari.francesco@gmail.com>
Upstream-commit: a045b027bf8f9e19fd53c2b33399fad901b1dd34
Component: engine
2018-06-08 16:12:00 +02:00
bfd82b2547 Bump moby version (and its dependencies)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b1065767cd
Component: cli
2018-06-08 11:26:10 +02:00
885386e772 Merge pull request #37195 from adshmh/refactor-integration-test-create-network-calls-macvlan
Refactor macvlan network integration tests to use network.Create
Upstream-commit: 162ba6016def672690ee4a1f3978368853a1e149
Component: engine
2018-06-08 09:46:04 +02:00
0fba2438fd Merge pull request #37234 from kolyshkin/plugin-panic
Fix daemon panic on restart when a plugin is running
Upstream-commit: 712dd62a348b2da1508bc81cfb852b0f05c0ede3
Component: engine
2018-06-08 09:45:25 +02:00
10e74b4423 Merge pull request #37235 from kunaltyagi/vim-filename
[vim] Be case insensitive for D in dockerfile
Upstream-commit: fe3d0233ef711a049a0409f33fb298f13cd0f31d
Component: engine
2018-06-08 09:39:18 +02:00
d23610aaff Merge pull request #37233 from dnephin/add-metrics-for-pull
Add image metrics for push and pull
Upstream-commit: 4703b284e6695524a58ae0cd6f94eaf7359bd500
Component: engine
2018-06-08 00:26:12 -07:00
d95a00a489 Merge pull request #37189 from arm64b/create-intermediate-for-COPY-ADD
Refactor and cleanup the intermediate container creation
Upstream-commit: 52ea99eda2ea29d9a0e4111f1e7a0b382d8d9408
Component: engine
2018-06-07 21:20:17 -07:00
f15217a073 Merge pull request #34218 from yosifkit/close-readclosers
Close readclosers returned by DecompressStream
Upstream-commit: e3e552ac8129de1af66af90f67b694843ab0df0a
Component: engine
2018-06-07 20:42:30 -07:00
87cfb7e0a8 Fix race condition between exec start and resize
Signed-off-by: David Wang <00107082@163.com>
Upstream-commit: e6783656f917c5a8b8c6f346b4ff840d97b1b6ce
Component: engine
2018-06-08 11:07:48 +08:00
f2b19f94a1 Clean up in TestNegotiateAPIVersionEmpty
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: b801361064f708bf7f8adb93a18570c25de58219
Component: engine
2018-06-07 20:05:29 -07:00
cdee8f774a Merge pull request #37183 from vdemeester/service-create-init
Add support for `init` on services
Upstream-commit: f11f24958852986cfc996e6076fed75bfcbf1ed1
Component: engine
2018-06-07 19:22:14 -07:00
3f03982f9a Allow vim be case insensitive for D in dockerfile
Signed-off-by: Kunal Tyagi <tyagi.kunal@live.com>
Upstream-commit: 6b8dab2181097c83670b65c2f76f83307058c987
Component: engine
2018-06-08 10:30:40 +09:00
a1a394884c Merge pull request #37231 from adshmh/use-unique-names-for-integration-tests-service-create
use unique names for resources in create service integration tests
Upstream-commit: 5ff12f6ba13edf16a174250b65b1c7294fbd5a45
Component: engine
2018-06-07 17:47:07 -07:00
2ca4487c26 When id is empty for overlay2/overlay, do not remove the directories.
Signed-off-by: fanjiyun <fan.jiyun@zte.com.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0e8f96e31724a7bb49d0ade9acec116f68c85c74
Component: engine
2018-06-07 17:35:54 -07:00
54e00c6a5c Fix panic on daemon restart with running plugin
Scenario:

Daemon is ungracefully shutdown and leaves plugins running (no
live-restore).
Daemon comes back up.
The next time a container tries to use that plugin it will cause a
daemon panic because the plugin client is not set.

This fixes that by ensuring that the plugin does get shutdown.
Note, I do not think there would be any harm in just re-attaching to the
running plugin instead of shutting it down, however historically we shut
down plugins and containers when live-restore is not enabled.

[kir@: consolidate code to deleteTaskAndContainer, a few minor nits]

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: dbeb4329655e91dbe0e6574405937f03fabf3f2f
Component: engine
2018-06-07 17:27:02 -07:00
97950284c3 Add image metrics for push and pull
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 6910019bbebd71d6bb5c949a40e96b49a6b41f45
Component: engine
2018-06-07 18:26:12 -04:00
92d9a5ddfd Merge pull request #37215 from adshmh/integration-container-links-tests-use-unique-names
container links integration tests use unique names
Upstream-commit: d47c45175b13e97475649dfe8b1ab1034c4865d0
Component: engine
2018-06-07 22:34:12 +02:00
e55ae1efdd Merge pull request #37232 from vdemeester/o-rly
Mark @thajeztah as a MAINTAINER…
Upstream-commit: d9b96d90c62063b506d28f685870f65f1fd4154d
Component: engine
2018-06-07 22:33:45 +02:00
709a15352d Merge pull request #1115 from vdemeester/o-rly
Mark @thajeztah as a MAINTAINER…
Upstream-commit: 001c8f2f7f
Component: cli
2018-06-07 20:55:40 +02:00
dc6063672c Close readclosers returned by DecompressStream
Signed-off-by: Joe Ferguson <joe@infosiftr.com>
Upstream-commit: 76e99e1a8b60c831415d2f6a6a7954e16c25620b
Component: engine
2018-06-07 11:16:13 -07:00
5ea7988613 Mark @thajeztah as a MAINTAINER…
… discovered recently that our very own Sebastiaan was not even listed
in the maintainers, so fixing this mistake !

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9fda91bed4
Component: cli
2018-06-07 19:52:40 +02:00
c2a60aeb45 Mark @thajeztah as a MAINTAINER…
… discovered recently that our very own Sebastiaan was not even listed
in the maintainers, so fixing this mistake !

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7f9dd507d3f50cd343480cb0776a3ccca83c5764
Component: engine
2018-06-07 19:50:41 +02:00
b41fea2d2c Merge component 'engine' from git@github.com:docker/engine master 2018-06-07 17:07:30 +00:00
29579f20f8 use unique names for resources in create service integration tests
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: d5ae23fc11b91275801dcab2326e803725a645a6
Component: engine
2018-06-07 12:11:11 -04:00
43d60463c2 Add support for init on services
It's already supported by `swarmkit`, and act the same as
`HostConfig.Init` on container creation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e401b88e59e098745744917c555d549f08353e6d
Component: engine
2018-06-07 14:17:55 +02:00
025606b2a1 Merge pull request #36644 from jessfraz/rawaccess
api: add MaskedPaths and ReadonlyPaths options
Upstream-commit: 1fe0e49d2057d5ee1b12cc6f53e4c41a197e7fec
Component: engine
2018-06-06 18:16:16 -07:00
bf25aa33ff Merge pull request #37209 from thaJeztah/bump_libnetwork
bump libnetwork to 3931ba4d815e385ab97093c64477b82f14dadefb
Upstream-commit: 21291e5aefe1f13f3208d57bcc4183848c492bd1
Component: engine
2018-06-06 13:41:33 -07:00
5028541e5c Merge pull request #37192 from thaJeztah/update_miekd_dns
Update miekg/dns to v1.0.7
Upstream-commit: 9b0b9a0ece532caa806594b5fbc5eef2d6777b10
Component: engine
2018-06-06 11:24:54 -07:00
57b10679e6 Merge component 'engine' from git@github.com:docker/engine master 2018-06-06 17:06:45 +00:00
5f7ac51e1c Merge component 'cli' from git@github.com:docker/cli master 2018-06-06 16:41:36 +00:00
4ec08a8192 Fix tests and nit
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Upstream-commit: 5ebb7a65ab
Component: cli
2018-06-06 07:25:25 -07:00
9022898c18 integration tests under integration/container/links_linux_test.go use unique names
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 077247050df0bf97b7b62e439152eb362e9ec813
Component: engine
2018-06-06 06:14:24 -04:00
f6411898cc Merge pull request #36895 from dmcgowan/vendor-containerd-master
Update containerd to 1.1
Upstream-commit: fd2f2a919e392b96de74795ae9af2dc5e510bc4c
Component: engine
2018-06-05 21:43:31 -07:00
99eaf394e3 Fix docker trust signer removal
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Upstream-commit: 448082f333
Component: cli
2018-06-05 16:04:41 -07:00
370137f15d Merge pull request #531 from seemethere/engine
Change engine component to point to docker/engine
2018-06-05 14:52:24 -07:00
8925778ea9 Merge pull request #37211 from vdemeester/fix-volume-unit-test
Fix wrong assertion in volume/service package
Upstream-commit: 340fd5e2370714f54ae99b8679a4311617848bc5
Component: engine
2018-06-05 13:14:13 -07:00
6e77b5d7c2 Change to docker/engine
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-06-05 19:02:54 +00:00
4cdb057509 bump libnetwork to 3931ba4d815e385ab97093c64477b82f14dadefb
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fe02b187555b25cb1a92ecaaac2b8b9f5b6a293d
Component: engine
2018-06-05 11:29:23 -07:00
50be59326e Fix wrong assertion in volume/service package
This last assertion shouldn't be there, those cases should be handled
by the for/switch above.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 04207c2db9cd82e47aa82bc2834fe3820086a697
Component: engine
2018-06-05 18:51:17 +02:00
67fe100ad5 api: add configurable MaskedPaths and ReadOnlyPaths to the API
This adds MaskedPaths and ReadOnlyPaths options to HostConfig for containers so
that a user can override the default values.

When the value sent through the API is nil the default is used.
Otherwise the default is overridden.

Adds integration tests for MaskedPaths and ReadonlyPaths.

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
Upstream-commit: 3694c1e34e40fa2e255a97b5541645cec9c8d1d5
Component: engine
2018-06-05 12:33:14 -04:00
61e3e1ddea Merge pull request #1104 from vdemeester/show-me-your-secret
Add more example to the full-example tests
Upstream-commit: 90f8ce8a5d
Component: cli
2018-06-05 16:44:06 +02:00
f422827dd4 refactored integration tests under integration/network/macvlan to use network.Create
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 0418893f0b5a7413edd950cfabd2337161edc705
Component: engine
2018-06-05 06:32:24 -04:00
8a3da41a28 Added network package to integration/internal to refactor integration tests calls to client.NetworkCreate
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 0e3012cfff1e81f7c779b1310f6069dc909d7987
Component: engine
2018-06-05 06:32:24 -04:00
2452577cb1 Merge pull request #37194 from AntaresS/fix-test-failure
fix a failed test
Upstream-commit: ca25df3b54300e897d96029dcc4f86b8c4215a27
Component: engine
2018-06-05 02:38:04 +02:00
0e7017a3ae Merge pull request #36688 from cpuguy83/volumes_service
Extract volume interaction to a volumes service
Upstream-commit: 5037c5a8ce762b46638378b7a7d1081572eadba1
Component: engine
2018-06-05 02:16:20 +02:00
77116c8094 Update containerd daemon
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: a0009345f51d7a58a2f188d7ffc7e0e837a5238d
Component: engine
2018-06-04 15:37:03 -07:00
60c800804e Update containerd to 1.1
Updates swarmkit, grpc, and all related vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 52ed3e0896c203013388a3eb603658f345a9d80a
Component: engine
2018-06-04 15:37:03 -07:00
94cab3b97b Merge pull request #37191 from adshmh/use-unique-names-for-integration-tests-secret
use unique names for resources in integration tests of secret package
Upstream-commit: d7e94d6ea7c1a76c79b6da722491c79118236999
Component: engine
2018-06-05 00:06:50 +02:00
82d56e0c15 fix a failed test
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 1d9973c0d4c51362e8c5b38e585a025c90baf085
Component: engine
2018-06-04 14:29:00 -07:00
78419943dd Merge component 'engine' from git@github.com:moby/moby master 2018-06-04 17:09:05 +00:00
389df6fca3 Merge component 'cli' from git@github.com:docker/cli master 2018-06-04 16:42:00 +00:00
f5f666914b Merge pull request #37197 from tonistiigi/vendor-buildkit
vendor: dockerfile parser from buildkit
Upstream-commit: e466f999aa9d2add9ccaca655f8d53c3112c121d
Component: engine
2018-06-04 14:53:22 +02:00
9bf4d4a535 Merge pull request #948 from simonferquel/k8s-watch-stack-status
K8s: more robust stack error detection on deploy
Upstream-commit: eaa9149e29
Component: cli
2018-06-04 10:42:42 +02:00
1542f5e969 Refactor and cleanup the intermediate container creation
This PR is trying to refactor the `probeAndCreate` and cleanup
related codes based on the refactoring.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 7f280f6f6514598a31d2523d4b9437ca07ee0526
Component: engine
2018-06-04 12:55:49 +08:00
1023e99d13 Merge component 'engine' from git@github.com:moby/moby master 2018-06-03 17:07:57 +00:00
79ad4e84bf Merge pull request #37190 from vdemeester/allow-make-run-with-args
Allow to add any args when doing a make run
Upstream-commit: 641e2c01cca0c9c66b173a52c1f1ef12a934dfa9
Component: engine
2018-06-03 03:42:02 +09:00
f01f23683f vendor: add new opentracing deps for session tracing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ad77dee8baafc478baa18f65a4972ba19b6e973f
Component: engine
2018-06-02 11:10:38 -07:00
2f23577c7a vendor: use dockerfile parser from buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c9ebd2f13b3aab49c2d90cc38dcf2cd0d059697f
Component: engine
2018-06-02 11:10:34 -07:00
0132060680 Merge component 'cli' from git@github.com:docker/cli master 2018-06-02 16:41:34 +00:00
d9ce9238d8 Merge pull request #1106 from silvin-lubecki/fix-orchestrator-flag-persistent
Add a "top-level" annotation to hide persistent flags
Upstream-commit: 2014e991ee
Component: cli
2018-06-01 23:32:40 +02:00
763340472e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-06-01 21:14:02 +00:00
0e64c4ed59 Merge pull request #1105 from vdemeester/1044-compress-stream-friend
Fix panics when --compress and --stream are used together
Upstream-commit: d1cc8c731e
Component: cli
2018-06-01 23:00:01 +02:00
894a729113 Merge pull request #113 from seemethere/btrfs
Remove btrfs-progs in favor of libbtrfs-dev
Upstream-commit: f1e7523cee9a53295233ba3d0e1fc5cb07ed7913
Component: packaging
2018-06-01 13:44:44 -07:00
46248afb01 Remove btrfs-progs in favor of libbtrfs-dev
`btrfs-progs` doesn't actually contain the files we need, since we only
need the headers for btrfs, which `libbtrfs-dev` now provides.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 73678285d0671e1b67ec30d21e99cfe1580159fa
Component: packaging
2018-06-01 20:33:59 +00:00
de438df3a8 Allow to add any args when doing a make run
`make DOCKERD_ARGS=--init binary run` should start the daemon with
`--init` as flags (with any other "automagically" added ones).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d2af0d96e3fbdfec340cb707b795b863411b00e1
Component: engine
2018-06-01 19:19:20 +02:00
739469a67f Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-06-01 17:05:00 +00:00
a7f733dcd3 Merge component 'cli' from git@github.com:docker/cli master 2018-06-01 16:41:21 +00:00
a87a3769f8 Fix panics when --compress and --stream are used together
Warns that `-compress` has no effect when used together with the
expremintal `--stream` flag.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8b3dc39fce
Component: cli
2018-06-01 18:34:00 +02:00
9d9413af9f Update miekg/dns to v1.0.7
This dependency now uses SemVer, tagged releases.
Also updates dependencies

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4acddf21b7c11c2c6a71f0f9ba1d329cfbb99e5f
Component: engine
2018-06-01 16:24:59 +02:00
d1ccf01fd1 Merge pull request #1101 from silvin-lubecki/filter-stack-service
Fix service filtering by name on Kubernetes
Upstream-commit: 7db15a4553
Component: cli
2018-06-01 15:50:34 +02:00
6f7cfb3c58 Merge pull request #1094 from thaJeztah/hide_checkpoint_on_windows
Hide experimental checkpoint features on Windows
Upstream-commit: 63ad0a0e88
Component: cli
2018-06-01 15:49:51 +02:00
2d6b52f5ec Merge pull request #1097 from vdemeester/x-objects
Allow `x-*` extension on 3rd level objects
Upstream-commit: eb54d3e5c0
Component: cli
2018-06-01 15:48:04 +02:00
14b4abdabd Fix service filtering by name on Kubernetes to mimic Swarm filtering
*  Kubernetes native filtering (server side) is an exact match, now filtering on name is made client-side to add prefix-matching

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: b1ff199167
Component: cli
2018-06-01 15:43:02 +02:00
cc8e8442e8 Added a "top-level" annotation to hide persistent flags in all sub-commands, excepting some specific commands, while printing help
Fixes issue #1099

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: c003ed1f35
Component: cli
2018-06-01 15:13:40 +02:00
fd04115881 Add more example to the full-example tests
Configs and Secrets were note present, some labels on volumes and
networks too.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 55426d9396
Component: cli
2018-06-01 14:16:18 +02:00
37acacf605 use unique names for resources in integration tests of integration/secret package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: a70794aff0fc5a02db9c939397d663f174d2f726
Component: engine
2018-06-01 06:46:52 -04:00
a76ed6f917 YAML docs: add os_type property on flags and (sub)commands
This patch adds an `os_type` property in the generated YAML docs, both for
commands, and for flags;

Note that the ostype annotation on flags can have multiple values set,
however, multiple values are currently not used (and unlikely will).

To simplify usage of the os_type property in the YAML, and for consistency with
the same property for commands, we're only using the first ostype that's set.

```yaml
command: docker checkpoint create
short: Create a checkpoint from a running container
long: Create a checkpoint from a running container
usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT [flags]
pname: docker checkpoint
plink: docker_checkpoint.yaml
options:
- option: checkpoint-dir
  value_type: string
  description: Use a custom checkpoint storage directory
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
- option: leave-running
  value_type: bool
  default_value: "false"
  description: Leave the container running after checkpoint
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
deprecated: false
min_api_version: "1.25"
experimental: true
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
```

```yaml
command: docker container start
short: Start one or more stopped containers
long: Start one or more stopped containers
usage: docker container start [OPTIONS] CONTAINER [CONTAINER...] [flags]
pname: docker container
plink: docker_container.yaml
options:
- option: attach
  shorthand: a
  value_type: bool
  default_value: "false"
  description: Attach STDOUT/STDERR and forward signals
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
- option: checkpoint
  value_type: string
  description: Restore from this checkpoint
  deprecated: false
  experimental: true
  experimentalcli: false
  kubernetes: false
  swarm: false
  os_type: linux
- option: checkpoint-dir
  value_type: string
  description: Use a custom checkpoint storage directory
  deprecated: false
  experimental: true
  experimentalcli: false
  kubernetes: false
  swarm: false
  os_type: linux
- option: detach-keys
  value_type: string
  description: Override the key sequence for detaching a container
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
- option: interactive
  shorthand: i
  value_type: bool
  default_value: "false"
  description: Attach container's STDIN
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: be035a0272
Component: cli
2018-05-31 22:31:31 +02:00
87e0938121 Merge pull request #112 from seemethere/progs
btrfs-tools -> btrfs-progs
Upstream-commit: 7df78c90c9ff96e853f5cd07f7ba0d9c69a55e87
Component: packaging
2018-05-31 13:31:23 -07:00
ee64293c17 Mark checkpoint feature as Linux-only, and homogenize error messages
This patch adds annotations to mark the checkpoint commands as Linux only, which
hides them if the daemon is running a non-matching operating-system type;

Before:

    docker

    Usage:	docker COMMAND

    A self-sufficient runtime for containers

    ...

    Management Commands:
      config      Manage Docker configs
      container   Manage containers
      image       Manage images

After:

    docker

    Usage:	docker COMMAND

    A self-sufficient runtime for containers

    ...

    Management Commands:
      checkpoint  Manage checkpoints
      config      Manage Docker configs
      container   Manage containers
      image       Manage images

This change also prints errors when attempting to use checkpoint commands or
flags if the feature is not supported by the Daemon's operating system;

    $ docker checkpoint --help
    docker checkpoint is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker checkpoint create --help
    docker checkpoint create is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker checkpoint ls --help
    docker checkpoint ls is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker checkpoint rm --help
    docker checkpoint rm is only supported on a Docker daemon running on linux, but the Docker daemon is running on windows

    $ docker container start --checkpoint=foo mycontainer
    "--checkpoint" requires the Docker daemon to run on linux, but the Docker daemon is running on windows

    $ docker container start --checkpoint-dir=/foo/bar mycontainer
    "--checkpoint-dir" requires the Docker daemon to run on linux, but the Docker daemon is running on windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1df6b68111
Component: cli
2018-05-31 22:25:06 +02:00
5044d62602 Merge component 'engine' from git@github.com:moby/moby master 2018-05-31 17:06:35 +00:00
eeb2fb82e0 Merge component 'cli' from git@github.com:docker/cli master 2018-05-31 16:41:34 +00:00
d2c390cca0 Merge pull request #37177 from cpuguy83/minor_plugin_addr_change
Move plugin client to separate interface
Upstream-commit: 71cd53e4a197b303c6ba086bd584ffd67a884281
Component: engine
2018-05-31 08:22:04 -07:00
b988718959 Fix fd leak on attach
With a full attach, each attach was leaking 4 goroutines.
This updates attach to use errgroup instead of the hodge-podge of
waitgroups and channels.

In addition, the detach event was never being sent.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0f5147701775a6c5d4980a7b7c0ed2e830688034
Component: engine
2018-05-31 10:11:18 -04:00
8aa78bcb5c Merge pull request #1096 from thaJeztah/easier_testing_docker_version
Add test for version output aligning
Upstream-commit: 31d99ba630
Component: cli
2018-05-31 14:55:12 +02:00
0e3e1012ac Allow x-* extension on 3rd level objects
As for top-level key, any 3rd-level key which starts with `x-` will be
ignored by compose. This allows for users to:
* include additional metadata in their compose files
* create YAML anchor objects that can be re-used in other parts of the config

This matches a similar feature in the swagger spec definition:
https://swagger.io/specification/#specificationExtensions

This means a composefile like the following is valid

```
verison: "3.7"
services:
  foo:
    image: foo/bar
    x-foo: bar
network:
  bar:
    x-bar: baz
```

It concerns services, volumes, networks, configs and secrets.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6bcfa8806c
Component: cli
2018-05-31 13:38:58 +02:00
2f36c5552c Add test for version output aligning
Includes some refactoring to allow testing the output
in isolation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb71808605
Component: cli
2018-05-31 10:15:15 +02:00
6aff3ef24e Merge pull request #37174 from thaJeztah/no_additional_magic_matching
Be explicit about github.com prefix being a legacy feature
Upstream-commit: 2ea4ece674e04c04174ee9fff8005cdccdc4fad0
Component: engine
2018-05-31 09:45:59 +02:00
065fbace32 Merge pull request #37178 from tonistiigi/layer-leak
builder: fix layer leak on multi-stage wildcard copy
Upstream-commit: 3e494c4b934b7fc3756d91b6e8117c9e4d7c28f1
Component: engine
2018-05-31 09:39:28 +02:00
6cb96e5d79 Merge pull request #37179 from AntaresS/fix-skip
fix mis-used skip condition
Upstream-commit: b94d12be0c36c98e010da97b67e9a75c35478bad
Component: engine
2018-05-30 20:04:39 -10:00
98281f1a9c fix the mis-used skip condition
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: d8e6f273b5016880c5d49673ddf531ceecc2bc0d
Component: engine
2018-05-30 17:13:20 -07:00
afda389413 btrfs-tools -> btrfs-progs
btrfs-tools is being deprecated in favor of btrfs-progs, will only
matter for debian versions >= buster

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 7c9db958146b66ad59727e8395b928a6e9743642
Component: packaging
2018-05-31 00:04:30 +00:00
84cf46c71d Merge pull request #37134 from thaJeztah/fix-env-substitution
builder: fix processing of invalid substitusion syntax
Upstream-commit: b2719e35f58c5420ae3dd6ab8e583fba8c6cf6d9
Component: engine
2018-05-30 16:52:01 -07:00
442215fe6a builder: fix layer leak on multi-stage wildcard copy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4a18c11bdc1300692def2453c441190d73e1e942
Component: engine
2018-05-30 15:18:40 -07:00
ab001b0599 Merge pull request #37169 from AntaresS/add-version-checking
add api version checking for tests from new feature
Upstream-commit: 0a94468a5bed080a77a01847515123b9c2eff62e
Component: engine
2018-05-30 09:58:45 -10:00
285424548c Move plugin client to separate interface
This makes it a bit simpler to remove this interface for v2 plugins
and not break external projects (libnetwork and swarmkit).

Note that before we remove the `Client()` interface from `CompatPlugin`
libnetwork and swarmkit must be updated to explicitly check for the v1
client interface as is done int his PR.

This is just a minor tweak that I realized is needed after trying to
implement the needed changes on libnetwork.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7c77df8acc597cd4f540d873de5fe53a3d414ba9
Component: engine
2018-05-30 15:22:10 -04:00
75e47b0eb6 Merge pull request #36874 from kolyshkin/stop-timeout
daemon.ContainerStop(): fix for a negative timeout
Upstream-commit: b85799b63fb25423620ed16e717a99401cd3a39b
Component: engine
2018-05-30 13:38:42 -04:00
f61266ddf3 Merge component 'engine' from git@github.com:moby/moby master 2018-05-30 17:07:13 +00:00
231bc963aa Merge pull request #37017 from cpuguy83/plugins_addr
Move plugin client creation to the extension point
Upstream-commit: cbbe0ff5119c7e3480827f57a2210f03152644f7
Component: engine
2018-05-30 09:54:46 -07:00
ad8784e4f2 Merge component 'cli' from git@github.com:docker/cli master 2018-05-30 16:41:38 +00:00
7dd704f7ab Merge pull request #1093 from silvin-lubecki/fix-listing-nodes
Fix always listing nodes in docker stack ps command
Upstream-commit: a8ee42ad53
Component: cli
2018-05-30 16:05:14 +02:00
5944032f12 Fix outputting twice the docker stack rm error message
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: a252cb1197
Component: cli
2018-05-30 15:56:41 +02:00
560846bf75 Fix always listing nodes during docker stack ps command on Kubernetes. A user without node listing rights could not use this command as it always fails.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 66059a925b
Component: cli
2018-05-30 15:28:35 +02:00
cfa9535853 Merge pull request #1064 from chris-crone/e2e-test-image
Create standalone e2e test image
Upstream-commit: 97f8857461
Component: cli
2018-05-30 13:08:03 +02:00
90dfa0b4ee Be explicit about github.com prefix being a legacy feature
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: babb0c14fd1281b309de46c3481a5bea88b8031d
Component: engine
2018-05-30 11:09:14 +02:00
f21c0ccd84 Merge pull request #37131 from kolyshkin/top-opt
Optimize ContainerTop() aka docker top
Upstream-commit: 65bd038fc5e47ed37d2702cbdd6ce484d320380b
Component: engine
2018-05-30 03:28:07 +02:00
a99e1e1ff6 add api version checking for tests from new feature
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 8ed0fdebe714c64aa697ed7e2187d2233e34eb22
Component: engine
2018-05-29 15:25:33 -07:00
9e5c4be336 Merge component 'engine' from git@github.com:moby/moby master 2018-05-29 17:06:58 +00:00
be6e460409 Merge component 'cli' from git@github.com:docker/cli master 2018-05-29 16:41:35 +00:00
4fb60eb421 Add tests for Kubernetes
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: d420d67bcd
Component: cli
2018-05-29 15:26:07 +02:00
35713286b5 Make e2e test image
- Build image that contains everything needed to run e2e tests
- Add ability to run e2e tests against an endpoint

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 6b38918ce4
Component: cli
2018-05-29 13:39:31 +02:00
80262c1f77 Merge pull request #1090 from zkry/1089-quiet-stream-output-fix
Add String method so quieted output displays properly
Upstream-commit: daf021fe60
Component: cli
2018-05-29 12:43:26 +02:00
2fa0842177 Merge pull request #409 from alshabib/order
Support for rollback config in compose 3.7
Upstream-commit: 5bc09ebf93
Component: cli
2018-05-29 12:14:55 +02:00
8b1898b015 Merge pull request #37166 from yongtang/05282018-unique-service-name
Add `t.Name()` to tests so that service names are unique
Upstream-commit: 864b36255dce627443b18e7e44549d506a71f14a
Component: engine
2018-05-29 12:04:21 +02:00
e9f5618dc0 Merge pull request #37143 from arm64b/copy-after-command-exit
Alternative failure mitigation of `TestExecInteractiveStdinClose`
Upstream-commit: 2d7ae3e7e5bebb324be062e5d3f01f489f107285
Component: engine
2018-05-29 12:03:46 +02:00
8393c32adf Support for rollback config in compose 3.7
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4e6e5d583c
Component: cli
2018-05-29 11:37:51 +02:00
0a85ad23b1 Add composefile schema 3.7
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: df6e38b81a
Component: cli
2018-05-29 11:37:12 +02:00
40e9cf63c8 Add String method so quieted output displays properly
Fixes #1089

Signed-off-by: Zachary Romero <zacromero3@gmail.com>
Upstream-commit: b6cf6d87ae
Component: cli
2018-05-29 05:30:17 +03:00
37672d40d5 Add t.Name() to tests so that service names are unique
This fix adds `t.Name()` to tests in integration/network
so that services created in those tests have unique names.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 76195f8047eb9a6be710d53ec493ab97bcf86e20
Component: engine
2018-05-28 22:57:52 +00:00
7cbcdc050c Merge component 'cli' from git@github.com:docker/cli master 2018-05-28 16:41:35 +00:00
776d9e8d2e Merge pull request #1068 from silvin-lubecki/remove-experimental-for-orchestrator
Remove Kubernetes commands from experimental
Upstream-commit: 824a0b4db9
Component: cli
2018-05-28 17:39:11 +02:00
fbe385fc60 Merge pull request #1088 from thaJeztah/fix_empty_stackname_validation
Validate stack-names for empty values
Upstream-commit: 9b3bba8e6e
Component: cli
2018-05-28 17:38:25 +02:00
2720165925 Validate stack-names for empty values
Add validation for stack names to prevent an empty name resulting in _all_
stacks to be returned after filtering, which can result in removal of services
for all stacks if `--prune`, or `docker stack rm` is used.

Before this change;

    docker stack deploy -c docker-compose.yml one
    docker stack deploy -c docker-compose.yml two
    docker stack deploy -c docker-compose.yml three

    docker stack deploy -c docker-compose.yml --prune ''
    Removing service one_web
    Removing service two_web
    Removing service three_web

After this change:

    docker stack deploy -c docker-compose.yml one
    docker stack deploy -c docker-compose.yml two
    docker stack deploy -c docker-compose.yml three

    docker stack deploy -c docker-compose.yml --prune ''
    invalid stack name: ""

Other stack commands were updated as well:

Before this change;

    docker stack deploy -c docker-compose.yml ''
    Creating network _default
    failed to create network _default: Error response from daemon: rpc error: code = InvalidArgument desc = name must be valid as a DNS name component

    docker stack ps ''
    nothing found in stack:

    docker stack rm ''
    Removing service one_web
    Removing service three_web
    Removing service two_web

After this change:

    docker stack deploy -c docker-compose.yml ''
    invalid stack name: ""

    docker stack ps ''
    invalid stack name: ""

    docker stack rm ''
    invalid stack name: ""

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d38f397da1
Component: cli
2018-05-28 17:03:26 +02:00
32cd7d06e5 Merge pull request #1087 from silvin-lubecki/check-kubernetes-config
Check allNamespace config value while loading configuration file
Upstream-commit: 05f04bb997
Component: cli
2018-05-28 16:45:31 +02:00
be0c4cd5b8 Check allNamespace config value while loading configuration file
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: fb34ffc327
Component: cli
2018-05-28 15:15:25 +02:00
e1b9b6c0be Remove experimentalCli annotation from all kubernetes flags and commands
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f2b75a879a
Component: cli
2018-05-28 15:06:31 +02:00
0fb2bafbb4 Merge pull request #1084 from thaJeztah/minor-code-refactor
Minor refactor in stack helper functions
Upstream-commit: 537e67d462
Component: cli
2018-05-28 12:39:15 +02:00
ec563a652e Minor refactor in stack helper functions
- Don't wrap the code to be slightly more readable
- Rename `getServiceFilter()` to `getStackServiceFilter()` to be
  consistent with other helper functions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0c175fc21a
Component: cli
2018-05-28 12:26:14 +02:00
3b6fda6f6c Merge pull request #1059 from mat007/kubernetes-orchestrator-all-namespaces
Kubernetes orchestrator all namespaces
Upstream-commit: 82053236a3
Component: cli
2018-05-28 11:59:54 +02:00
108f480da7 --orchestrator flag is now a persistent flag
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 770daef564
Component: cli
2018-05-28 10:43:32 +02:00
4daf98b735 Imply all Kubernetes namespaces for docker stack list when orchestrator is all or Kubernetes
* Add "kubernetes" struct in config file with "allNamespaces" option, to opt-out this behavior when set as "disabled"

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 1c1300bef6
Component: cli
2018-05-28 10:43:32 +02:00
2c7c1d708b Alternative failure mitigation of TestExecInteractiveStdinClose
Begin to copy the data until the command to exit and any coping to
stdin or copy from stdout/stderr has completed.
Also adding defense code to trim the possible '\x00' null value.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 386e0f36c42593ef434517448ccfac5262f958d6
Component: engine
2018-05-28 11:25:31 +08:00
4c7a840b18 Move plugin client creation to the extension point
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f51a96c0165fdcbbe11f62b66b582b7e202f211b
Component: engine
2018-05-25 15:18:53 -04:00
feb51dbad1 Extract volume interaction to a volumes service
This cleans up some of the package API's used for interacting with
volumes, and simplifies management.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e4b6adc88e967971de634596654d9bc33e7bd7e0
Component: engine
2018-05-25 14:21:07 -04:00
e2c17e7cab Merge component 'engine' from git@github.com:moby/moby master 2018-05-25 17:07:45 +00:00
87e43e1762 Handle multi-digit positional parameters
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2628896b5e813491f8767ec7fa9d0f057ed4a86e
Component: engine
2018-05-25 18:51:11 +02:00
d0de225d08 Merge component 'cli' from git@github.com:docker/cli master 2018-05-25 16:42:30 +00:00
45e3784610 Add detection of "special parameters" for substitution
Detect Special parameters as defined in
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_05_02

Treat these as parameters that are not set, instead of
producing an error that a modifier is missing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9654e9b6f80e1b931763c04400a19596e256c99a
Component: engine
2018-05-25 18:20:22 +02:00
0ed9886f87 Add more test-cases for positional parameters
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8687a3f4b8b7ffbc3f32dfe959cb771d662211e6
Component: engine
2018-05-25 18:20:10 +02:00
ad9f08c725 Add line-numbers to asserts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b80e0309d220268a2b9e6aec5bb05d7af330e591
Component: engine
2018-05-25 18:20:01 +02:00
1f9af8d4f9 Fix detection for missing parameter in substitution
`${}`, `${:}` and so on are invalid because there's
no parameter within the brackets; fix detection for
this situation and add/update tests.

There were some existing test-cases that were testing
for the wrong behavior, which are now updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 334bf3ea76004d0abe02dd1698989f9eaf87a86a
Component: engine
2018-05-25 18:19:32 +02:00
c8db46ad05 builder: fix processing of invalid substitusion syntax
The builder did not detect syntax errors in substitusions in the
Dockerfile, causing those values to be processed incorrectly instead of
producing an error.

Example 1: missing `}`

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${aaa:-bbb
    RUN echo $var
    EOF

Before:

    Step 3/3 : RUN echo $var
     ---> Running in f06571e77146
    bbb

After:

    Step 2/3 : ARG var=${aaa:-bbb
    failed to process "${aaa:-bbb": syntax error: missing '}'

Example 2: missing closing `}`, no default value

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${aaa
    RUN echo $var
    EOF

Before:

    Step 2/3 : ARG var=${aaa
    failed to process "${aaa": missing ':' in substitution

After:

    Step 2/3 : ARG var=${aaa
    failed to process "${aaa": syntax error: missing '}'

Example 3: double opening bracket (`{`)

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${{aaa:-bbb}
    RUN echo $var
    EOF

Before:

    Step 2/3 : ARG var=${{aaa:-bbb}
    failed to process "${{aaa:-bbb}": missing ':' in substitution

After:

    Step 2/3 : ARG var=${{aaa:-bbb}
    failed to process "${{aaa:-bbb}": syntax error: bad substitution

Example 4: double opening bracket (`{`), no default value

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${{aaa}
    RUN echo $var
    EOF

Before:

    Step 2/3 : ARG var=${{aaa}
    failed to process "${{aaa}": missing ':' in substitution

After:

    Step 2/3 : ARG var=${{aaa}
    failed to process "${{aaa}": syntax error: bad substitution

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 955a6ad95f7891a45692d975793abf1eeb07cdd5
Component: engine
2018-05-25 18:19:17 +02:00
5b1358385e Better stack status check
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: f38510b2d8
Component: cli
2018-05-25 12:56:52 +02:00
7cd3587aa3 Merge pull request #37141 from thaJeztah/bump_api_v1_38
Update API version to v1 38
Upstream-commit: 9c2c887b125df56e622d20ebbbe626c55b61e44a
Component: engine
2018-05-24 17:54:05 -10:00
034a285949 ContainerTop: improve error message
If "ps" fails, in many cases it prints a meaningful error message
which a user can benefit from. Let's use it.

While at it, let's use errdefs.System to classify the error,
as well as errors.Wrap.

Before:

> $ docker top $CT <any bad ps options>
> Error response from daemon: Error running ps: exit status 1

After:

> $ docker top $CT auxm
> Error response from daemon: ps: error: thread display conflicts with forest display

or

> $ docker top $CT saur
> Error response from daemon: ps: error: conflicting format options

or, if there's no meaningful error on stderr, same as before:

> $ docker top $CT 1234
> Error response from daemon: ps: exit status 1

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a41328d5704b8d1adbcd099fb4bb0697060df806
Component: engine
2018-05-24 18:24:36 -07:00
b7dcd71938 ContainerTop: speed up
Current ContainerTop (a.k.a. docker top) implementation uses "ps"
to get the info about *all* running processes, then parses it, then
filters the results to only contain PIDs used by the container.
Collecting data only to throw most of it away is inefficient,
especially on a system running many containers (or processes).
For example, "docker top" on a container with a single process
can take up to 0.5 seconds to execute (on a mostly idle system)
which is noticeably slow.

Since the containers PIDs are known beforehand, let's use ps's
"-q" option to provide it with a list of PIDs we want info about.

The problem with this approach is, some ps options can't be used
with "-q" (the only one I'm aware of is "f" ("forest view") but
there might be more). As the list of such options is not known,
in case ps fails, it is executed again without "q" (retaining
the old behavior).

Next, the data produced by "ps" is filtered in the same way as before.
The difference here is, in case "-q" worked, the list is much shorter.

I ran some benchmarks on my laptop, with about 8000 "sleep" processes
running to amplify the savings.

The improvement in "docker top" execution times is 5x to 10x (roughly
0.05s vs 0.5s).

The improvement in ContainerTop() execution time is up to 100x
(roughly 3ms vs 300ms).

I haven't measured the memory or the CPU time savings, guess those
are not that critical.

NOTE that busybox ps does not implement -q so the fallback is always
used, but AFAIK it is not usable anyway and Docker expects a normal
ps to be on the system (say the list of fields produced by
"busybox ps -ef" differs from normal "ps -ef" etc.).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a076badb8b33f1ecdc5d46f0a3701f10c0579f73
Component: engine
2018-05-24 18:24:27 -07:00
b47e46b815 Merge pull request #1023 from simonferquel/k8s-stack-services-filters
[Kubernetes] stack services filters
Upstream-commit: 0089f172b7
Component: cli
2018-05-24 19:56:33 +02:00
c855cfb970 Merge component 'engine' from git@github.com:moby/moby master 2018-05-24 17:06:00 +00:00
efe0e217f4 Merge component 'cli' from git@github.com:docker/cli master 2018-05-24 16:41:21 +00:00
e39d676f6b Vendoring for stack watch status and testing
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 8cb2e44d68
Component: cli
2018-05-24 16:43:04 +02:00
79dd15d857 Match Swarm in how to combine filters
`docker stack services --filter=label=foo=bar --filter=label=foo=baz my-stack` with Swarm gets handled as `filter on (a label named foo with value bar) AND (a label named foo with value baz).
This obviously yields an empty result set every time, but if and how this should be changed is out of scope here, so simply align Kubernetes with Swarm for now.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 297866ebbe
Component: cli
2018-05-24 15:24:23 +02:00
8c68c67c26 Merge pull request #37136 from muesli/sdnotify-api-const
Use go-systemd const instead of magic string in Linux version of dockerd
Upstream-commit: 80bfcc3a7a870c5b3683489ebc6fec9d67a3dfc4
Component: engine
2018-05-24 14:30:28 +02:00
d75e37db71 Merge pull request #37133 from cpuguy83/bump_continuity
Bump continuity
Upstream-commit: aa2d23a7357d4e827391705b8796a59df78c466d
Component: engine
2018-05-24 13:56:59 +02:00
11041e23de Merge pull request #1079 from thaJeztah/fix_update_memory_cpu_limit
Fix cpu/memory limits and reservations being reset on service update
Upstream-commit: 57ce5aa18d
Component: cli
2018-05-24 12:01:22 +02:00
042cb41dcc Merge pull request #1080 from vdemeester/update-vndr
Update vndr commit to latest
Upstream-commit: 73078131e6
Component: cli
2018-05-24 10:02:52 +02:00
2b328bedc5 Update vndr commit to latest
Some fixes and it also preserves directories with *.c files now.

See a6e196d8b4...1fc68ee0c8

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 08d6c18570
Component: cli
2018-05-24 09:39:22 +02:00
db35657a47 Adjust API version to match correct release
This fix was not yet included in Docker 17.05, so
API version v1.37 was not the right selector (Docker
18.03, 18.04 and 18.05 all support API v1.37).

We should change these checks for engine versions,
or use a different method to skip tests when running
against older engines.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a061b1e2d8f6117b0524e44de7b6bc391245864e
Component: engine
2018-05-24 02:39:56 +02:00
17b4dbf7d5 Bump API version to v1.38
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df5175e1ee955a429ac5a4f8bdfacffd4d066c26
Component: engine
2018-05-24 02:39:28 +02:00
1a3da70ee0 Merge pull request #37108 from thaJeztah/remove_unneeded_aliases
Various code-cleanup
Upstream-commit: 8e2f9203065987116aec9e2d2a1d5c7039e1a5d4
Component: engine
2018-05-24 01:38:56 +02:00
5fba89897b Minor refactor: use anyChanged() to detect changed flags
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df9a0c7797
Component: cli
2018-05-24 01:30:09 +02:00
467129b37c Fix cpu/memory limits and reservations being reset on service update
Before this change:
----------------------------------------------------

Create a service with reservations and limits for memory and cpu:

    docker service create --name test \
      --limit-memory=100M --limit-cpu=1 \
      --reserve-memory=100M --reserve-cpu=1 \
      nginx:alpine

Verify the configuration

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      },
      "Reservations": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      }
    }

Update just CPU limit and reservation:

    docker service update --limit-cpu=2 --reserve-cpu=2 test

Notice that the memory limit and reservation is not preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 2000000000
      },
      "Reservations": {
        "NanoCPUs": 2000000000
      }
    }

Update just Memory limit and reservation:

    docker service update --limit-memory=200M --reserve-memory=200M test

Notice that the CPU limit and reservation is not preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "MemoryBytes": 209715200
      },
      "Reservations": {
        "MemoryBytes": 209715200
      }
    }

After this change:
----------------------------------------------------

Create a service with reservations and limits for memory and cpu:

    docker service create --name test \
      --limit-memory=100M --limit-cpu=1 \
      --reserve-memory=100M --reserve-cpu=1 \
      nginx:alpine

Verify the configuration

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      },
      "Reservations": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      }
    }

Update just CPU limit and reservation:

    docker service update --limit-cpu=2 --reserve-cpu=2 test

Confirm that the CPU limits/reservations are updated, but memory limit and reservation are preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 104857600
      },
      "Reservations": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 104857600
      }
    }

Update just Memory limit and reservation:

    docker service update --limit-memory=200M --reserve-memory=200M test

Confirm that the Mempry limits/reservations are updated, but CPU limit and reservation are preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 209715200
      },
      "Reservations": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 209715200
      }
    }

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df43eb931e
Component: cli
2018-05-24 01:30:00 +02:00
75bf6c61a8 Adapt listeners to upstream API changes in go-systemd
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
Upstream-commit: 703c3c573599e20e1059d18f74cb4a05647587ae
Component: engine
2018-05-23 21:57:30 +02:00
8e008e90c3 Merge pull request #35246 from dperny/attachment-inspect
Output network attachment task information
Upstream-commit: 5a68e2617da4b18ea4bae9fb3205026bb541e8d4
Component: engine
2018-05-23 15:44:39 -04:00
9354c5146e Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-05-23 17:06:50 +00:00
c10f980d2a Merge component 'engine' from git@github.com:moby/moby master 2018-05-23 17:06:41 +00:00
33e8d89a75 Use go-systemd const instead of magic string in Linux version of dockerd
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
Upstream-commit: d393774a53e0a45486047a80ca4ae8faf5599386
Component: engine
2018-05-23 19:06:34 +02:00
93d19d1ff6 Bump go-systemd dependency to v17
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
Upstream-commit: 8991bac2e045b8cac4a289928ebb743e978bbfc5
Component: engine
2018-05-23 19:06:13 +02:00
b8ca625f10 Add filter support for stack ps and services with Kubernetes
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 1f7aa1c036
Component: cli
2018-05-23 18:27:27 +02:00
0f96e98e12 Various code-cleanup
remove unnescessary import aliases, brackets, and so on.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f23c00d8701e4bd0f2372a586dacbf66a26f9a51
Component: engine
2018-05-23 17:50:54 +02:00
7a450d43c0 Bump continuity
Fixes an issue where `CopyDir` would truncate files larger than 2^32
bytes.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 616fa9446e49502da501a7d0f92b13191f5058dd
Component: engine
2018-05-23 10:05:06 -04:00
144693e197 Merge pull request #36750 from kolyshkin/t-mount-seclabel
pkg/mount/TestMount: fix wrt selinux
Upstream-commit: 0846a02d549d3e0a28e7f7962b92af98992eba17
Component: engine
2018-05-23 15:22:37 +02:00
b08e109289 Merge pull request #37121 from thaJeztah/fix-exec-ids-itemtype
Set item-type for ExecIDs
Upstream-commit: bbca556a80b43ebd8383048bac03d49ac182e1a4
Component: engine
2018-05-23 11:56:47 +02:00
3f553880b1 Merge pull request #37119 from kolyshkin/test-top
TestContainerAPITop: fix flakyness
Upstream-commit: f800701008d4efdd5e92c117e99f49f343f22a93
Component: engine
2018-05-23 10:05:42 +02:00
4056a6dfa4 pkg/mount/TestMount: fix wrt selinux
Sometimes docker-master CI fails on rhel4+selinux configuration,
like this:

--- FAIL: TestMount (0.12s)
    --- FAIL: TestMount/none-remount,size=128k (0.01s)
    	mounter_linux_test.go:209: unexpected mount option "seclabel" expected "rw,size=128k"
    --- FAIL: TestMount/none-remount,ro,size=128k (0.01s)
    	mounter_linux_test.go:209: unexpected mount option "seclabel" expected "ro,size=128k"

Earlier, commit 8bebd42df2 (PR #34965) fixed this failure,
but not entirely (i.e. the test is now flaky). It looks like
either selinux detection code is not always working (it won't
work in d-in-d), or the kernel might or might not add 'seclabel'
option).

As the subject of this test case is definitely not selinux,
it can just ignore the option added by it.

While at it, fix error messages:
 - add missing commas;
 - fix a typo;
 - allow for clear distinction between mount
   and vfs (per-superblock) options.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d78e885326213e8ef89919c3cc6d16e712e852a8
Component: engine
2018-05-22 23:30:47 -07:00
de5a705143 Merge pull request #109 from corbin-coleman/golang-as-arg
Set GO_VERSION with a build arg
Upstream-commit: 05cbbc250f5d677ed43546042a38b2eacf45dbe1
Component: packaging
2018-05-22 22:10:56 -07:00
66dfe0e944 TestContainerAPITop: fix flakyness
The following failure is seen in CI from time to time:

> FAIL: docker_api_containers_test.go:435: DockerSuite.TestContainerAPITop
>
> docker_api_containers_test.go:453:
>     c.Assert(top.Processes[0][10], checker.Equals, "/bin/sh -c top")
> ... obtained string = "top"
> ... expected string = "/bin/sh -c top"

The test case expects two processes in the output:

1. /bin/sh -c top
2. top

in the given order.

Now, "ps aux" output is sorted by PID*, and so since the "top" is a child
of "/bin/sh -c top" it has a higher PID and will come second as expected
by the test... unless the PIDs on the system are exhausted and PID rollover
happens, in which case PID of "top" will be lower than that of "/bin/sh".

Fix: sort output by process name.

* - in fact it is not sorted, but is being printed in the same order as
    the kernel list PID entries in /proc directory, which appears to be
    sorted by PID (see ls -1 -U /proc).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 0823ab70990fa4cbf520726013e75c264e6c5231
Component: engine
2018-05-22 18:11:36 -07:00
312e1886d6 Merge pull request #37130 from AntaresS/endless-fixing
skip feature/test added which is breaking ee
Upstream-commit: de3eafeee1f310c169a584f56fcbd055581ed2b8
Component: engine
2018-05-22 14:50:31 -10:00
6280cae03a skip feature/test added that is breaking ee
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 84598be35f200bd0ea28a615100c51dbaeb51898
Component: engine
2018-05-22 17:42:41 -07:00
843828ae85 daemon/parsePsOutput: minor optimisation
It does not make sense to keep looking for PID once
we found it, so let's give it a break.

The side effect of this patch is, if there's more than one column
titled "PID", the last (rightmost) column was used before, and now
the first (leftmost) column is used. Should make no practical
difference whatsoever.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 654a7625fc9f0b7b04da0e0e4d151af04a65cc7f
Component: engine
2018-05-22 16:24:13 -07:00
53104fbd7c Update swagger and API history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3682703ad4a75ea489aa84cbaddcfa4697a4e57e
Component: engine
2018-05-22 23:37:33 +02:00
c0a75ea18d Output network attachment task information
Adds functionality to parse and return network attachment spec
information. Network attachment tasks are phony tasks created in
swarmkit to deal with unmanaged containers attached to swarmkit. Before
this change, attempting `docker inspect` on the task id of a network
attachment task would result in an empty task object. After this change,
a full task object is returned

Fixes #26548 the correct way.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5b69ff466e61fa168f24869710f2070c742a5565
Component: engine
2018-05-22 23:36:30 +02:00
69286fc044 Merge pull request #37105 from AntaresS/integration-cli-fix
more fixes on integration
Upstream-commit: bcaf8913695e5ad57868c8c82af58f9e699e7f59
Component: engine
2018-05-22 10:33:20 -10:00
60c2eac8bf daemon unit tests: skip some if non-root
This prevents the following test case failures "go test" is run
as non-root in the daemon/ directory:

> --- FAIL: TestContainerInitDNS (0.02s)
> 	daemon_test.go:209: chown /tmp/docker-container-test-054812199/volumes: operation not permitted
>
> --- FAIL: TestDaemonReloadNetworkDiagnosticPort (0.00s)
>	reload_test.go:525: mkdir /var/lib/docker/network/files/: permission denied
> --- FAIL: TestRootMountCleanup (0.00s)
> 	daemon_linux_test.go:240: assertion failed: error is not nil: operation not permitted

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 16670ed4842b1ee4853ba39b6ebf2b771d28db9a
Component: engine
2018-05-22 13:12:29 -07:00
52fa1b62cd Merge pull request #110 from thaJeztah/remove-pigz-on-centos
Remove pigz requirement for CentOS
Upstream-commit: 4d5e0466854e97ef3a1b6716bc0c09790d3503ec
Component: packaging
2018-05-22 12:49:23 -07:00
717e3937b9 more fixes on integration
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: b9b4f888703a20ddd7670c1b978dcb1621fa210f
Component: engine
2018-05-22 11:25:25 -07:00
2723d4de1c Remove ENV GO_VERSION
Signed-off-by: corbin-coleman <corbin.coleman@docker.com>
Upstream-commit: 0f1be47e8644032d7c3cfa1762d20ec41a123a0f
Component: packaging
2018-05-22 10:56:53 -07:00
b2590cad0f Merge component 'engine' from git@github.com:moby/moby master 2018-05-22 17:07:26 +00:00
44fb51a14e Merge component 'cli' from git@github.com:docker/cli master 2018-05-22 16:41:36 +00:00
274de24328 Merge pull request #1070 from taiji-tech/master
Update document links of help and comments to make it up-to-date
Upstream-commit: fd6165399d
Component: cli
2018-05-22 16:00:10 +02:00
98885f36d7 Update document links and title.
Signed-off-by: taiji-tech <csuhqg@foxmail.com>
Upstream-commit: 5119c4d8ef
Component: cli
2018-05-22 21:13:41 +08:00
15e10105c8 Remove pigz requirement for CentOS
The pigz binary is used to improve performance when
pulling images, but is not available in the default
CentOS package repositories.

Given that RPM's don't have a "recommends" option,
it's better to remove it as a requirement for now,
instead of failing to install for some users.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: abb1f117d3736fdcbbcc15ecef3e36d1f47c63fa
Component: packaging
2018-05-22 14:56:08 +02:00
d036351aa0 Merge pull request #1035 from mat007/kubernetes-check-hosts-match
For docker stack ls make an error if Swarm and Kubernetes hosts do not match
Upstream-commit: cc6ff56fd5
Component: cli
2018-05-22 14:50:09 +02:00
9d23e60e14 Merge pull request #1076 from vdemeester/fix-e2e-system
Fix e2e/system tests
Upstream-commit: 56fc890f35
Component: cli
2018-05-22 14:46:44 +02:00
de98e98ecd For docker stack ls make an error if Swarm and Kubernetes hosts do no match
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: bfe9aed63a
Component: cli
2018-05-22 14:39:48 +02:00
e48b3121b7 Fix e2e/system tests
a setup step is required and the test fails.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0016ff9c15
Component: cli
2018-05-22 14:36:41 +02:00
272a5bdcba Set item-type for ExecIDs
Arrays expect a type to be set for items in the array.

This patch adds the "string" type, adds a short description,
and some example values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8b6b55986644c093564497bfef51733a8d598baf
Component: engine
2018-05-22 13:18:44 +02:00
5657eef95c Merge pull request #35402 from thaJeztah/fix-GetTimestamp-parsing
Improve GetTimestamp parsing
Upstream-commit: da99009bbb1165d1ac5688b5c81d2f589d418341
Component: engine
2018-05-22 12:28:01 +02:00
ee3ee2f6b0 Merge pull request #37113 from thaJeztah/update-authors
Update authors and mailmap
Upstream-commit: dc65e85faeb2d984ea6e102fb4f5616859b1269f
Component: engine
2018-05-22 09:42:06 +02:00
4a53a3c7a9 Merge pull request #37106 from thaJeztah/unfork-cobra
Bump spf13/cobra to v0.0.3, pflag to v1.0.1
Upstream-commit: 032a4b6ef641d588556133b57c5fc2107680fcbb
Component: engine
2018-05-22 09:39:52 +02:00
61e64f5f40 Merge pull request #36962 from Rid/patch-1
Fix swagger file type for ExecIds
Upstream-commit: 8aa753329b04356b1f4ce46072c034ba6093b651
Component: engine
2018-05-22 09:39:09 +02:00
eba4c4ac67 Merge pull request #1072 from AntaresS/add-inspect-test
move inspect test from moby to cli
Upstream-commit: 0022bb83ea
Component: cli
2018-05-21 15:01:03 -10:00
0994dbd1ea Set GO_VERSION with a build arg
Use a variable in the Makefile to set the GO_VERSION for the builds.
GO_VERSION is defaulted in all Makefiles as `1.10.2`, but can be set when running make: `make GO_VERSION=1.10.1 deb`.

Signed-off-by: corbin-coleman <corbin.coleman@docker.com>
Upstream-commit: 0fe741746287335a5ba4afaf06be301915324e5a
Component: packaging
2018-05-21 15:58:06 -07:00
c83bf05cc2 move inspect test from moby to cli
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 2d8d5fcd30
Component: cli
2018-05-21 15:57:39 -07:00
364c8ffbeb Merge pull request #1043 from justyntemme/patch-2
Fix issue #850, Warn user of filter when pruning
Upstream-commit: 680c5790d5
Component: cli
2018-05-22 00:26:26 +02:00
beaa0fd5b3 Merge pull request #1069 from thaJeztah/bump-cobra-pflags
Update Cobra and pflag, and use built-in --version feature
Upstream-commit: 09115e3750
Component: cli
2018-05-21 15:23:16 -07:00
1eb50df5ea Merge pull request #1054 from thaJeztah/fix-host-rm-being-too-greedy
Fix service update --host-rm not being granular enough
Upstream-commit: 7bdd820f28
Component: cli
2018-05-21 15:21:06 -07:00
c631ba5714 Merge pull request #1053 from justyntemme/patch-3
Change error message for unreadable files
Upstream-commit: 9a89c32e9a
Component: cli
2018-05-22 00:12:46 +02:00
e94b458971 Merge pull request #1071 from AntaresS/fix-inspect-error
fix error message from docker inspect
Upstream-commit: 26123be73b
Component: cli
2018-05-21 20:39:59 +02:00
c7c3e2db9d fix error message from docker inspect
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: d2090430a6
Component: cli
2018-05-21 11:32:16 -07:00
b21cab8bb2 Merge pull request #37110 from thaJeztah/remove-testutil-errorcontains
Replace deprecated testutil.ErrorContains()
Upstream-commit: 9bd5d9912f0cb4fe22b994ac1e7e10038e3be65a
Component: engine
2018-05-21 11:04:45 -07:00
1a78af7e78 Merge pull request #37111 from thaJeztah/bump-libnetwork
bump libnetwork to eb6b2a57955e5c149d47c3973573216e8f8baa09
Upstream-commit: ee640c37c877f332c0df70df3b9a8c4885c82e65
Component: engine
2018-05-21 10:40:26 -07:00
7f9a2b5665 Merge component 'engine' from git@github.com:moby/moby master 2018-05-21 17:05:33 +00:00
5a2c31a017 Merge pull request #37086 from arm64b/some-tweaks-for-CI-tests
Some slight tweaks for the integration test
Upstream-commit: 52e22cf986c2113f720ac73f6a82c087ab5e4e76
Component: engine
2018-05-21 09:35:15 -07:00
dcdcd81207 Merge pull request #36995 from kolyshkin/aufs-err
aufs: log why aufs is not supported
Upstream-commit: b963b55a8a3fec0e97feeb07427a91e29c870284
Component: engine
2018-05-21 10:00:39 +02:00
06bc850fec Merge pull request #37090 from thaJeztah/de-noise-integration-cleanup
Make integration tests less noisy
Upstream-commit: b1efaeff61986c9bac739e12c80500cf0fadaefd
Component: engine
2018-05-21 09:58:37 +02:00
b179a3fc0d Some slight tweaks for the integration test
`arm64` needs get more time duration for the test to finish.

`pty.Start()` opens a file, so the caller should close it explicitly,
else the file I/O can result in unexpected data synchronization issue.

All those changes will not affect the test itself.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 476d7872efb60b1ef1bc7d9d83952f9dbc8f8798
Component: engine
2018-05-21 10:08:27 +08:00
bd96bdb953 Update authors and mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b7e722fe30ccde2a6081be4df3fa0d7354514ba3
Component: engine
2018-05-21 01:07:22 +02:00
f5c9209600 bump libnetwork to eb6b2a57955e5c149d47c3973573216e8f8baa09
Changes included:

- libnetwork#2147 Adding logs for ipam state
- libnetwork#2143 Fix race conditions in the overlay network driver
  - possibly addresses moby#36743 services do not start: ingress-sbox is already present
  - possibly addresses moby#30427 Flaky Test: TestSwarmPublishDuplicatePorts on s390
  - possibly addresses moby#36501 Flaky tests: Service "port" tests
- libnetwork#2142 Add wait time into xtables lock warning
- libnetwork#2135 filter xtables lock warnings when firewalld is active
- libnetwork#2140 Switch from x/net/context to context
- libnetwork#2134 Adding a recovery mechanism for a split gossip cluster

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 158ab95c17bed9e849e0d935899b75018cdf61a4
Component: engine
2018-05-21 00:37:54 +02:00
659852c34d Merge pull request #37011 from arm64b/ReAdd-LABEL-command-4-target-option
Construct and add 'LABEL' command from 'label' option to last stage 
Upstream-commit: 8974fd47c7677b21c43597709655136addadb864
Component: engine
2018-05-21 00:15:02 +02:00
fac8e1d52b Replace deprecated testutil.ErrorContains()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 55bebbaecf5e40db9d83b28080ce08dc8642f407
Component: engine
2018-05-21 00:13:04 +02:00
13ee218162 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-05-20 17:06:23 +00:00
af422f8bde Merge component 'engine' from git@github.com:moby/moby master 2018-05-20 17:06:15 +00:00
c2266b164c Improve GetTimestamp parsing
`GetTimestamp()` "assumed" values it could not parse
to be a valid unix timestamp, and would use invalid
values ("hello world") as-is (even testing that
it did so).

This patch validates unix timestamp to be a valid
numeric value, and makes other values invalid.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 48cfe3f0872647bf0f52e6ba65022e1859e808e8
Component: engine
2018-05-20 13:07:17 +02:00
91ebfe260a aufs: log reason why aufs is not supported.
In case aufs driver is not supported because supportsAufs() said so,
it is not possible to get a real reason from the logs.

To fix, log the error returned.

Note we're not using WithError here as the error message itself is the
sole message we want to print (i.e. there's nothing to add to it).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 91f85d1c784f3dc9d892b2af2f51d6b6f3b0be69
Component: engine
2018-05-20 12:02:41 +02:00
30e8f43743 aufs: use a single logger
Simplify the code by using a single logger instance.

While at it, use WithError in Umount.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c6e2af54256211b8ac757e9b25caa6fb6c9b3c6e
Component: engine
2018-05-20 12:02:12 +02:00
c03259c23d Merge pull request #37022 from cgxu519/overlayutils-addmsg
Add additional message when backendfs is extfs without d_type support
Upstream-commit: f9dd74deee364dd513615ea112e78008a946b3e5
Component: engine
2018-05-19 22:38:45 +02:00
4f52a192ac Fix swagger file type for ExecIds
Signed-off-by: Grant Millar <grant@seednet.eu>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 58a35eaede4b121cd57cdb41e67d3654a90a144a
Component: engine
2018-05-19 22:14:38 +02:00
3b0918309f Merge pull request #37088 from ohbarye/fix-typos-duplicated-the
Fix typos: remove duplicated "the"
Upstream-commit: 3646562a5cfbf93f987d0ccffe7ca1c3487036e2
Component: engine
2018-05-19 20:57:47 +02:00
1ed95ff31a Merge pull request #37091 from thaJeztah/fix-linting-errors
Fix some linting issues
Upstream-commit: 1b75e175842e5ef59284a1c8ca7d64e4d6b62384
Component: engine
2018-05-19 08:39:39 -10:00
822d607b79 Make integration cleanup step less noisy
The `deleteAllImages()` cleanup step in the integration suite was printing a
message for each image that was removed.

These messages were not very informative (given that `removeImage()` prints an
error if image removal failed), and made the test output harder to read
(more difficult to see error-conditions when scanning the output).

This patch removes the messages to make the output slightly less noisy.

Before this patch applied:

    --- PASS: TestBuildMultiStageOnBuild (7.15s)
    	main_test.go:32: Removing image sha256:9db3ddbaaadd52804d8a417081f68db41fd4b8f80c85c1b4c4aee2d9b584c074
    	main_test.go:32: Removing image sha256:7eeb04d90b5e62a99ac6a5b2c10b9ba54b89b176fe2783e41461581c482852b3
    	main_test.go:32: Removing image sha256:adf42475eefff99b4a611c1a5d8353c4d0a011a7f7b9dc59a75d951cd54fa77f
    	main_test.go:32: Removing image sha256:c547a770806e0445f5dfc255683ced771a23be6157ba8d0617bb9ab55dcee6d1
    	main_test.go:32: Removing image sha256:b79659c3e6d34faf2a075f1df1ea2c805833982f112666b25a466177b5d1352d
    	main_test.go:32: Removing image sha256:29430078cdc927c19c87416cd1fb1ec386f167c5e201ee5dfb1644dcf268a3c2
    === RUN   TestBuildUncleanTarFilenames
    --- PASS: TestBuildUncleanTarFilenames (2.47s)
    	main_test.go:32: Removing image sha256:0a6418fb221dc2f25085a1a7e507e01c4a3938cc5c65f1cb85a8c0fb09d6814f
    	main_test.go:32: Removing image sha256:3d6e4bd0cce01ce5823b40dcb717cd16b3b4b769ff73dd86fa448aac49aa6d7c
    	main_test.go:32: Removing image sha256:98e3f335e874612668335b3a5f125a1e5cbd0f6c79a7c3f719529b69d0abf2a5
    	main_test.go:32: Removing image sha256:08919f344b382fd1447da7f3e8ffd2a7125f5f7d191ed7d33242736dbe3c59cf
    	main_test.go:32: Removing image sha256:d144b3c13838e841ec319a17e1046471d726bb2aa3211e167a6a53f766a2dcdc
    	main_test.go:32: Removing image sha256:7c768ec742d628020f50c99dc5af32400b78534ca9fc4c01a9f00ec0ab19193a
    	main_test.go:32: Removing image sha256:4c26c71d142045fbf3448aa1f6363d5a7a803cb438a78a4b20b7c847df03d50a
    	main_test.go:32: Removing image sha256:08dcd63c964f2dbb17ff2665b6b86993fb14c0d3e169da187ac48f078a560d25
    	main_test.go:32: Removing image sha256:c1743fab233f36f2d7f83cb13f8c10ff06bdbda8f8a218d25a3796d1bc2f9e84
    === RUN   TestBuildMultiStageLayerLeak
    --- PASS: TestBuildMultiStageLayerLeak (5.59s)
    	main_test.go:32: Removing image sha256:5e9974558276c34d7c9aab3fad408d433047b7b15bdae43ab5048adc58a15431
    	main_test.go:32: Removing image sha256:ac3c613c8c48794237c1e46ac0657ebbb1132910a240086bb2e9df9770fdc017
    	main_test.go:32: Removing image sha256:a936df268131ad427f7b4b66ce3dbb1e41866d7269a4d383cebcb1c5930d3346
    	main_test.go:32: Removing image sha256:5e613ea0ce7dbc908b0315c49585ae43ad6c34158e9e0b59a3dc93b00ef0ea41
    	main_test.go:32: Removing image sha256:e676f4ec41a42823b6d91e05e3290d3827f9175dea6fba5d8b769aa13aa7e082
    	main_test.go:32: Removing image sha256:93c8daab2703126b23d957d4d6b04f07949356f1cd95d4f8fdbededf4ab5c21e

With this patch applied:

    === RUN   TestBuildMultiStageOnBuild
    --- PASS: TestBuildMultiStageOnBuild (6.74s)
    === RUN   TestBuildUncleanTarFilenames
    --- PASS: TestBuildUncleanTarFilenames (2.49s)
    === RUN   TestBuildMultiStageLayerLeak
    --- PASS: TestBuildMultiStageLayerLeak (5.14s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5afce21e2efe572be3a256b748bf269afdd645a5
Component: engine
2018-05-19 17:34:48 +02:00
c53f559578 Remove unused help command
dockerd has no subcommands, so the help command
is not used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 298a26e0b2d086a32f14ee675bf24322cc92ddd4
Component: engine
2018-05-19 03:20:27 +02:00
8497f34c11 Use Cobra built-in --version feature
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0c3192da8c0686b1fe6aba393c1d3279e41c48a0
Component: engine
2018-05-19 03:15:08 +02:00
f19625f9c4 Use HasAvailableFlags instead of HasFlags for Options in help
> HasAvailableFlags checks if the command contains any flags (local
> plus persistent from the entire structure) which are not hidden or
> deprecated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9411856536ef49883fb3550fd1ee804ab99c4072
Component: engine
2018-05-19 03:10:23 +02:00
863c9ae33b Bump spf13/cobra to v0.0.3, pflag to v1.0.1
Use a tagged release of Cobra. All relevant PR's were merged, so the fork is
no longer needed.

Relevant changes:

- spf13/cobra#552 Add a field to disable [flags] in UseLine()
- spf13/cobra#567 Add `CalledAs` method to cobra.Command
- spf13/cobra#580 Update error message for missing required flags
- spf13/cobra#584 Add support for --version flag
- spf13/cobra#614 If user has a project in symlink, just use its destination folder and work there
- spf13/cobra#649 terminates the flags when -- is found in commandline
- spf13/cobra#662 Add support for ignoring parse errors
- spf13/cobra#686 doc: hide hidden parent flags

Also various improvements were added for generating Bash
completion scripts (currently not used by us)

Fixes usage output for dockerd;

Before this update:

    dockerd --help

    Usage:	dockerd COMMAND

    A self-sufficient runtime for containers.

After this update:

    dockerd --help

    Usage:	dockerd [OPTIONS] [flags]

    A self-sufficient runtime for containers.

Bump spf13/pflag to v1.0.1

Relevant changes:

- spf13/pflag#106 allow lookup by shorthand
- spf13/pflag#113 Add SortFlags option
- spf13/pflag#138 Generate flag error output for errors returned from the parseFunc
- spf13/pflag#141 Fixing Count flag usage string
- spf13/pflag#143 add int16 flag
- spf13/pflag#122 DurationSlice: implementation and tests
- spf13/pflag#115 Implement BytesHex type of argument
- spf13/pflag#150 Add uintSlice and boolSlice to name prettifier
- spf13/pflag#155 Add multiline wrapping support
- spf13/pflag#158 doc: clarify difference between string slice vs. array
- spf13/pflag#160 add ability to ignore unknown flags
- spf13/pflag#163 Allow Users To Show Deprecated Flags

Hide [flags] in usage output

Hides the [flags] in the usage output of commands (present in newer
versions of Cobra), using the `.DisableFlagsInUseLine` option.

Before this change:

    dockerd --help

    Usage:	dockerd [OPTIONS] [flags]

    A self-sufficient runtime for containers.

After this change:

    dockerd --help

    Usage:	dockerd [OPTIONS]

    A self-sufficient runtime for containers.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Â#	modified:   vendor/github.com/spf13/pflag/string_array.go
§

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ed75c7727bf3e454a5faa6baf686de12152d911c
Component: engine
2018-05-19 03:09:32 +02:00
31fc695941 Hide [flags] in usage output
This patch hides the [flags] in the usage output of commands, using the
new `.DisableFlagsInUseLine` option, instead of the temporary workaround
added in 8e600e10f7

Before this change:

    docker run
    "docker run" requires at least 1 argument.
    See 'docker run --help'.

    Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...] [flags]

    Run a command in a new container

After this change:

    docker run
    "docker run" requires at least 1 argument.
    See 'docker run --help'.

    Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

    Run a command in a new container

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00d080269a
Component: cli
2018-05-19 02:51:55 +02:00
6e165aeab9 Use Cobra built-in --version feature
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a3fe7d62b8
Component: cli
2018-05-19 02:51:43 +02:00
efb6dd914b Bump spf13/cobra to v0.0.3, spf13/pflag to v1.0.1
Use a tagged release of Cobra

Relevant changes:

- spf13/cobra#567 Add `CalledAs` method to cobra.Command
- spf13/cobra#580 Update error message for missing required flags
- spf13/cobra#584 Add support for --version flag
- spf13/cobra#614 If user has a project in symlink, just use its destination folder and work there
- spf13/cobra#649 terminates the flags when -- is found in commandline
- spf13/cobra#662 Add support for ignoring parse errors
- spf13/cobra#686 doc: hide hidden parent flags

Also various improvements were added for generating Bash
completion scripts (currently not used by us)

Bump spf13/pflag to v1.0.1

Relevant changes:

- spf13/pflag#122 DurationSlice: implementation and tests
- spf13/pflag#115 Implement BytesHex type of argument
- spf13/pflag#150 Add uintSlice and boolSlice to name prettifier
- spf13/pflag#155 Add multiline wrapping support
- spf13/pflag#158 doc: clarify difference between string slice vs. array
- spf13/pflag#160 add ability to ignore unknown flags
- spf13/pflag#163 Allow Users To Show Deprecated Flags

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0acb2522bd
Component: cli
2018-05-19 02:51:33 +02:00
dadd139cae Merge pull request #104 from seemethere/196
Update go to 1.10.2
Upstream-commit: 1aa5fac79de0c2a8116aca3604f76e9dec95f380
Component: packaging
2018-05-18 14:47:52 -07:00
e12e0fd6ad Update go to 1.10.2
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 9d2cf19fe46ab7c5c3ff5273b14cae025c5c0849
Component: packaging
2018-05-18 21:28:59 +00:00
b1ae28ae90 Update go to 1.9.6
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: a753f12d5276e8971b0c0e072c7960b7d0ebbb13
Component: packaging
2018-05-18 21:28:44 +00:00
71deb21459 Merge pull request #37104 from seemethere/rem
Remove references to old release process
Upstream-commit: 76e43532f60355220619b5ff808c0d2cd4bd624b
Component: engine
2018-05-18 21:21:44 +02:00
8729f289fc Merge pull request #37101 from TetsujinOni/local-escape-typo
Rewrote data-root escape error message
Upstream-commit: 7195df32062bf57e9f0f86d3b03453ed0b7508b5
Component: engine
2018-05-18 14:56:48 -04:00
7a1680b13a Remove references to old release process
This hasn't been the way to release Docker for the past year so let's
just remove them altogether

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 80bc8b4766cc808186af91930152d78afb22aef8
Component: engine
2018-05-18 18:28:43 +00:00
db335a4398 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-05-18 17:07:05 +00:00
3aa2f160d0 Merge component 'engine' from git@github.com:moby/moby master 2018-05-18 17:06:57 +00:00
f2fa4c2c77 Merge component 'cli' from git@github.com:docker/cli master 2018-05-18 16:41:34 +00:00
1bbbe71c5b Merge pull request #35410 from soulshake/soulshake-precpu-to-percpu-api-docs
Replace 'precpu' with 'percpu' in API docs.
Upstream-commit: 1ae8ca9e0c56b4aec8c0684bc9e20b8291d622f8
Component: engine
2018-05-18 17:26:37 +02:00
a57d540856 Amended per cleanup request.
Signed-off-by: Jonathan Choy <oni@tetsujinlabs.com>
Upstream-commit: e4186ba7087b61e1d770fa087cd46729bbfda32e
Component: engine
2018-05-18 11:09:35 -04:00
f415b9c697 Merge pull request #1066 from mauroporrasp/patch-1
Minor fix: "stdin" instead of "stding"
Upstream-commit: 824ce49aff
Component: cli
2018-05-18 16:39:50 +02:00
771b7b3484 Minor fix: "stdin" instead of "stding"
Signed-off-by: Mauro Porras P <mauroporrasp@gmail.com>
Upstream-commit: acf3d2d95a
Component: cli
2018-05-18 08:48:42 -05:00
0e83593715 Merge pull request #1065 from thaJeztah/fix-kube-alignment
Fix component information alignment
Upstream-commit: b15c3cfec9
Component: cli
2018-05-18 14:54:42 +02:00
1dc5256c77 Fix component information alignment
The `docker version` output now uses a tabwriter, so use single
tabs to print the output.

Before this change:

    Server:
     Engine:
      Version:      18.05.0-ce
      API version:  1.37 (minimum version 1.12)
      Go version:   go1.10.1
      Git commit:   f150324
      Built:        Wed May  9 22:20:16 2018
      OS/Arch:      linux/amd64
      Experimental: true
     Kubernetes:
      Version:     v1.9.6
      StackAPI:                   v1beta2

After this change:

    Server:
     Engine:
      Version:      18.05.0-ce
      API version:  1.37 (minimum version 1.12)
      Go version:   go1.10.1
      Git commit:   f150324
      Built:        Wed May  9 22:20:16 2018
      OS/Arch:      linux/amd64
      Experimental: true
     Kubernetes:
      Version:     v1.9.6
      StackAPI:    v1beta2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 26d8122594
Component: cli
2018-05-18 14:46:23 +02:00
baeeaceada Merge pull request #1034 from mat007/kubernetes-orchestrator-query-ucp
Better user experience with Kubernetes namespaces for UCP
Upstream-commit: 7de6aaec17
Component: cli
2018-05-18 14:39:44 +02:00
b6e3522638 Query UCP Kubernetes user namespaces endpoint
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: bd20885ac8
Component: cli
2018-05-18 11:44:15 +02:00
802dab1037 Bump moby to d37f5c6bdf788a6cb82c07fb707e31a240eff5f9
Also bringing:
. golang.org/x/net 5561cd9b4330353950f399814f427425c0a26fd2
. github.com/docker/distribution 83389a148052d74ac602f5f1d62f86ff2f3c4aa5
. github.com/docker/swarmkit bd69f6e8e301645afd344913fa1ede53a0a111fb
. github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18
. github.com/prometheus/client_golang 52437c81da6b127a9925d17eb3a382a2e5fd395e
. github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
. 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

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 5d54584f03
Component: cli
2018-05-18 11:44:14 +02:00
48d3d7fdc0 Merge pull request #1063 from nkwangleiGIT/master
Update some document links of help markdown files
Upstream-commit: 3c45963646
Component: cli
2018-05-18 11:34:17 +02:00
c3521e7da6 Add additional message when backendfs is extfs without d_type support
ext4 support d_type by default, but filetype feature is a tunable so
there is still a chance to disable it for some reasons. In this case,
print additional message to explicitly tell how to support d_type.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Upstream-commit: 8a21b128d4deb874c05eb81ebbc1265175ad69ba
Component: engine
2018-05-18 10:32:47 +08:00
17f09f5a4d Rewrote data-root escape error message
Signed-off-by: Jonathan Choy <jonathan.j.choy@gmail.com>
Upstream-commit: 1845cd0d86f0c85115bbf7cdc806c114096751a9
Component: engine
2018-05-17 21:52:03 -04:00
8e669c6a70 Merge pull request #108 from seemethere/wheezy
Remove Debian Wheezy, EOL 31-05-2018
Upstream-commit: 98df9315ccf80b18546921968f3881080fa6ccf0
Component: packaging
2018-05-17 18:47:26 -07:00
5e0facecb2 Remove Debian Wheezy, EOL 31-05-2018
Debian Wheezy will be EOL on 31-05-2018 per the official documentation,
https://wiki.debian.org/LTS

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 0e45aed95d86bc516b9cd05f3316073e8dda0a0b
Component: packaging
2018-05-17 22:22:04 +00:00
5269a56d32 Merge pull request #106 from seemethere/remove_f26
Remove Fedora 26
Upstream-commit: 4fc747eac9a6828ec94094dac442ba3f72192251
Component: packaging
2018-05-17 15:21:01 -07:00
49df6e1d6f Merge pull request #107 from seemethere/reflect
Make DOCKER_BUILD_PKGS reflective
Upstream-commit: b523944cf7a026b0b674b2580f4c635fb6660e26
Component: packaging
2018-05-17 15:10:11 -07:00
e4bec6da7c Merge pull request #37084 from nwneisen/update-ring-buffer-documents
Update documentation for RingLogger's ring buffer
Upstream-commit: 59698778fe9301225c456886f7b67d2e43703a05
Component: engine
2018-05-17 12:10:44 -07:00
7f78f7fe15 Fix some linting issues
These showed locally when running `make validate`. CI doesn't seem to have the
same (possibly it's disabled in the configuration)

    builder/fscache/fscache.go:618::error: github.com/docker/docker/vendor/github.com/tonistiigi/fsutil.StatInfo composite literal uses unkeyed fields (vet)
    client/swarm_unlock_test.go:44::error: github.com/docker/docker/api/types/swarm.UnlockRequest composite literal uses unkeyed fields (vet)
    client/swarm_unlock_test.go:20::error: github.com/docker/docker/api/types/swarm.UnlockRequest composite literal uses unkeyed fields (vet)
    cmd/dockerd/daemon_unix.go:113::error: github.com/docker/docker/cmd/dockerd/hack.MalformedHostHeaderOverride composite literal uses unkeyed fields (vet)
    cmd/dockerd/daemon_unix.go:110::error: github.com/docker/docker/cmd/dockerd/hack.MalformedHostHeaderOverride composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay/overlay.go:171::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay/overlay.go:413::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay2/overlay.go:203::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay2/overlay.go:584::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/zfs/zfs.go:109::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/zfs/zfs.go:388::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/volumes_windows.go:27::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    integration/service/network_test.go:31::error: github.com/docker/docker/api/types/network.NetworkingConfig composite literal uses unkeyed fields (vet)
    api/server/server.go:129:10⚠️ should not use basic type string as key in context.WithValue (golint)
    integration/service/network_test.go:54::error: github.com/docker/docker/api/types/network.NetworkingConfig composite literal uses unkeyed fields (vet)
    libcontainerd/client_daemon_linux.go:61::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    libcontainerd/client_daemon_linux.go:74::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    pkg/archive/archive_windows.go:76::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    plugin/manager_linux.go:56::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4f8c870d623c63b98f8ef8002448f07f4dda4aa9
Component: engine
2018-05-17 19:28:27 +02:00
3f80548421 Merge component 'engine' from git@github.com:moby/moby master 2018-05-17 17:05:10 +00:00
01a80b2713 Merge component 'cli' from git@github.com:docker/cli master 2018-05-17 16:41:20 +00:00
3d5979d637 Merge pull request #37075 from tuscloud/fix-typos
Fix typos
Upstream-commit: 9aac187ce1592249ab5f1556d362f2b48ff9c671
Component: engine
2018-05-17 16:00:43 +02:00
16c7354fa4 Merge pull request #37074 from skyc024/fix-typos
Fix typos
Upstream-commit: 6a9bcc51df541ea0dedf038e8e88fe556239ef70
Component: engine
2018-05-17 16:00:26 +02:00
17b1295241 Highlight meaning of 'precpu' (i.e. 'previous').
Signed-off-by: AJ Bowen <aj@soulshake.net>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b7fe0b6359dcbefd269c13ee4649d9247539cd18
Component: engine
2018-05-17 14:57:44 +02:00
d1519025fc Merge pull request #1061 from eiais/fishupdate
Update Events, Exec, Export, History, Images, Import, Inspect, Load, and Login subcommand fish completions
Upstream-commit: 6bab4a2a94
Component: cli
2018-05-17 14:50:29 +02:00
111037b920 Fix typos: remove duplicated "the"
Signed-off-by: Masato Ohba <over.rye@gmail.com>
Upstream-commit: 0f95b23d98384a3ae3769b75292cd5b14ba38437
Component: engine
2018-05-17 21:49:51 +09:00
f14d2550f6 Merge pull request #37071 from mat007/custom-request
Extend client API with custom HTTP requests
Upstream-commit: d37f5c6bdf788a6cb82c07fb707e31a240eff5f9
Component: engine
2018-05-17 11:09:49 +02:00
7273d67395 Remove unused 'label' related functions
Since we use `NewLabelCommand()` instead of `addNodesForLabelOption()`
to create the 'LABEL' commands from '--label' options, so all the related
functions should be removed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: c7b543164daed58fbea36471592438b4e53ab748
Component: engine
2018-05-17 09:41:06 +08:00
e46ae6ff6c Add test case for --label with --target
Add a new test case `TestBuildLabelWithTargets` to cover the Docker builder
with both `--label` and `--target` options.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: f7add4262b69294aa8035c4794236193ce4bc68e
Component: engine
2018-05-17 09:41:06 +08:00
0b32e0ce4f Add 'LABEL' command from '--label' to the last stage
This PR is tring to fix issue #36996.

Currently for multi-stage build, if `--target` specified, the `--label` option
will be ignored. The root cause is the last stage build will remove the `LABEL`
command(s) node created from the `--label` option. In order to address this issue,
we can create `LABEL` command(s) and add it/tem to the last stage.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 9c238ebd55e4105ad7f7edc04231ea61bb278ae8
Component: engine
2018-05-17 09:40:19 +08:00
7321d16dc7 Update documentation for RingLogger's ring buffer
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
Upstream-commit: 3521d534e5c9338ae5605d1228554862e922a8a9
Component: engine
2018-05-16 18:52:50 -06:00
b38bc2a3c0 Merge pull request #1040 from cyli/deprecated-engine-labels
Document reserved namespaces deprecation
Upstream-commit: 96dba79d99
Component: cli
2018-05-16 23:16:28 +02:00
7fa75adc44 Document that reserved namespaces org.docker.*, io.docker.*, and
org.dockerproject.* in engine labels are now deprecated.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 7470d460f6
Component: cli
2018-05-16 14:06:37 -07:00
cbe1e262f7 Merge pull request #974 from simonferquel/compose-kube-env-expansion
[K8s] Do env-variable expansion on the uninterpreted Config files
Upstream-commit: bac0d8f353
Component: cli
2018-05-16 20:18:41 +02:00
6f83cf6fa8 Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: nkwangleiGIT <nkwanglei@126.com>
Upstream-commit: b6def77c55
Component: cli
2018-05-16 20:16:08 +08:00
72379c4a70 Merge pull request #37076 from arm64b/TestExecInteractiveStdinClose
Fix flaky test case of `TestExecInteractiveStdinClose`
Upstream-commit: b7b6b6929c6436145bd12e6fef7efb7d01fa170b
Component: engine
2018-05-16 09:51:28 +02:00
7d44629ea2 Fix typos
Signed-off-by: chenyuzhu <chenyuzhi@oschina.cn>
Upstream-commit: 5ac0d2f0b83e65f49b490e9d20c7a5b0e65f8e55
Component: engine
2018-05-16 15:31:12 +08:00
cd4f86fbb3 Merge pull request #37064 from tonistiigi/jsonmessage-aux
jsonmessage: pass message to aux callback
Upstream-commit: ab3cdd2b1bc1f6c2410a1ca28d0034eb6edcd1ef
Component: engine
2018-05-15 20:50:19 -10:00
635742da67 Merge pull request #37003 from AntaresS/fix-integration-cli-for-e2e
Fix integration tests and integration cli to run on older versions
Upstream-commit: a41051a9e43fe5b9caaee61210df8498fe876d97
Component: engine
2018-05-15 21:10:37 -07:00
422bb44235 Make client underlying HTTP client accessible
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 5a84124739a809bcdb5830fd385440027ddd910f
Component: engine
2018-05-16 05:24:11 +02:00
42dc03897a Fix flaky test case of TestExecInteractiveStdinClose
This issue has been reported by issue #36877.

The purpose of this test case is for the regression test of #12546,
so we only need to make sure the essential of the testing is still
in the way to check that while not disturbed by some testing noises,
which is exactly what this PR want to do.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 96abf9f59ebd350cc9a70034b4d30279e6ae04e4
Component: engine
2018-05-16 10:01:44 +08:00
9e6796b652 Fix typos
Signed-off-by: weipeng <weipeng@tuscloud.io>
Upstream-commit: f781ec45b5c1745279f0429c2b7f19c793efcb85
Component: engine
2018-05-16 09:15:43 +08:00
a24b673f22 fix and skip some tests based on API version
Signed-off-by: Anda Xu <anda.xu@docker.com>

Co-authored-by: Anda Xu <anda.xu@docker.com>
Co-authored-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e440831802a500b28ecf16c2627a294dc31dfeb9
Component: engine
2018-05-15 16:05:04 -07:00
24dab0a4ea Merge pull request #36971 from emanb29/6478-documentHostIP
Describe IP field of Port definition
Upstream-commit: 85a8252c47538ac90c30090574b6e9f1795bb6b7
Component: engine
2018-05-15 11:48:44 -07:00
e191ac7ace Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-05-15 17:07:36 +00:00
6efa476216 Merge component 'engine' from git@github.com:moby/moby master 2018-05-15 17:07:29 +00:00
233d1d1cd2 Merge component 'cli' from git@github.com:docker/cli master 2018-05-15 16:41:42 +00:00
d8a9cf51bb Merge pull request #37070 from vdemeester/fix-master
Fix logging test type
Upstream-commit: c0d39a1819f4a51fd98ce0f203e0894a540d5a0c
Component: engine
2018-05-15 17:52:35 +02:00
d82d36fd4a Merge pull request #1031 from mat007/kubernetes-orchestrator-all
Better stack list experience with Kubernetes and Swarm
Upstream-commit: 5a5b880251
Component: cli
2018-05-15 17:26:41 +02:00
7a57bbc2b9 Support multiple namespaces for docker stack ls
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 84241cc393
Component: cli
2018-05-15 16:52:21 +02:00
46fae6da7e Support 'all' in orchestrator flag for docker stack ls
All other docker stack commands report an error when passed this value.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 4d947de292
Component: cli
2018-05-15 15:38:41 +02:00
c4764c184a Fix logging test type
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 25494e4c74f31551ef06e6e2df4e1119cd83250e
Component: engine
2018-05-15 15:04:46 +02:00
6c90b56fe9 Merge pull request #37051 from wagoodman/patch-1
image spec v1 formatting fix
Upstream-commit: 04864cb3cb526ddeee70dc6e17a6c7802ef91a0b
Component: engine
2018-05-15 14:00:53 +02:00
131639fdf7 Merge pull request #37028 from cpuguy83/log_plugin_broken_pipe
Fix logging plugin crash unrecoverable
Upstream-commit: 6821ffd1a11f188d6b1c3e8da01885768e027586
Component: engine
2018-05-15 13:57:01 +02:00
9ebdda8c43 Merge pull request #37033 from cpuguy83/some_container_network_cleanups
Some container/network cleanups
Upstream-commit: 6f68db8c7a94489b5e66bb828f748d0baa2e5c22
Component: engine
2018-05-15 13:23:41 +02:00
8373fcb573 Describe IP field of Port definition
Signed-off-by: Ethan Bell <ebgamer29@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 13e0b2651082878f8f17669df3f97ab252a9e095
Component: engine
2018-05-15 12:09:42 +02:00
14395e1de7 Merge pull request #37062 from cpuguy83/fix_logs_daemon_race
Fix race conditions in logs API
Upstream-commit: 07dc3aa685ffd500ada1c41f8a9b7eaf74cf09eb
Component: engine
2018-05-15 11:59:40 +02:00
f2fea2ebf4 Merge pull request #37063 from cpuguy83/fix_log_rotation_issue
Fix some issues in logfile reader and rotation
Upstream-commit: 26da99e326bf7cbfad820395f5379bba7a66c4a5
Component: engine
2018-05-15 11:46:29 +02:00
e35dd65158 Merge pull request #37044 from yongtang/03112018-TestDockerNetworkConnectAlias-name
Avoid unique name usage in TestDockerNetworkConnectAlias
Upstream-commit: 829dcefa9d090f5101947ee14074d1f37e44468b
Component: engine
2018-05-15 11:46:11 +02:00
4347082deb Merge pull request #37060 from cpuguy83/fix_swagger_gen
Fix swagger volume type generation
Upstream-commit: bcd86fc2acd3ef22a7fc6c662c7ae8a67b0bb4f4
Component: engine
2018-05-15 11:46:02 +02:00
c4cff872f5 Fix typo in golden file name
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 0d7bb8adaa
Component: cli
2018-05-15 10:09:47 +02:00
3a0e583232 jsonmessage: pass message to aux callback
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f784907eae4f2e8bd4d9dea3d45c790c92689f3d
Component: engine
2018-05-14 15:48:25 -07:00
fa0e6a4fbc Merge pull request #105 from thaJeztah/remove-experimental
Remove "experimental" env-vars
Upstream-commit: b2dd1df6d30da0b57a8838120b82c6c129414c85
Component: packaging
2018-05-14 15:44:12 -07:00
474c06b936 Make DOCKER_BUILD_PKGS reflective
The hardcoded values make it so that we have to update this everytime we
add/subtract something which is sometimes followed/not followed.

This makes it so that we no longer have to update this.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 04ec3b020edc79830c5a0100790f5bb6686d8efc
Component: packaging
2018-05-14 22:42:03 +00:00
27a5d95881 Remove Fedora 26
Fedora 26 will be EOL one month after the release of Fedora 28
(2018-05-01)

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: c638836c18d26c5f7e4602784d6b1c7d13f39904
Component: packaging
2018-05-14 22:37:26 +00:00
d1d5dd5da5 Merge pull request #37030 from adshmh/refactor-service-create-integration-tests-use-swarm-create-service
Refactor service create integration tests to use swarm CreateService
Upstream-commit: 6de3be1366cda7b24f02dfae7f9abd036b9c7094
Component: engine
2018-05-14 14:07:22 -07:00
9488201604 Fix logging plugin crash unrecoverable
In cases where a logging plugin has crashed when the daemon tries to
copy the container stdio to the logging plugin it returns a broken pipe
error and any log entries that occurr while the plugin is down are lost.

Fix this by opening read+write in the daemon so logs are not lost while
the plugin is down.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e7479e3ab8128f9e84cc640f0bed4e77b268a6e9
Component: engine
2018-05-14 16:51:56 -04:00
b600301f4e Fix some issues in logfile reader and rotation
- Check errors.Cause(err) when comparing errors
- Fix bug where oldest log file is not actually removed. This in
particular causes issues when compression is enabled. On rotate it just
overwrites the data in the log file corrupting it.
- Use O_TRUNC to open new gzip files to ensure we don't corrupt log
files as happens without the above fix.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e87e9e6ad6ba501cc42a2ef47ac18c88a68f258f
Component: engine
2018-05-14 15:52:18 -04:00
5e354ed533 Fix race conditions in logs API
Closing the log driver was in a defer meanwhile logs are
collected asyncronously, so the log driver was being closed before reads
were actually finished.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2c252a48c252749d41079cf8c450d00a5c18296e
Component: engine
2018-05-14 15:48:32 -04:00
1cb0dc30a7 Fix swagger volume type generation
This was broken by bf6a790f00ab96bb8857e3c73502909ee5e36217

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b16b125bb4326e2eec9948fd54ca8c5d83eba36a
Component: engine
2018-05-14 13:46:20 -04:00
f7c75f37ec Merge component 'engine' from git@github.com:moby/moby master 2018-05-14 17:06:38 +00:00
74db940ed7 Avoid unique name usage in TestDockerNetworkConnectAlias
In TestDockerNetworkConnectAlias the network and container
names used are unique which are not preferred. This
fix address the issue by appending t.Name() so that
names are randomized.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e7b5f4500dc77ec55e5ef202065fbc92218ce394
Component: engine
2018-05-14 16:59:13 +00:00
784c17c2c1 Merge component 'cli' from git@github.com:docker/cli master 2018-05-14 16:41:42 +00:00
de8a0bba09 Merge pull request #37034 from cpuguy83/moar_metrics
Add metrics for log failures/partials
Upstream-commit: ab0dccf80174fa5eef4583a0235b0bf57bdff8df
Component: engine
2018-05-14 18:05:30 +02:00
96a20527d5 Merge pull request #1048 from thaJeztah/bump-golang-1.10.2
Bump Golang to 1.10.2
Upstream-commit: 5aa9d6a35f
Component: cli
2018-05-14 16:20:46 +02:00
c0eb53edfc Bump Golang to 1.10.2
Go 1.10 release notes: https://golang.org/doc/go1.10

Go 1.10: https://github.com/golang/go/issues?q=milestone%3AGo1.10
Go 1.10.1: https://github.com/golang/go/issues?q=milestone%3AGo1.10.1
Go 1.10.2: https://github.com/golang/go/issues?q=milestone%3AGo1.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ee7aa76cff
Component: cli
2018-05-14 16:04:13 +02:00
70cd643c8a Merge pull request #37040 from thaJeztah/error_on_unsupported_options
overlay: do not ignore invalid storage-driver options
Upstream-commit: a79d04ae55196f73d67eeb8a40cfbeb67fed95e9
Component: engine
2018-05-14 15:37:33 +02:00
09aea6c1ab Merge pull request #1055 from mat007/fix-invalid-orchestrator-silently-ignored
Make an error for an invalid orchestrator
Upstream-commit: 161bc1ed3c
Component: cli
2018-05-14 15:34:01 +02:00
7fb4806d90 Merge pull request #36991 from kolyshkin/slice-in-place
daemon.setMounts(): copy slice in place
Upstream-commit: 31aca4bef4d976ae4e7fb559da52745a3a295100
Component: engine
2018-05-14 13:49:47 +02:00
be4eb540c9 Merge pull request #1045 from ieugen/ieugen/patch-1
Added description about pids count.
Upstream-commit: fdf94de537
Component: cli
2018-05-14 13:32:47 +02:00
e72e7fdac6 Merge pull request #37045 from abhi/inspect
Fixing network inspect for swarm
Upstream-commit: 8baea3a1bb9a10e4148e320d8933b0a73b7e0b07
Component: engine
2018-05-14 12:51:12 +02:00
40ccb62e61 Merge pull request #1052 from thaJeztah/fix-rollback-config
Fix service rollback options being cross-wired
Upstream-commit: 74d86d4b2e
Component: cli
2018-05-14 11:01:56 +02:00
fda16ddde1 Merge pull request #1037 from essamhassan/1036_fix_mounts_typo_in_srv_inspect_pretty
use : instead of = in mounts service pretty inspect
Upstream-commit: d4ffd9bc71
Component: cli
2018-05-14 10:55:41 +02:00
0e7e154e05 Merge pull request #37052 from thaJeztah/fix-missing-name-in-message
Fix missing plugin name in message
Upstream-commit: 8c66c01cd4d2b222d915b9a7123ab8562359283c
Component: engine
2018-05-14 10:39:39 +02:00
49316401a9 Fix missing plugin name in message
This message was missing the name of the plugin, resulting in

    plugin_test.go:92: timeout hit after 30s: plugin %!q(MISSING) exists

On failing tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b526964584d213074de7c5573a3373a58699c181
Component: engine
2018-05-13 22:26:36 +02:00
5ecbe96813 image spec formatting fix
Embedded new lines aren't interpreted correctly in markdown renderers (they are treated as preformatted text instead). I removed the embedded newlines in the docker image spec.

Signed-off-by: Alex Goodman <wagoodman@gmail.com>
Upstream-commit: 4fb59c20a4fb54f944fe170d0ff1d00eb4a24d6f
Component: engine
2018-05-13 13:30:53 -04:00
b4b92d031a Merge component 'engine' from git@github.com:moby/moby master 2018-05-13 17:06:28 +00:00
4ca879c241 Fixing network inspect for swarm
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: a059d6f4f5eb5fdb319b6f715a9bb50eb5d6173d
Component: engine
2018-05-13 07:31:14 -07:00
122abc3569 Merge pull request #37049 from yongtang/05122018-version-history
Fix incorrect link in version-history.md
Upstream-commit: 996eb78fb895ba1cf7ea5773ee36a8651498eb26
Component: engine
2018-05-13 16:30:58 +02:00
371327f900 Fix incorrect link in version-history.md
In version-history.md, the link for `Docker Engine API v1.37`
was pointed to `v1.36`.

This fix fixes the incorrect link.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6d66743ae3da148adbd29fb7e0c0433e93fec12b
Component: engine
2018-05-13 13:22:39 +00:00
8082d1152a Merge pull request #37047 from yongtang/05122018-changelog
Re-order CHANGELOG.md to pass `make validate` test
Upstream-commit: df7c058198a7f4566d46ab732f5987bd33e90a93
Component: engine
2018-05-13 14:11:56 +02:00
2d3321ec44 Re-order CHANGELOG.md to pass make validate test
This fix re-orders the CHANGELOG so that `make validate` test
could pass. The validation requires that the date in the changelog
is always ordered.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 333693c37c8a2c14458d2a088829b9a2a3570eed
Component: engine
2018-05-13 00:27:51 +00:00
d87eeada6c Merge component 'engine' from git@github.com:moby/moby master 2018-05-12 17:06:49 +00:00
f761a64e26 Merge component 'cli' from git@github.com:docker/cli master 2018-05-12 16:41:44 +00:00
3ef5a0bd8a Merge pull request #1038 from kolyshkin/context
Switch from x/net/context to context
Upstream-commit: fd060d2f33
Component: cli
2018-05-11 22:13:52 -04:00
7e8c2b86b6 cli/command/container: don't leak context
Switch from x/net/context to context made "go vet" see the previously
unseen errors:

> cli/command/container/start.go:57::error: the cancelFun function is
> not used on all paths (possible context leak) (vet)
> cli/command/container/start.go:63::error: this return statement may be
> reached without using the cancelFun var defined on line 57 (vet)

> cli/command/container/run.go:159::error: the cancelFun function is not
> used on all paths (possible context leak) (vet)
> cli/command/container/run.go:164::error: this return statement may be
> reached without using the cancelFun var defined on line 159 (vet)

Do call the cancel function.

Note we might end up calling it twice which is fine as long as I can see
from the Go 1.10 source code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 395957155f
Component: cli
2018-05-11 16:50:04 -07:00
32a5db4523 Switch from x/net/context to context
Since go 1.7, "context" is a standard package. Since go 1.9,
x/net/context merely provides some types aliased to those in
the standard context package.

The changes were performed by the following script:

for f in $(git ls-files \*.go | grep -v ^vendor/); do
	sed -i 's|golang.org/x/net/context|context|' $f
	goimports -w $f
	for i in 1 2; do
		awk '/^$/ {e=1; next;}
			/\t"context"$/ {e=0;}
			{if (e) {print ""; e=0}; print;}' < $f > $f.new && \
				mv $f.new $f
		goimports -w $f
	done
done

[v2: do awk/goimports fixup twice]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 6f8070deb2
Component: cli
2018-05-11 16:49:43 -07:00
67fe72ed3d use : instead of = in mounts service pretty inspect
Signed-off-by: Essam A. Hassan <es.hassan187@gmail.com>
Upstream-commit: 7285241681
Component: cli
2018-05-12 00:02:18 +02:00
f5a67d027e Merge pull request #36289 from thaJeztah/backport-17.03.2-changelog
[backport] Add 17.03.2 CHANGELOG
Upstream-commit: 38162e96552bd30e510e355cd44d801f53bac5ae
Component: engine
2018-05-11 21:28:50 +02:00
732529fbbc Change error message for unreadable files
Fix for https://github.com/docker/for-linux/issues/44

Signed-off-by: Justyn Temme <justyntemme@gmail.com>
Upstream-commit: c2a35cfa1a
Component: cli
2018-05-11 13:03:19 -05:00
3d482c77f6 Merge pull request #37041 from thaJeztah/remove_unused_function_in_test
overlay2: remove unused cdMountFrom() helper function
Upstream-commit: d0a516e2567a67fed3ff3f23ff6c220f1707ad4b
Component: engine
2018-05-11 13:56:56 -04:00
14ad0d5267 Merge component 'engine' from git@github.com:moby/moby master 2018-05-11 17:06:01 +00:00
9bb8e4d94e Merge component 'cli' from git@github.com:docker/cli master 2018-05-11 16:41:29 +00:00
790e355196 Merge pull request #1039 from mat007/fix-filepath-usage
Use filepath.Base instead of path.Base
Upstream-commit: a6b10c2e85
Component: cli
2018-05-11 18:06:23 +02:00
068dc5f571 Make an error for an invalid orchestrator
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 50330e7089
Component: cli
2018-05-11 17:19:55 +02:00
0178ff5bea Merge pull request #37031 from kolyshkin/getmnt
Fix daemon.getSourceMount() for /
Upstream-commit: 379845ec20ae651831dcfb0587b95c38a1631a53
Component: engine
2018-05-11 16:39:57 +02:00
e273ba3110 Fix service update --host-rm not being granular enough
Removing a host by `<host>:<ip>` should only remove occurences of the host with
a matching IP-address, instead of removing all entries for that host.

In addition, combining `--host-rm` and `--host-add` for the same host should
result in the new host being added.

This patch fixes the way the diff is calculated to allow combining
removing/adding, and to support entries having both a canonical, and aliases.
Aliases cannot be added by the CLI, but are supported in the Service spec, thus
should be taken into account:

Entries can be removed by either a specific `<host-name>:<ip-address>`
mapping, or by `<host>` alone:

 - If both IP-address and host-name is provided, only remove the hostname
   from entries that match the given IP-address.
 - If only a host-name is provided, remove the hostname from any entry it
   is part of (either as _canonical_ host-name, or as _alias_).
 - If, after removing the host-name from an entry, no host-names remain in
   the entry, the entry itself should be removed.

For example, the list of host-entries before processing could look like this:

    hosts = &[]string{
        "127.0.0.2 host3 host1 host2 host4",
        "127.0.0.1 host1 host4",
        "127.0.0.3 host1",
        "127.0.0.1 host1",
    }

Removing `host1` removes every occurrence:

    hosts = &[]string{
        "127.0.0.2 host3 host2 host4",
        "127.0.0.1 host4",
    }

Whereas removing `host1:127.0.0.1` only remove the host if the IP-address matches:

    hosts = &[]string{
        "127.0.0.2 host3 host1 host2 host4",
        "127.0.0.1 host4",
        "127.0.0.3 host1",
    }

Before this patch:

    $ docker service create --name my-service --host foo:127.0.0.1  --host foo:127.0.0.2 --host foo:127.0.0.3 nginx:alpine
    $ docker service update --host-rm foo:127.0.0.1 --host-add foo:127.0.0.4 my-service
    $ docker service inspect --format '{{.Spec.TaskTemplate.ContainerSpec.Hosts}}' my-service
    []

After this patch is applied:

    $ docker service create --name my-service --host foo:127.0.0.1  --host foo:127.0.0.2 --host foo:127.0.0.3 nginx:alpine
    $ docker service update --host-rm foo:127.0.0.1 --host-add foo:127.0.0.5 my-service
    $ docker service inspect --format '{{.Spec.TaskTemplate.ContainerSpec.Hosts}}' my-service
    [127.0.0.2 foo 127.0.0.3 foo 127.0.0.4 foo]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 27c0858f43
Component: cli
2018-05-11 16:35:19 +02:00
b80e078a6d Merge pull request #36815 from allencloud/simplify-ode
refactor: simplify code to make function getExecConfig  more readable
Upstream-commit: 64336838878281549d87b34b19cf2e4b3756e724
Component: engine
2018-05-11 10:06:33 -04:00
0d708bdf61 overlay2: remove unused cdMountFrom() helper function
This function was added in 23e5c94cfb26eb72c097892712d3dbaa93ee9bc0 but never used

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8a8ec00c1fece033b20548b7a5ec2f3a1f340834
Component: engine
2018-05-11 13:51:50 +02:00
5da69b8b39 overlay: do not ignore invalid storage-driver options
The overlay storage driver currently does not support any option, but was silently
ignoring any option that was passed.

This patch verifies that no options are passed, and if they are passed will produce
an error.

Before this change:

    dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
    INFO[2018-05-11T11:40:40.996597152Z] libcontainerd: started new docker-containerd process  pid=256
    ....
    INFO[2018-05-11T11:40:41.135392535Z] Daemon has completed initialization
    INFO[2018-05-11T11:40:41.141035093Z] API listen on /var/run/docker.sock

After this change:

    dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
    INFO[2018-05-11T11:39:21.632610319Z] libcontainerd: started new docker-containerd process  pid=233
    ....
    Error starting daemon: error initializing graphdriver: overlay: unknown option dm.thinp_percent

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 30f15d2bdc551870464d1cd024a92341cf1ae4aa
Component: engine
2018-05-11 13:40:46 +02:00
e815956d17 Fix service rollback options being cross-wired
The "update" and "rollback" configurations were cross-wired, as a result, setting
`--rollback-*` options would override the service's update-options.

Creating a service with both update, and rollback configuration:

    docker service create \
      --name=test \
      --update-failure-action=pause \
      --update-max-failure-ratio=0.6 \
      --update-monitor=3s \
      --update-order=stop-first \
      --update-parallelism=3 \
      --rollback-failure-action=continue \
      --rollback-max-failure-ratio=0.5 \
      --rollback-monitor=4s \
      --rollback-order=start-first \
      --rollback-parallelism=2 \
      --tty \
      busybox

Before this change:

    docker service inspect --format '{{json .Spec.UpdateConfig}}' test \
    && docker service inspect --format '{{json .Spec.RollbackConfig}}' test

Produces:

    {"Parallelism":3,"FailureAction":"pause","Monitor":3000000000,"MaxFailureRatio":0.6,"Order":"stop-first"}
    {"Parallelism":3,"FailureAction":"pause","Monitor":3000000000,"MaxFailureRatio":0.6,"Order":"stop-first"}

After this change:

    {"Parallelism":3,"FailureAction":"pause","Monitor":3000000000,"MaxFailureRatio":0.6,"Order":"stop-first"}
    {"Parallelism":2,"FailureAction":"continue","Monitor":4000000000,"MaxFailureRatio":0.5,"Order":"start-first"}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f367aa9330
Component: cli
2018-05-11 11:47:05 +02:00
52ce230729 Add metrics for log failures/partials
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 673dd28e7e2fb6e40e4c56823900fdb152b9c53c
Component: engine
2018-05-10 17:22:37 -04:00
645a5ebf1b Use mount package to unmount container stuff
Really these mounts shouldn't be in the container pacakge.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d6558ad6a4552fc745e893f93ae190710d1a36bc
Component: engine
2018-05-10 17:16:02 -04:00
c6a8d2ea17 Move network operations out of container package
These network operations really don't have anything to do with the
container but rather are setting up the networking.

Ideally these wouldn't get shoved into the daemon package, but doing
something else (e.g. extract a network service into a new package) but
there's a lot more work to do in that regard.
In reality, this probably simplifies some of that work as it moves all
the network operations to the same place.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: cc8f358c23d307d19b06cd5e7d039d8fad01a947
Component: engine
2018-05-10 17:16:00 -04:00
53eaee8346 daemon.getSourceMount(): fix for / mount point
A recent optimization in getSourceMount() made it return an error
in case when the found mount point is "/". This prevented bind-mounted
volumes from working in such cases.

A (rather trivial but adeqate) unit test case is added.

Fixes: 871c957242 ("getSourceMount(): simplify")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d8fd6137a1f6d95a2bcdfeb6e1dfa6b816790c5e
Component: engine
2018-05-10 12:53:37 -07:00
47abb706d5 Merge component 'engine' from git@github.com:moby/moby master 2018-05-10 17:07:42 +00:00
a5b8cafc29 Merge pull request #37029 from thaJeztah/fix-fluentd-partial
Fix fluentd partial detection
Upstream-commit: f4ebcb42ac527b24ab54525d5824478fcd2960c0
Component: engine
2018-05-10 12:51:02 -04:00
4f70e5df53 Merge component 'cli' from git@github.com:docker/cli master 2018-05-10 16:41:48 +00:00
39cf7e12b3 refactor integration tests under integration/service/create_test.go to use swarm.CreateService
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: e9a687146a1e2721e19d858927283c35f8c2da97
Component: engine
2018-05-10 05:45:49 -04:00
5727dc3154 Merge pull request #1047 from eightlimbed/eightlimbed-patch-1
fixed typo
Upstream-commit: ab1d49a313
Component: cli
2018-05-10 10:32:07 +02:00
d10b7a563e Fix fluentd partial detection
The Partial property of the Logger message
was replaced by PLogMetaData, causing the build to fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: daaef83cd24f6eb335b77e9d8d692235eff1b201
Component: engine
2018-05-10 01:55:27 +02:00
57c3c89455 Make sure every composefiles sent to a v1beta1 endpoint are parsable
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: f766aff716
Component: cli
2018-05-09 13:17:25 -07:00
0777f5be26 Merge pull request #991 from silvin-lubecki/kubernetes-namespace
Better namespace experience with Kubernetes
Upstream-commit: 552ee502f7
Component: cli
2018-05-09 21:18:50 +02:00
bc1299683c Merge pull request #36159 from cosmo0920/add-partial-flag-into-record
Fluentd Log Driver: Add partial flag into record
Upstream-commit: fff01bc14d96b323ecafb18f8c33c62561677fbb
Component: engine
2018-05-09 21:01:05 +02:00
32fb3c1d02 Merge component 'engine' from git@github.com:moby/moby master 2018-05-09 17:06:15 +00:00
ec34094dc5 Fix stack ls behaviour with Kubernetes and variout --namespace flag values
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 2af66bed41
Component: cli
2018-05-09 17:40:25 +02:00
818645f8cd Add --all-namespaces to docker stack ls command on Kubernetes orchestrator, to list all stacks in all namespaces.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f097831eb3
Component: cli
2018-05-09 17:33:16 +02:00
f151bd57f8 Add namespace column for docker stack ls command while targeting Kubernetes orchestrator
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 65526a201f
Component: cli
2018-05-09 17:33:16 +02:00
3d9a405e51 Move stack client creation from KubeCli to client factory, where it belongs
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 31dccfffb5
Component: cli
2018-05-09 17:30:37 +02:00
ceea6abb71 Clean useless named imports
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: c23c1482c7
Component: cli
2018-05-09 17:30:36 +02:00
fd51a4f0df Fix using the namespace specified in the kubeconfig file.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f0aa126b03
Component: cli
2018-05-09 17:30:36 +02:00
98ae67d006 Merge pull request #37016 from priyawadhwa/buildargs
Export BuildArgs type from dockerfile package
Upstream-commit: dfde597fbbb5de4a7559a68980401c8c405aa9af
Component: engine
2018-05-09 05:06:50 -07:00
830a000faa Remove "experimental" env-vars
Experimental features are no longer a build-time option,
and can be enabled at runtime.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 050b421f4c435c90dc63bb094789b0513689e80c
Component: packaging
2018-05-09 13:16:43 +02:00
d39da73d16 Export BuildArgs
Signed-off-by: Priya Wadhwa <priyawadhwa@google.com>
Upstream-commit: 593255ffb07989e416743d4235fef65e75414e6b
Component: engine
2018-05-08 14:57:26 -07:00
4785c706cc fixed typo -- Signed-off-by: Lee Gaines <eightlimbed@gmail.com>
Upstream-commit: 9570911807
Component: cli
2018-05-08 14:46:42 -07:00
daa5cc4d8f Added description about pids count.
Documentation in response to issue docker/for-linux#192

Signed-off-by: Ioan Eugen Stan <eu@ieugen.ro>
Upstream-commit: 966de2a5f9
Component: cli
2018-05-08 22:16:15 +03:00
ebc7fa7c75 Merge component 'engine' from git@github.com:moby/moby master 2018-05-08 17:07:32 +00:00
4d422dd853 Merge component 'cli' from git@github.com:docker/cli master 2018-05-08 16:41:46 +00:00
c76949856e Update prune.go
Append a warning with which filter the elements will be pruned with if filter is set.

Signed-off-by: Justyn Temme <justyntemme@gmail.com>
Upstream-commit: 7d113de085
Component: cli
2018-05-08 09:08:26 -05:00
7f36f33bdc Merge pull request #818 from selansen/master
Allow user to specify default address pools for docker networks
Upstream-commit: c31b61bff4
Component: cli
2018-05-08 14:17:00 +02:00
82733b4070 Merge pull request #36975 from cpuguy83/bump_go
Bump go version to 1.10.2
Upstream-commit: 17b039cb4901fc0a37c409ebfdf4f3b2fcec4409
Component: engine
2018-05-08 03:53:15 +02:00
64899bb9a0 Merge pull request #36612 from kolyshkin/t-attach
TestPostContainersAttach: minor improvements
Upstream-commit: bd5eb6b402524d103b91960cebae38bda7d8da12
Component: engine
2018-05-08 03:26:25 +02:00
ce7c08e19e Merge pull request #36803 from adshmh/refactor-network-integration-tests-use-swarm-create-service
refactored network integration tests to make use of swarm.CreateService
Upstream-commit: 6d2081481938c6c267f62c6e8b43e5940521cb22
Component: engine
2018-05-08 00:21:32 +02:00
267d640e44 Bump go version to 1.10.2
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9e5bebb1f58d4085d1b5fc1edb0ece1edd418c15
Component: engine
2018-05-07 14:19:16 -04:00
e73ed7d7f7 Merge component 'engine' from git@github.com:moby/moby master 2018-05-07 17:06:37 +00:00
572d6e715f Use filepath.Base instead of path.Base
This ensures Windows paths are handled correctly as explained in the path package documentation.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 698ea75c66
Component: cli
2018-05-07 17:25:23 +02:00
194bacfc7b Merge pull request #36921 from cyli/filter-namespaced-labels
Warn when reserved-namespace engine labels are configured
Upstream-commit: 57493cd60628ebf6e8b02725f44e1a4ef152a39e
Component: engine
2018-05-07 15:12:52 +02:00
b38b5ba976 Merge pull request #36977 from cpuguy83/remove_some_contrib
Remove some unused contrib items
Upstream-commit: 5f395b35bc600edf38fb17b87a9ac1af612c83a2
Component: engine
2018-05-07 01:15:17 +02:00
33178b34cb Merge pull request #36979 from anshulpundir/vndr
Bump swarmkit to bd69f6e8e301645afd344913fa1ede53a0a111fb
Upstream-commit: 5848b9eeb02eeb56bf8934faf9e13e73bbdf4ddb
Component: engine
2018-05-06 22:28:46 +02:00
8f43102f04 Allow user to specify default address pools for docker networks
This is separate commit for CLI files to address PR 36054

Signed-off-by: selansen <elango.siva@docker.com>
Upstream-commit: 75c7b95e7a
Component: cli
2018-05-05 19:46:28 -04:00
c91662ddb9 update docker Login subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: 4d890fc686
Component: cli
2018-05-05 01:35:48 -07:00
a788020da9 update docker Load subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: 647d4c983f
Component: cli
2018-05-05 01:33:47 -07:00
10f5ddc3c1 update docker Inspect subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: 20f269a1ff
Component: cli
2018-05-05 01:27:43 -07:00
a6af640f78 update docker Import subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: 202601b774
Component: cli
2018-05-05 01:22:45 -07:00
dc691e94bb update docker Images subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: 82c5693cf9
Component: cli
2018-05-05 01:19:35 -07:00
15f2c99486 update docker History subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: ba4e802b4f
Component: cli
2018-05-05 01:17:44 -07:00
7f5fd0a3b4 update docker Export subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: fb16dc68be
Component: cli
2018-05-05 01:07:32 -07:00
ffc8cb8e03 Remove contrib/project-stats.sh
This is an old script using tools that are no longer maintained or
recommended (and don't even work anymore).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ddb01ee1e05f1b460267eb40070e2a62a1c33692
Component: engine
2018-05-04 16:33:44 -04:00
8fd57d39c8 Removes custom selinux policies.
These are no longer used and instead users should use the
`container-selinux` package on their distribution. Additionally, these
are unmaintained and untested.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: eeea1e37a116c0e3765e2591a2ced936e48b5abb
Component: engine
2018-05-04 16:33:44 -04:00
57117ab663 Remove unused/unmaintained package builder stuff
This is left-over stuff from building Docker pacakges. These aren't
really maintained outside of bumping the golang version, and are never
tested.

These builders can be found at
https://github.com/docker/docker-ce-packaging where they are kept up to
date.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1b7fe816e86f21a968410fca7a0cb9302c386f84
Component: engine
2018-05-04 16:33:40 -04:00
0e0adf0eea Merge component 'engine' from git@github.com:moby/moby master 2018-05-04 17:07:22 +00:00
ad7b1373ce Merge component 'cli' from git@github.com:docker/cli master 2018-05-04 16:41:43 +00:00
f6ee4055fc Merge pull request #36994 from johnstep/add-windows-recycle-bin-test
Add windows recycle bin test and update hcsshim to v0.6.11
Upstream-commit: e2d3bb305258b78beb8e8f97a35d28cc6a75ac3c
Component: engine
2018-05-04 10:49:42 +02:00
9e5bd57003 Add tests related to hcsshim recycle bin skipping
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: 72192f5052667118c2f83282f8f8c3df8cbf514b
Component: engine
2018-05-03 13:37:18 -07:00
e0c153fe7f Update hcsshim to v0.6.11
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: 1c136d99a0e03b8cf76979652a0edb075ff83889
Component: engine
2018-05-03 13:36:51 -07:00
5560b1d08e Merge pull request #36985 from darrenstahlmsft/revendorHcsshim
Update hcsshim to v0.6.10
Upstream-commit: e890301e4f84d55c3e045904eb0223c23fd70d19
Component: engine
2018-05-03 22:18:16 +02:00
9cc62e81cb update docker Exec subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: 3eb6b2c9c0
Component: cli
2018-05-03 12:48:25 -07:00
a089f44a79 update docker Events subcommand completions
Signed-off-by: Kyle Spiers <Kyle@Spiers.me>
Upstream-commit: 21477d9576
Component: cli
2018-05-03 12:42:41 -07:00
ec16580804 Merge pull request #922 from kolyshkin/man-fixes
Man page fixes
Upstream-commit: 0ff5f52051
Component: cli
2018-05-03 07:34:06 -10:00
b2b2305fac daemon.setMounts(): copy slice in place
It does not make sense to copy a slice element by element, then discard
the source one. Let's do copy in place instead which is way more
efficient.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d4c94e83ca58b5ffd99840a8e3cbf22f1ab331c0
Component: engine
2018-05-03 10:26:06 -07:00
7fc438fe9a TestPostContainerAttach: minor improvements
When this test fails, the error looks like this:

> FAIL: docker_api_attach_test.go:98: DockerSuite.TestPostContainersAttach
> docker_api_attach_test.go:211:
>     c.Assert(actualStdout.Bytes(), checker.DeepEquals, []byte("hello\nsuccess"), check.Commentf("Attach didn't return the expected data from stdout"))
> ... obtained []uint8 = []byte{0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73}
> ... expected []uint8 = []byte{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0xa, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73}
> ... Attach didn't return the expected data from stdout

Let's use strings for comparisons to make the output more readable.

While at it,
- get the container's stderr as well, and make sure it's empty;
- check that stdcopy.StdCopy() did not return an error, except for
  the timeout which is expected;
- move/remove comments, simplify var names.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ecc54889c9a233d558b578dfd48eb5d84506a62a
Component: engine
2018-05-03 10:15:48 -07:00
9bc9d40087 Merge component 'engine' from git@github.com:moby/moby master 2018-05-03 17:07:17 +00:00
c51303ad17 daemon.ContainerStop(): fix for a negative timeout
1. As daemon.ContainerStop() documentation says,

> If a negative number of seconds is given, ContainerStop
> will wait for a graceful termination.

but since commit cfdf84d5d04c8ee (PR #32237) this is no longer the case.

This happens because `context.WithTimeout(ctx, timeout)` is implemented
as `WithDeadline(ctx, time.Now().Add(timeout))`, resulting in a deadline
which is in the past.

To fix, don't use WithDeadline() if the timeout is negative.

2. Add a test case to validate the correct behavior and
as a means to prevent a similar regression in the future.

3. Fix/improve daemon.ContainerStop() and client.ContainerStop()
description for clarity and completeness.

4. Fix/improve DefaultStopTimeout description.

Fixes: cfdf84d5d04c ("Update Container Wait")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 69b4fe406540c7989bd99b2244ed67ced96e17c7
Component: engine
2018-05-03 10:04:33 -07:00
1b30fa4e80 Merge component 'cli' from git@github.com:docker/cli master 2018-05-03 16:41:44 +00:00
61575cffdb Merge pull request #36906 from novas0x2a/bump-distribution
Bump docker/distribution to 83389a148052d74ac602f5f1d62f86ff2f3c4aa5
Upstream-commit: 185ae7eedcb61d7926365e7d64504d6480855e5d
Component: engine
2018-05-03 15:33:18 +02:00
87f255b417 Merge pull request #36396 from selansen/master
Allow user to specify default address pools for docker networks
Upstream-commit: 82d9185470c99d5768b60926648b3739ec15bbc4
Component: engine
2018-05-03 06:34:14 -04:00
0246710e59 Merge pull request #1005 from eiais/fishupdate
Update Attach, Build, Commit, Cp, Create subcommand fish completions 
Upstream-commit: e956159572
Component: cli
2018-05-03 10:28:53 +02:00
3d4a877b7f Merge pull request #1006 from essamhassan/908_show_secrets_configs_srv_inspect
908 - Adding configs/secrets to service inspect pretty
Upstream-commit: e9731e9d0f
Component: cli
2018-05-03 10:12:51 +02:00
21855605a8 Merge pull request #1030 from thaJeztah/bump-version-to-v18.06-dev
Bump version to 18.06.0-dev
Upstream-commit: 222b0245f7
Component: cli
2018-05-02 11:39:52 -07:00
6848b40040 Update hcsshim to v0.6.10
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: d1fa012fa0104bb8aac45fd04bf22cdac0ec4144
Component: engine
2018-05-02 10:15:52 -07:00
f2f1605a20 Merge component 'engine' from git@github.com:moby/moby master 2018-05-02 17:07:13 +00:00
44d68d9d33 Merge component 'cli' from git@github.com:docker/cli master 2018-05-02 16:41:41 +00:00
294e7aa568 Merge pull request #36960 from arm64b/fix-multi-stage-name-issue
Fix the target name issue for multi-stage build
Upstream-commit: 51a9119f6b817bbae21805ec05787d462c9492cd
Component: engine
2018-05-02 13:27:50 +02:00
ec3e6ec6a5 Bump version to 18.06.0-dev
Docker-CE 18.05.0-rc1 was cut off from these commits;

- docker-ce 18.05 branch created for code freeze: https://github.com/docker/docker-ce/tree/18.05
- engine: https://github.com/moby/moby/tree/1a57535
- cli: https://github.com/docker/cli/tree/4970824
- packaging: https://github.com/docker/docker-ce-packaging/tree/c216602

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: deb8bd740b
Component: cli
2018-05-02 12:11:23 +02:00
8fa7a28767 Merge pull request #1026 from dhiltgen/expose_pull
Export pull as a public function
Upstream-commit: 784430737b
Component: cli
2018-05-02 12:07:49 +02:00
6539329293 Bump swarmkit to bd69f6e8e301645afd344913fa1ede53a0a111fb
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
Upstream-commit: 6dce068caaec86b3d6655d49902032f35bab2fe1
Component: engine
2018-05-01 15:48:50 -07:00
0074e6a87b Merge pull request #36522 from IRCody/awslogs-non-blocking
Allow awslogs to use non-blocking mode
Upstream-commit: fe2d3a1551f666465e65ec4337e92b774a5e81f1
Component: engine
2018-05-01 16:30:52 -04:00
0e7b49da2e Add --target name case sensitive test code for multi-stage build
Add testing code to cover the `--target` name case sensitive
issue reported by issue #36956.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: a95fabc70efacc1ff6c0c62c490cf551215bc503
Component: engine
2018-05-01 11:31:52 +08:00
4c5e76b26e Fix the target name issue for multi-stage build
This PR is trying to fix issue #36956.

The stage name is case-insensitive by design, so we should use
`strings.EqualFold()` as the comparison method to eliminate the
case sensitive noise.

Also we need to return a pre-defined error code order to avoid below
message like:
"FIXME: Got an API for which error does not match any expected type!!!:
failed to reach build target dev in Dockerfile"

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 7c0570473cfa181aeb3278072cc9af4f9298cb98
Component: engine
2018-05-01 10:28:40 +08:00
09778021e4 Merge pull request #1024 from clnperez/manifest-token-perms
manifest list: request specific permissions
Upstream-commit: f42c66bd24
Component: cli
2018-04-30 20:22:11 +02:00
d38f9b7e29 Merge component 'engine' from git@github.com:moby/moby master 2018-04-30 17:06:22 +00:00
e0af2510f5 Merge component 'cli' from git@github.com:docker/cli master 2018-04-30 16:41:31 +00:00
40a1520f3d Bump docker/distribution to 83389a148052d74ac602f5f1d62f86ff2f3c4aa5
vendored distribution is quite old, and current distribution contains an
API break, which means it's not possible to vendor a bugfixed
distribution and a docker/docker at the same time.

Signed-off-by: Mike Lundy <mike@fluffypenguin.org>
Upstream-commit: 07ffa1cea9d995a7ab55793b5b08758c38fec3f0
Component: engine
2018-04-30 09:30:56 -07:00
b9f36ffdf0 Allow user to control the default address pools
- Via daemon flag --default-address-pools base=<CIDR>,size=<int>

Signed-off-by: Elango Siva  <elango@docker.com>
Upstream-commit: 173b3c364ebedd56bd5b6c190a9b41f592ba57d6
Component: engine
2018-04-30 11:14:08 -04:00
4502df9e25 Merge pull request #1028 from nstapelbroek/feature/exec-die-event
Add exec_die to the list of known container events
Upstream-commit: 8103326311
Component: cli
2018-04-30 12:26:28 +02:00
221837e1ba Merge pull request #973 from silvin-lubecki/orchestrator-column
Orchestrator column
Upstream-commit: 3a55cd709c
Component: cli
2018-04-30 12:16:41 +02:00
2ff7c2ca43 Add an orchestrator column in the docker stack ls command
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 13d0c9c695
Component: cli
2018-04-30 12:04:02 +02:00
28528acdcb Merge pull request #903 from silvin-lubecki/add-warnings-client-side
Add warnings client side before deployment on Kubernetes
Upstream-commit: 8963ab993e
Component: cli
2018-04-30 12:01:55 +02:00
a0405be5c0 Merge pull request #36918 from Sh4d1/master
add verification to check if escapeKeys have elements (pkg/term/proxy.go)
Upstream-commit: d4e48af48d1a2d7427ccd9f950cf6bc6ff5682b6
Component: engine
2018-04-30 11:57:21 +02:00
d432dda560 Print warnings on stderr for each unsupported features while parsing a compose file for deployment on Kubernetes.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 36591a2282
Component: cli
2018-04-30 11:56:14 +02:00
1af050dad4 Merge pull request #899 from silvin-lubecki/handle-multiple-stack-api-versions
Handle multiple stack api versions
Upstream-commit: 7ad30360c8
Component: cli
2018-04-30 11:33:04 +02:00
de5526bad9 Add a common interface between different Kubernetes Stack API versions and use it in kubernetes stack commands
* Add kubernetes Stack API v1beta2 client
* Upgrade v1beta1 client to remove generated code

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f958c66a6d
Component: cli
2018-04-30 11:27:22 +02:00
48f4272c53 Add verification and test to check if escapeKeys is not empty
In pkg/term/proxy.go and pkg/term/proxy_test.go, check if escapeKeys is empty and if it is, return the one key read

Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
Upstream-commit: d339130f307634a0edd6aef29b6934c3934e9ba2
Component: engine
2018-04-30 00:32:43 +02:00
340f40eb39 Add exec_die to the list of known container events
Signed-off-by: Nico Stapelbroek <nstapelbroek@gmail.com>
Upstream-commit: 4d91812b88
Component: cli
2018-04-29 14:52:08 +02:00
a774d0458e Merge component 'engine' from git@github.com:moby/moby master 2018-04-28 17:06:52 +00:00
240bba4fdb Export pull as a public function
It will be helpful to expose the pull implementation which supports
pulling private images for other CLI commands that rely on helper images.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 812f113685
Component: cli
2018-04-27 12:21:19 -07:00
257c410f05 Allow awslogs to use non-blocking mode
When then non-blocking mode is specified, awslogs will:

- No longer potentially block calls to logstream.Log(), instead will
  return an error if the awslogs buffer is full. This has the effect of
  dropping log messages sent to awslogs.Log() that are made while the
  buffer is full.
- Wait to initialize the log stream until the first Log() call instead of in
  New(). This has the effect of allowing the container to start in
  the case where Cloudwatch Logs is unreachable.

Both of these changes require the --log-opt mode=non-blocking to be
explicitly set and do not modify the default behavior.

Signed-off-by: Cody Roseborough <crrosebo@amazon.com>
Upstream-commit: c7e379988c9cd6ec0af528e6f59eea3c51b36738
Component: engine
2018-04-27 17:59:03 +00:00
904bb15bee Merge pull request #36944 from vdemeester/fix-e2e-run
Skip some test on remote daemon for e2e run(s)
Upstream-commit: 765a9f31adb5f9eef197aa7863717a4d8a743122
Component: engine
2018-04-27 05:03:12 -10:00
0163dbc12b Merge pull request #36816 from arm64b/using-parent-img-arch4dockerbuilder
Dockerbuilder: use the arch info from base image
Upstream-commit: fef1a5ea809976d0d3d2160f3e0a4459e6482763
Component: engine
2018-04-26 20:06:40 +02:00
fd1a47eb04 Merge component 'engine' from git@github.com:moby/moby master 2018-04-26 17:07:28 +00:00
5bc18aa45a Merge component 'cli' from git@github.com:docker/cli master 2018-04-26 16:43:04 +00:00
7dc2c5606a Skip some test on remote daemon for e2e run(s)
We really need to run those on the CI too at some point.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ef2c2040c22eba8ab6ea1033ad64ba9b0095db9b
Component: engine
2018-04-26 16:25:52 +00:00
5c73eabe12 Merge pull request #36946 from thaJeztah/bump-tini-0.18.0
Bump tini to v0.18.0
Upstream-commit: b87bda893b48edcda2de38547216bcb480dba7fe
Component: engine
2018-04-25 19:47:08 -07:00
c783effbb0 Merge pull request #1017 from thaJeztah/warn-when-using-host-ip
Warn when using host-ip for published ports
Upstream-commit: 99bd7ed693
Component: cli
2018-04-25 17:09:42 -04:00
368f147a3d Bump version to 18.06.0-ce-dev
Signed-off-by: GordonTheTurtle <engine-team@docker.com>
2018-04-25 20:10:32 +00:00
256deb9131 Merge pull request #36924 from runcom/fix-created-rp
restartmanager: do not apply restart policy on created containers
Upstream-commit: 18bfe3c12838ccec3d6a749f6d71355c1daed164
Component: engine
2018-04-25 21:48:01 +02:00
babda0d318 Merge pull request #36905 from thaJeztah/bump-swarmkit
Bump SwarmKit to remove deprecated grpc metadata wrappers
Upstream-commit: 28f373603cd998d885deb2384de75a3c8e7a3a72
Component: engine
2018-04-25 14:34:17 -04:00
2771210b85 Merge component 'engine' from git@github.com:moby/moby master 2018-04-25 17:06:30 +00:00
b18061da61 Bump tini to v0.18.0
This bumps the version of tini used to fec3683b971d9c3ef73f284f176672c44b448662 (v0.18.0)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b711dd94fdad0ef8e2c9b2ebbe6d903d270752de
Component: engine
2018-04-25 17:50:56 +02:00
08243ac4d3 testing config/secrets are showing in pretty print
Signed-off-by: Essam A. Hassan <es.hassan187@gmail.com>
Upstream-commit: 8238644796
Component: cli
2018-04-25 17:22:18 +02:00
9193280536 add config and secret to service in inspect test
Signed-off-by: Essam A. Hassan <es.hassan187@gmail.com>
Upstream-commit: 2b1f27ea5e
Component: cli
2018-04-25 17:22:18 +02:00
8531403103 adding configs/secrets to service inspect pretty
Signed-off-by: Essam A. Hassan <es.hassan187@gmail.com>
Upstream-commit: 3ae2d4b24c
Component: cli
2018-04-25 17:21:31 +02:00
c1ef5d203f Merge pull request #36935 from cpuguy83/volume_tests_no_root
Fix issues with running volume tests as non-root.
Upstream-commit: 1a57535aa277e0f2a3c1922c736551148c5b4351
Component: engine
2018-04-25 00:45:14 +02:00
89facafb80 specify specific permissions
When creating manifest lists, don't use "*" as the permission when
creating the token handler. This causes problems with gitlab's repos.

Fixes https://github.com/docker/cli/issues/1010

Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
Upstream-commit: c26e2264fb
Component: cli
2018-04-24 17:01:57 -05:00
d865a73a75 Filter engine labels to exclude com.docker.*, io.docker.*, and org.dockerproject.*
labels as per https://docs.docker.com/config/labels-custom-metadata/.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: d1d7bcd6d73516af5ae70c01bf08a0f73ad87743
Component: engine
2018-04-24 11:42:09 -07:00
153889840e Merge pull request #36599 from Microsoft/jjh/dockersave
LCOW: Implement `docker save`
Upstream-commit: 65c575f592a247b3dd0d10dd707f1bbf3d459ae1
Component: engine
2018-04-24 11:14:32 -07:00
605ac64b66 Merge component 'engine' from git@github.com:moby/moby master 2018-04-24 17:05:23 +00:00
137f840bfb Merge component 'cli' from git@github.com:docker/cli master 2018-04-24 16:41:18 +00:00
b6d97e109a Merge pull request #1022 from silvin-lubecki/clean-manifest-documentation
Cleaning some manifest documentation typos
Upstream-commit: 4970824bea
Component: cli
2018-04-24 17:07:14 +02:00
9edbbd0436 Fix issues with running volume tests as non-root.
- Volume store created dir with wrong permissions
- Local volume driver hardcoded uid/gid 0

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d15734ec3c10eda667b716f67e18d5d86e708e3e
Component: engine
2018-04-24 10:26:10 -04:00
e92b784d10 Cleaning some manifest documentation typos
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 55c5e7aa88
Component: cli
2018-04-24 15:00:39 +02:00
e77630ac6d restartmanager: do not apply restart policy on created containers
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 75d3214934b397692a2765ef6fd8ce086044831b
Component: engine
2018-04-24 11:41:09 +02:00
ca53f02db1 Merge pull request #36904 from kolyshkin/context
Switch from x/net/context -> context
Upstream-commit: 53683bd8326b988977650337ee43b281d2830076
Component: engine
2018-04-24 08:49:12 +02:00
e3af8e0774 Switch from x/net/context -> context
Since Go 1.7, context is a standard package. Since Go 1.9, everything
that is provided by "x/net/context" is a couple of type aliases to
types in "context".

Many vendored packages still use x/net/context, so vendor entry remains
for now.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7d62e40f7e4f3c17d229a7687d6fcca5448de813
Component: engine
2018-04-23 13:52:44 -07:00
5a3297f67b Merge pull request #36913 from vdemeester/test-skip-non-root
Skip some tests requires root uid when run as user…
Upstream-commit: 5c233cf4315747785b27d4b0f0631d220556205f
Component: engine
2018-04-23 11:42:42 -07:00
4521f88522 Merge pull request #36920 from kolyshkin/cancel-func
context.WithTimeout: do call the cancel func
Upstream-commit: 20b524bf2e91466e00cd5fadd87e9d49f8cb8cb3
Component: engine
2018-04-23 20:14:25 +02:00
fa72c71f39 Merge pull request #36927 from wdhif/patch-1
Fix version mismatch in API the documentation
Upstream-commit: 3dd4be9d8975557f84d0afe5edd90183fc092717
Component: engine
2018-04-23 19:40:57 +02:00
3e4ba6ca0d Fix version mismatch in API documentation
Fix a version mismatch in the API documentation.

Signed-off-by: Wassim DHIF <wassimdhif@gmail.com>
Upstream-commit: 2058928edc284653b1fb8e719d713ac7edecd091
Component: engine
2018-04-23 18:57:35 +02:00
8b92797789 Merge component 'cli' from git@github.com:docker/cli master 2018-04-23 16:41:30 +00:00
ecd0192857 Merge pull request #1020 from vdemeester/todo-tada
Handle some TODOs in tests 
Upstream-commit: c889ea1bca
Component: cli
2018-04-23 09:33:41 -04:00
637cb9eba9 Remove more TODOs
- Some of them don't make sense anymore
- Some are deprecated and removed from the engine since a few versions
  already.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 740d260cd2
Component: cli
2018-04-23 14:57:29 +02:00
4485bdeb14 Remote FIXME(s) in vendor.conf
It's coming from dependencies, doesn't make sense here

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 58173b3c69
Component: cli
2018-04-23 14:14:45 +02:00
afba3f7a60 Handle some TODOs in tests
Use more gotestyourself for `env.Patch`, and `icmd.RunCommand`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ae03dd7f46
Component: cli
2018-04-23 14:13:52 +02:00
32854cab39 Merge pull request #1011 from vdemeester/mark-test-helpers
Make testing helpers as such…
Upstream-commit: c790f387e1
Component: cli
2018-04-23 11:20:12 +02:00
7f23cb8c8b Skip some tests requires root uid when run as user
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a7999aaa536818085ec8a23901ef64637587b7e4
Component: engine
2018-04-23 10:14:39 +02:00
4a3d7068f3 Fix typo in idtools tests
It should check `os.Geteuid` with `uid` instead of `os.Getegid`.
On the container (where the tests run), the uid and gid seems to be
the same, thus this doesn't fail.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5d8b88b114da7c40f04a95909a35287ae1dac37f
Component: engine
2018-04-23 10:14:07 +02:00
cc37c2e09b Merge component 'engine' from git@github.com:moby/moby master 2018-04-22 17:06:07 +00:00
0be67a18e5 Merge pull request #36922 from yongtang/04212018-restart_test.go
Some improvement in restart_test.go
Upstream-commit: 57142e89befe90977da6dce7762f9fcc70f28da1
Component: engine
2018-04-22 09:34:14 -07:00
13669fec1f Warn when using host-ip for published ports
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 363335ec9b
Component: cli
2018-04-21 12:49:47 -07:00
e52c8b0018 Some improvement in restart_test.go
This fix consists of some improvement in restart_test.go
by replacing Fatal with assert, so that they are consistent
with other tests in integration/container.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 67535921b32f68863f7a882d2300b59e0bbeffa4
Component: engine
2018-04-21 19:42:20 +00:00
9c80391a08 Merge component 'engine' from git@github.com:moby/moby master 2018-04-21 17:13:27 +00:00
59772b34d9 refactored network integration tests to make use of swarm.CreateService
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 8e335e00bb839be07ec3e1aca85deacf57a7c46a
Component: engine
2018-04-21 09:07:57 -04:00
554b5427fa Merge pull request #36091 from kolyshkin/mount
pkg/mount improvements
Upstream-commit: 53982e3fc1642f2605189cea48bc6de7b9318611
Component: engine
2018-04-21 11:03:54 +02:00
73e14f67f8 Merge pull request #36879 from cpuguy83/extra_unmount_check
Extra check before unmounting on shutdown
Upstream-commit: cf9c48bb3ecf47ed56a4b7b466eda577913f838e
Component: engine
2018-04-20 17:08:11 -07:00
97f152d2c1 Merge pull request #36912 from vdemeester/api-no-daemon-dep
Remove daemon dependency on api packages
Upstream-commit: c028b6d089ec21ae3c5e90e0a50740d71d18c739
Component: engine
2018-04-20 16:04:26 -04:00
d80d707e96 context.WithTimeout: do call the cancel func
govet complains (when using standard "context" package):

> the cancel function returned by context.WithTimeout should be called,
> not discarded, to avoid a context leak (vet)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 05e2f7e2fafd0fbc818c9f4cda7ac513c785d49c
Component: engine
2018-04-20 12:27:13 -07:00
a597dea9bf update docker Create subcommand fish completions
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: b491ad1589
Component: cli
2018-04-20 12:09:44 -07:00
5a48ec120d update docker Cp subcommand fish completions
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: 49d8604875
Component: cli
2018-04-20 11:58:05 -07:00
59dbeaea44 update docker Commit subcommand fish completions
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: 67a80e3c89
Component: cli
2018-04-20 11:57:33 -07:00
2e3a28762a update docker Build subcommand fish completions
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: 44168f52b3
Component: cli
2018-04-20 11:56:09 -07:00
4d27bf9201 update docker Attach subcommand fish completions
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: ee5aad8646
Component: cli
2018-04-20 11:48:57 -07:00
53bcb78f51 Merge component 'engine' from git@github.com:moby/moby master 2018-04-20 17:07:42 +00:00
e812a9de38 Merge component 'cli' from git@github.com:docker/cli master 2018-04-20 16:41:35 +00:00
07428d75bd Merge pull request #36888 from vdemeester/mark-test-helpers
Make testing helpers as such…
Upstream-commit: ba02880786b9924f251ea0785de168f45996e325
Component: engine
2018-04-20 17:00:17 +02:00
5b320bf640 Merge pull request #36744 from kolyshkin/t-enospc
TestDaemonNoSpaceLeftOnDeviceError: simplify
Upstream-commit: 7d9cbfa96f7d43764eb44422ac0a848f96d0484d
Component: engine
2018-04-20 15:40:39 +02:00
57e3475a77 Merge pull request #36492 from alejgh/36478-log-standardization
36478 storage-drivers log format standardization
Upstream-commit: c4ba5be6af4aa960d2f6d2071b2218cf0b62bb20
Component: engine
2018-04-20 12:11:14 +02:00
3da083e7f4 Remove daemon dependency on api packages
We are using interface in the api routers to not explicitely depend on
the daemon struct (`daemon.Daemon`), but somehow, we do depend on the
`daemon` package for the cluster functionalities.

This removes this dependency by defining the correct interfaces.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f4106b46db47524b4f38abeee48137d42e3fe4eb
Component: engine
2018-04-20 11:06:40 +02:00
695bc0d42c Make testing helpers as such…
That way, those lines won't be reported in the failure.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cb8db44395df70fa3044d2a9683d6d24438cfa74
Component: engine
2018-04-20 10:38:43 +02:00
c27dd5c4ac Merge pull request #36887 from alexjomin/master
pkg/term add build tag for netbsd
Upstream-commit: d6706dddd5c40f47ecb529422446152039934a84
Component: engine
2018-04-19 19:41:36 -07:00
7b9de88fa5 Merge pull request #36896 from cpuguy83/move_mount_parsing
Move mount parsing to separate package.
Upstream-commit: a9bd60d674f85c2161bb702404b23501d6b746c3
Component: engine
2018-04-19 20:31:53 -04:00
625b8ccfec Merge pull request #36875 from vdemeester/integration-cli-some-fixme
[test/integration-cli] small cleanups of FIXME(s)
Upstream-commit: 4da83efdfbbbb8a69ae155fc1998cfbc7b070b1c
Component: engine
2018-04-19 20:31:27 -04:00
89a77bb2a7 Bump SwarmKit to remove deprecated grpc metadata wrappers
Updates swarmkit to 33d06bf5189881b4d1e371b5571f4d3acf832816, to bring in
docker/swarmkit#2610 (Don't use wrappers for grpc metadata)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b18f7033b2644c0246345bb5747a5436568b1a71
Component: engine
2018-04-19 15:16:46 -07:00
a1f451a285 volume/local/TestCreateWithOpts(): use mount filter
This is not for the sake of test to run faster of course;
this is to simplify the code as well as have some more
testing for mount.SingleEntryFilter().

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ce468f0ad0d075c5d0c44c78bd61c489e6d7d70c
Component: engine
2018-04-19 14:50:03 -07:00
c2010a1d29 volume/local: call umount unconditionally
There is no need to parse mount table and iterate through the list of
mounts, and then call Unmount() which again parses the mount table and
iterates through the list of mounts.

It is totally OK to call Unmount() unconditionally.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ac39a95ea618601f78662972c35838d928858904
Component: engine
2018-04-19 14:49:54 -07:00
f00e9a9036 mount.Unmount(): don't look into /proc/self/mountinfo
Now, every Unmount() call takes a burden to parse the whole nine yards
of /proc/self/mountinfo to figure out whether the given mount point is
mounted or not (and returns an error in case parsing fails somehow).

Instead, let's just call umount() and ignore EINVAL, which results
in the same behavior, but much better performance.

Note that EINVAL is returned from umount(2) not only in the case when
`target` is not mounted, but also for invalid flags. As the flags are
hardcoded here, it can't be the case.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a1d095199ddb9b4811e1417b6adcdfadad7d73f4
Component: engine
2018-04-19 14:49:50 -07:00
96e23c4152 pkg/mount/mountinfo_linux: parser speed up
The mountinfo parser implemented via `fmt.Sscanf()` is slower than the one
using `strings.Split()` and `strconv.Atoi()`. This rewrite helps to speed it
up to a factor of 8x, here is a result from go bench:

> BenchmarkParsingScanf-4      	     300	  22294112 ns/op
> BenchmarkParsingSplit-4      	    3000	   2780703 ns/op

I tried other approaches, such as using `fmt.Sscanf()` for the first
three (integer) fields and `strings.Split()` for the rest, but it slows
things down considerably:

> BenchmarkParsingMixed-4      	    1000	   8827058 ns/op

Note the old code uses `fmt.Sscanf`, when a linear search for '-' field,
when a split for the last 3 fields. The new code relies on a single
split.

I have also added more comments to aid in future development.

Finally, the test data is fixed to now have white space before the first field.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c611f18a7f16d8aa878a5a5c7537d23a0937c40a
Component: engine
2018-04-19 14:49:42 -07:00
cd146e5f0d getSourceMount(): simplify
The flow of getSourceMount was:
 1 get all entries from /proc/self/mountinfo
 2 do a linear search for the `source` directory
 3 if found, return its data
 4 get the parent directory of `source`, goto 2

The repeated linear search through the whole mountinfo (which can have
thousands of records) is inefficient. Instead, let's just

 1 collect all the relevant records (only those mount points
   that can be a parent of `source`)
 2 find the record with the longest mountpath, return its data

This was tested manually with something like

```go
func TestGetSourceMount(t *testing.T) {
	mnt, flags, err := getSourceMount("/sys/devices/msr/")
	assert.NoError(t, err)
	t.Logf("mnt: %v, flags: %v", mnt, flags)
}
```

...but it relies on having a specific mount points on the system
being used for testing.

[v2: add unit tests for ParentsFilter]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 871c957242df9f8c74faf751a2f14eb5178d4140
Component: engine
2018-04-19 14:49:17 -07:00
7e50bdbeb9 daemon.cleanupMounts(): use mount.SingleEntryFilter
Use mount.SingleEntryFilter as we're only interested in a single entry.

Test case data of TestShouldUnmountRoot is modified accordingly, as
from now on:

1. `info` can't be nil;

2. the mountpoint check is not performed (as SingleEntryFilter
   guarantees it to be equal to daemon.root).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d3ebcde82aae79be8cbecab365367b17adac4b3e
Component: engine
2018-04-19 14:48:25 -07:00
a97e7a41c8 pkg/mount: implement/use filter for mountinfo parsing
Functions `GetMounts()` and `parseMountTable()` return all the entries
as read and parsed from /proc/self/mountinfo. In many cases the caller
is only interested only one or a few entries, not all of them.

One good example is `Mounted()` function, which looks for a specific
entry only. Another example is `RecursiveUnmount()` which is only
interested in mount under a specific path.

This commit adds `filter` argument to `GetMounts()` to implement
two things:
 1. filter out entries a caller is not interested in
 2. stop processing if a caller is found what it wanted

`nil` can be passed to get a backward-compatible behavior, i.e. return
all the entries.

A few filters are implemented:
 - `PrefixFilter`: filters out all entries not under `prefix`
 - `SingleEntryFilter`: looks for a specific entry

Finally, `Mounted()` is modified to use `SingleEntryFilter()`, and
`RecursiveUnmount()` is using `PrefixFilter()`.

Unit tests are added to check filters are working.

[v2: ditch NoFilter, use nil]
[v3: ditch GetMountsFiltered()]
[v4: add unit test for filters]
[v5: switch to gotestyourself]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: bb934c6aca3e77541dd4fd51b9ab2706294dadda
Component: engine
2018-04-19 14:48:09 -07:00
6099e61dfc Merge pull request #36886 from vdemeester/experimental-plugins-migration
Migrate test-integration-cli experimental plugin tests to integration
Upstream-commit: e396b27b7f207f4f0da9ed66d70a69b219bbafaf
Component: engine
2018-04-19 16:13:05 -04:00
1376a6d8fc TestContainerStopTimeout: fix
The unit test is checking that setting of non-default StopTimeout
works, but it checked the value of StopSignal instead.

Amazingly, the test was working since the default StopSignal is SIGTERM,
which has the numeric value of 15.

Fixes: commit e66d21089 ("Add config parameter to change ...")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 743f5afcd13659e2b6b76791415876797e2ede52
Component: engine
2018-04-19 11:09:46 -07:00
3f0393a442 Move mount parsing to separate package.
This moves the platform specific stuff in a separate package and keeps
the `volume` package and the defined interfaces light to import.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6a70fd222b95643a8a6b88e2634d5f085ae4122a
Component: engine
2018-04-19 06:35:54 -04:00
8348a70a7d Migrate test-integration-cli experimental plugin tests to integration
All `plugins` tests that require an `ExperimentalDaemon` are migrated
to `integration/plugin/*` and start an experimental daemon to test on
it.

The end goal being to remove the `experimental` build.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 69bab3832ce1d72dd1d3ed2f2b53143ec9ff102c
Component: engine
2018-04-19 11:57:28 +02:00
f766069f3c Merge pull request #36684 from cpuguy83/bump_containerd_client
Bump containerd client
Upstream-commit: 8bb5a28eed5eba5651c6e48eb401c03be938b4c1
Component: engine
2018-04-19 10:38:43 +02:00
1a74ffcae2 Merge pull request #36865 from vdemeester/integration-move-swarm-plugin-test
Migrate TestAPISwarmServicesPlugin to integration
Upstream-commit: f1783da7361ab3dc985df12446357e6c4c9ef388
Component: engine
2018-04-18 21:15:59 -07:00
21ab0afd1a Merge pull request #36894 from cpuguy83/bump_x_net
Bump golang.org/x/net to go1.10 release commit
Upstream-commit: f0b2f9362fbd6be58404b9d6bc3de53c6bc884e9
Component: engine
2018-04-18 18:04:51 -07:00
068e200711 Extra check before unmounting on shutdown
This makes sure that if the daemon root was already a self-binded mount
(thus meaning the daemonc only performed a remount) that the daemon does
not try to unmount.

Example:

```
$ sudo mount --bind /var/lib/docker /var/lib/docker
$ sudo dockerd &
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c403f0036b9945bd58a84e2c93f794ed9861fe99
Component: engine
2018-04-18 20:43:42 -04:00
5eb096d4f8 Merge pull request #36848 from cpuguy83/libcontainerd_client_locking
Relax some libcontainerd client locking
Upstream-commit: 69a5611dde5b46785c8f071a744f5b4b7547d5b9
Component: engine
2018-04-18 16:47:23 -07:00
4e1a92ff17 Merge pull request #1013 from thaJeztah/update-authors
Update AUTHORS and mailmap
Upstream-commit: 6c9232a568
Component: cli
2018-04-18 13:46:30 -07:00
4d4ddfe510 Merge pull request #1012 from thaJeztah/add-silvin-maintainer
Add Silvin as maintainer
Upstream-commit: 01778ee9d5
Component: cli
2018-04-18 16:35:40 -04:00
320288f128 Merge pull request #36637 from cpuguy83/no_global_driver_store
No global volume driver store
Upstream-commit: 6cd806aa53de41e6f04346150d08e19ec63311e0
Component: engine
2018-04-18 16:32:23 -04:00
05bd043eba Update AUTHORS and mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a761eff8c5
Component: cli
2018-04-18 13:31:07 -07:00
a013bf96ca Add Silvin as maintainer
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 60b371506c
Component: cli
2018-04-18 13:21:33 -07:00
c5fc4e9f5a Bump golang.org/x/net to go1.10 release commit
The primary need for this is x/net/context now is just a type alias to
the stdlib context package.
This makes issues with conflicts between "golang.org/x/net/context" and
the stdib "context" go away (primarily a concern in interface
definitions/implementations).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 848ef1da8b0d1c01a84fbe215f24f00fa741690d
Component: engine
2018-04-18 15:57:24 -04:00
4d42b1eabb Merge component 'engine' from git@github.com:moby/moby master 2018-04-18 17:05:51 +00:00
de82b21350 Merge pull request #1004 from albers/completion--template-driver
Add bash completion for `secret|config create --template-driver`
Upstream-commit: 0685bb29db
Component: cli
2018-04-18 19:04:29 +02:00
c3b2dee6b3 Merge component 'cli' from git@github.com:docker/cli master 2018-04-18 16:41:26 +00:00
9bd536589d Make testing helpers as such…
That way, those lines won't be reported in the failure.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b29844f8ca
Component: cli
2018-04-18 17:02:21 +02:00
f40401e83b Remove daemon.BuildImageWithOut and use cli helpers function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5d2afe4f51edc4c8393c4cbee7b478f7dc1e88ab
Component: engine
2018-04-18 16:45:55 +02:00
a6beebd548 Migrate TestAPISwarmServicesPlugin to integration
Also starts to create more "poll/check" function to `internal/test/daemon`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: aa0db6f9e1d0fd0420271f419d0d225089a95bbd
Component: engine
2018-04-18 16:18:53 +02:00
917c353f43 Add a Cleanup function that cleans exec root and swarm files
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3b01e92c9a34036b891853402888dcf461836ef8
Component: engine
2018-04-18 16:14:50 +02:00
a90ad7bf98 Merge pull request #36832 from vdemeester/integration-daemon-api-helpers
More integration-cli/integration refactoring + request package
Upstream-commit: 25ff68a80f315a5e0a4526cc15a1ece83843ae2b
Component: engine
2018-04-18 16:12:14 +02:00
f6b5cf688c pkg/term add build tag for netbsd
Signed-off-by: Alexandre Jomin <alexandrejomin@gmail.com>
Upstream-commit: 0d82bc142c2448c09b567773867344aa8fc172fb
Component: engine
2018-04-18 15:16:06 +02:00
a1bdeeb8dc Merge pull request #36858 from j-haj/36414-standardize_build_paths
Standardize artefact path for all build stages
Upstream-commit: 4923f8cc639e1ab01a251429495920e516ef779f
Component: engine
2018-04-18 06:58:38 -04:00
6f9cc3826f Merge pull request #36880 from thaJeztah/bump-swarmkit
Bump SwarmKit to 9c2aa152c3054371b833483a7ddad8d15052ec4f
Upstream-commit: 5dae4828f3248d7f442c53165aa0628020c6b74e
Component: engine
2018-04-18 19:10:55 +09:00
10b6953e20 Merge pull request #1008 from n4ss/revert-unencrypted-prompt
Revert unencryted storage warning prompt
Upstream-commit: 8618838bdb
Component: cli
2018-04-18 00:01:13 -07:00
c48e2f3808 Bump SwarmKit to 9c2aa152c3054371b833483a7ddad8d15052ec4f
Relevant changes:

- docker/swarmkit#2551 RoleManager will remove deleted nodes from the cluster membership
- docker/swarmkit#2574 Scheduler/TaskReaper: handle unassigned tasks marked for shutdown
- docker/swarmkit#2561 Avoid predefined error log
- docker/swarmkit#2557 Task reaper should delete tasks with removed slots that were not yet assigned
- docker/swarmkit#2587 [fips] Agent reports FIPS status
- docker/swarmkit#2603 Fix manager/state/store.timedMutex

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 333b2f28fef4ba857905e7263e7b9bbbf7c522fc
Component: engine
2018-04-17 13:44:49 -07:00
856b3acadf Remove use of global volume driver store
Instead of using a global store for volume drivers, scope the driver
store to the caller (e.g. the volume store). This makes testing much
simpler.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 977109d808ae94eb3931ae920338b1aa669f627e
Component: engine
2018-04-17 14:07:08 -04:00
e2550466e7 Rename volumedrivers package to drivers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b047f675ea958fa730f4bf56f909faceb9636506
Component: engine
2018-04-17 14:06:53 -04:00
8f56510165 Remove old/uneeded volume migration from vers 1.7
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0023abbad34282762d5bd17302776d2a8521fffc
Component: engine
2018-04-17 14:06:53 -04:00
27a6dfb147 Move direct volume driver interaction to store
Since the volume store already provides this functionality, we should
just use it rather than duplicating it.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 63826e291ba3b88443b64802084bbb3931857b56
Component: engine
2018-04-17 14:06:53 -04:00
f1112e0539 Merge pull request #999 from perlun/patch-1
build.md: Document --build-arg without value
Upstream-commit: 771ccaf4ed
Component: cli
2018-04-17 10:39:20 -07:00
c9ce394894 Relax global client lock on containerd restore.
This unblocks the client to take other restore requests and makes sure
that a long/stuck request can't block the client forever.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 806700e410a1b30aa1033d71d825e57880c75298
Component: engine
2018-04-17 12:07:06 -04:00
a05c5e914a Move integration-cli/request to internal/test/request…
… and change a bit the method signature

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 42f6fdf059807ecbe66cce90676021363a541154
Component: engine
2018-04-17 16:25:59 +02:00
3d6d872b1c Add api helpers to internal/test/daemon.Daemon
Porting helpers from `integration-cli/daemon.Daemon` to this struct
and use the API instead of the cli.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9722214c8add2a83f6c4974848139cadc79d9f0e
Component: engine
2018-04-17 16:24:31 +02:00
e20647387e Merge pull request #36868 from vdemeester/integration-move-fake-internal
Move fakecontext, fakegit and fakestorage to internal/test
Upstream-commit: 648ae4979e5a44fd046c292b48a02725a16f9304
Component: engine
2018-04-17 16:23:22 +02:00
f4e6667402 Standardize artefact path for all build stages
Update all build stages to output artefacts to /build

Signed-off-by: Jeff Hajewski <jeff.hajewski@gmail.com>
Upstream-commit: 00555f7b261111084b966920da607a504b068953
Component: engine
2018-04-17 09:08:25 -05:00
1805ce9e0e Merge pull request #1007 from HenryNe/patch-1
docs: Typofix in example "docker image ls"
Upstream-commit: f3bf6928da
Component: cli
2018-04-17 10:10:19 +02:00
a425bbca33 Move fakecontext, fakegit and fakestorage to internal/test
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 062564084a22f71cf5807ae5dfad7d29afb12e04
Component: engine
2018-04-17 09:53:09 +02:00
b77fed9a5f Merge pull request #36866 from fntlnz/poule-assign-pr-fntlnz
Add myself to poule to get 2w/old PRs
Upstream-commit: 13771fede318028d67e5d521bb97bcb54a4aaec5
Component: engine
2018-04-16 18:32:32 -07:00
f4b8a312a4 Merge pull request #36841 from yongtang/02222018-tag-test
Migrate image tag tests from integration-cli to api tests
Upstream-commit: abb1661907fa5e831872a7f99f1af2dcc88724bf
Component: engine
2018-04-16 17:53:48 -07:00
84f41cfc7e Merge pull request #36838 from vdemeester/integration-fixtures-refactoring
Clean some integration-cli/fixtures package/files
Upstream-commit: f9c4e630269be438cddfe843c727c21c3343f1c2
Component: engine
2018-04-16 17:49:29 -07:00
9c85effe88 Merge pull request #36854 from vdemeester/integration-swarm-more-in-internal
[test/integration] Small daemon refactoring and add swarm init/join helpers
Upstream-commit: c65d365eb3f98df7b10ac07b919ebaa1e4b75212
Component: engine
2018-04-16 12:49:49 -07:00
46a62eba1d Revert unencryted storage warning prompt
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Upstream-commit: 3acf5d2e47
Component: cli
2018-04-16 12:48:03 -07:00
d87b0c1878 Merge component 'engine' from git@github.com:moby/moby master 2018-04-16 17:06:40 +00:00
e26e074b4e Add myself to poule to get 2w/old PRs
Signed-off-by: Lorenzo Fontana <lo@linux.com>
Upstream-commit: 691e0c06cef55a455d72a4d1ec9dc4d072cf5e3b
Component: engine
2018-04-16 18:33:21 +02:00
8037d00abb docker load: Typofix in examples
Remove the double "docker docker" from example

Signed-off-by: Henry Ne <henrynmail-github@yahoo.de>
Upstream-commit: 79c489d812
Component: cli
2018-04-16 16:39:54 +02:00
c2c6cea1b0 Clean some integration-cli/fixtures package/files
- Move go package used by both `integration-cli` and `integration` to
  `internal/test/fixtures`.
- Remove fixtures that are not used anymore (moved to `docker/cli` a
  while ago) : deploy, notary, secrets.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5f56503f583f21d655394f755f71849381bd58c7
Component: engine
2018-04-16 10:48:58 +02:00
bd6e299583 Small daemon refactoring and add swarm init/join helpers
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 239a8a518904dfb51fe62087d8702519c20ce808
Component: engine
2018-04-16 10:20:10 +02:00
e4e0816835 build.md: Document --build-arg without value
This use case is currently _working correctly_, which is nice, but there is no documentation to be found about it. This PR fixes that.

Signed-off-by: Per Lundberg <perlun@gmail.com>
Upstream-commit: 82c23208ee
Component: cli
2018-04-16 07:52:13 +03:00
1b1d5ffe90 Merge pull request #36862 from yongtang/04152018-container.Create
Some enhancement in integration tests
Upstream-commit: ea579a6194525ce3b98eba04f74de19a106bf918
Component: engine
2018-04-15 09:12:52 -07:00
adaf9083e8 Merge component 'engine' from git@github.com:moby/moby master 2018-04-14 17:06:13 +00:00
fe0deb4aa6 Merge pull request #36738 from Microsoft/jjh/getlayerpath
Windows: Add GetLayerPath implementation in graphdriver
Upstream-commit: 5c2e6064a1c5cb816081958e5a7079bc6b474940
Component: engine
2018-04-14 09:59:38 -07:00
691aeed45e Some enhancement in integration tests
This fix converts some `client.ContainerCreate` to `container.Create`,
and removes some unneeded `name` fields when test containers are created.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ab9bb47b05b1dde445a5e4ba78ae97303208dc8b
Component: engine
2018-04-14 16:52:02 +00:00
c4b7e9df27 Merge component 'cli' from git@github.com:docker/cli master 2018-04-14 16:41:31 +00:00
cf1baa9f3c Add bash completion for secret|config create --template-driver
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 43024e2d57
Component: cli
2018-04-14 14:46:19 +02:00
a95dfe42a3 Merge pull request #970 from cowlinator/temp2
Clarify --build-arg documentation
Upstream-commit: e5980c541a
Component: cli
2018-04-13 18:54:16 -07:00
566b2857cf Merge pull request #35739 from thaJeztah/bump-go-1.10
Bump Golang to 1.10.1
Upstream-commit: 61138fb5fc0f5fc1799cabfa86d28fb88a0f472c
Component: engine
2018-04-13 13:56:38 -10:00
944c468f43 Merge pull request #963 from thaJeztah/fix-stack-deploy-after-force
Fix stack deploy re-deploying service after --force
Upstream-commit: 6b31ea0f0d
Component: cli
2018-04-13 13:06:40 -10:00
fce8015aac Merge pull request #36845 from medakk/refactor-daemon
Refactor code in cmd/dockerd/daemon.go
Upstream-commit: 3881f1a5219ba5d0a1ed54121ba20cd1700fec52
Component: engine
2018-04-13 15:26:48 -07:00
6f1e5f20ef Merge pull request #36839 from vdemeester/integration-registry-refactoring
Move and refactor integration-cli/registry to internal/test
Upstream-commit: a9f502d04b5a493904a24c173fa3d6d6b17ad740
Component: engine
2018-04-13 15:02:53 -07:00
f66a44c5e1 Merge component 'engine' from git@github.com:moby/moby master 2018-04-13 17:06:24 +00:00
10abb9454f Migrate image tag tests from integration-cli to api tests
This fix migrates image tag tests from integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9bcb960508a6066811cffcca1e35ca44d7f1cf94
Component: engine
2018-04-13 14:46:40 +00:00
af04bf6300 Move and refactor integration-cli/registry to internal/test
- Move the code from `integration-cli` to `internal/test`.
- Use `testingT` and `assert` when creating the registry.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 66de2e6e3b6d927a3396743cd7c363aa9f7b776e
Component: engine
2018-04-13 10:45:34 +02:00
1fe7cf068a Merge pull request #36840 from cpuguy83/bump_libnetwork
Bump libnetwork commit
Upstream-commit: 544ec0994f3979314b0c3a892a4e352145d0cc0b
Component: engine
2018-04-13 13:54:52 +09:00
21cd6af613 Merge pull request #36778 from odg0318/master
Using authorization plugin, I changed Content-Type check routine.
Upstream-commit: ff6a103067dec1eec6de023ec813355c419246f6
Component: engine
2018-04-12 17:39:38 -07:00
32a14263cf Merge pull request #35831 from anusha-ragunathan/splunk_partial
Improve partial message support in logger
Upstream-commit: 9689059b5636f23d77cc3ac29ee41c6fabff81ec
Component: engine
2018-04-12 17:38:27 -07:00
97ccb57a9f Merge pull request #36727 from tiborvass/fix-master-ci-gitcommit
ci: quote bash variable
Upstream-commit: f238bfda902d8193dd2d33bb334cd2419ffa5578
Component: engine
2018-04-12 14:06:22 -07:00
3d3a3ad156 hack/make.ps1: fix Validate-PkgImports
In Go 1.10.1, the Deps for pkg\tarsum\tarsum_test.go are empty ([]) and
the PowerShell script ends up setting its import list to a string value
of False instead of an empty array. This can be remedied by forcing the
result to be an array, by concatenating to an empty array (@() + ...)

Signed-off-by: John Stephens <johnstep@docker.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ec3f9230d70506c536a24e844da0f0b3af9b43f6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ee508d47c3917b423b6caae0ad2867c4f6ffe696
Component: engine
2018-04-12 13:37:10 -07:00
ea19201d03 archive/tar: vendor again
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 7b30fd0e1d8bc77f0556181c82f85d046b058f27)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 66720189e04d50ef06c12d1ffbbfebf41caa2ae3
Component: engine
2018-04-12 13:36:58 -07:00
c7b8d02f5e Update logger adapter test to avoid race
Add synchronization around adding logs to a plugin
and reading those logs. Without the follow configuration,
a race occurs between go routines to add the logs into
the plugin and read the logs out of the plugin. This
adds a function to synchronize the action to avoid the
race.
Removes use of file for buffering, instead buffering whole
messages so log count can be checked discretely.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c208f1c8a8d57f9a7f48f63345e77146774aa7a6
Component: engine
2018-04-12 13:35:15 -07:00
869a49d9be Set format in archiver
Prevent changing the tar output by setting the format to
PAX and keeping the times truncated.
Without this change the archiver will produce different tar
archives with different hashes with go 1.10.
The addition of the access and changetime timestamps would
also cause diff comparisons to fail.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fb170206ba12752214630b269a40ac7be6115ed4
Component: engine
2018-04-12 13:34:33 -07:00
49ee24ad6b Fix tarsum for go 1.10
Remove invalid flush commands, flush should only occur when file
has been completely written. This is already handle, remove these calls.
Ensure data gets written after EOF in correct order and before close.
Remove gname and uname from sum for hash compatibility.
Update tarsum tests for gname/uname removal.
Return valid length after eof.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a422774e593b33bd287d9890544ad9e09b380d8c
Component: engine
2018-04-12 13:34:14 -07:00
f2f6aa148e Remove patched "archive/tar" package
This fix is now upstream in Go 1.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 950a1aa3170cedabd904cdcfcfa70c7d551a5e16
Component: engine
2018-04-12 13:33:33 -07:00
91c1ef0fbf Bump Golang to 1.10.1, alpine 3.7
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: be8885525c4d1ef4a13bbd6396f60e8657bc5573
Component: engine
2018-04-12 13:30:01 -07:00
ee6e3cbd82 Refactor code in cmd/dockerd/daemon.go
Signed-off-by: Karthik Karanth <karanth.karthik@gmail.com>
Upstream-commit: 05346355dbd4300a21bfd64cda93ea6c5aef0cf0
Component: engine
2018-04-13 00:14:20 +05:30
a9398df305 Merge pull request #36595 from runcom/oom-docker-cp-authz
copy: avoid using all system memory with authz plugins
Upstream-commit: 76e47a08c5bb52b4a6ac95d2f90888c0e50bb85b
Component: engine
2018-04-12 13:42:56 -04:00
7f57a9f17c Merge component 'engine' from git@github.com:moby/moby master 2018-04-12 17:06:18 +00:00
21c1019add Merge component 'cli' from git@github.com:docker/cli master 2018-04-12 16:41:30 +00:00
2047b759b0 Bump libnetwork commit
Full diff
5c1218c956...c15b372ef2

Fixes a panic on concurrent read/write to a map.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 248aed5766ba330ab8cb2b10b03b6ce57dc64283
Component: engine
2018-04-12 12:07:53 -04:00
21bd6f1766 Merge pull request #997 from justincormack/notaryup
Update Notary vendor to 0.6.1
Upstream-commit: 2ce3dc13da
Component: cli
2018-04-12 10:54:50 +01:00
0166969766 Merge pull request #988 from anusha-ragunathan/plugin_doc
Update examples to reflect docker-runc's runtime root for plugins.
Upstream-commit: 3d0fc8d309
Component: cli
2018-04-11 21:32:02 -07:00
0a52018901 Merge pull request #36722 from vdemeester/network-ipvlan-test-migration
Migrate test-integration-cli experimental ipvlan test to integration 
Upstream-commit: 6f4bf5629cf030ee9c941534847effdcbdae9790
Component: engine
2018-04-11 14:51:25 -07:00
e844cef5f8 Improve partial message support in logger
Docker daemon has a 16K buffer for log messages. If a message length
exceeds 16K, it should be split by the logger and merged at the
endpoint.

This change adds `PartialLogMetaData` struct for enhanced partial support
- LastPartial (bool) : indicates if this is the last of all partials.
- ID (string)        : unique 32 bit ID. ID is same across all partials.
- Ordinal (int starts at 1) : indicates the position of msg in the series of partials.
Also, the timestamps across partials in the same.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 0b4b0a7b5d5de8cb575b666312fceaa2cd58e658
Component: engine
2018-04-11 13:26:28 -07:00
ad813c4199 Limit authz response buffer
When the authz response buffer limit is hit, perform a flush.
This prevents excessive buffer sizes, especially on large responses
(e.g. `/containers/<id>/archive` or `/containers/<id>/export`).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 74f8e47352e71aad4015d8d9dea8f16e7a055863
Component: engine
2018-04-11 15:36:36 -04:00
82e4a36355 Merge component 'engine' from git@github.com:moby/moby master 2018-04-11 17:06:31 +00:00
62463a5bcb Merge component 'cli' from git@github.com:docker/cli master 2018-04-11 16:41:31 +00:00
975c16f6d2 Merge pull request #36826 from vdemeester/integration-daemon-swarm-refactoring
Make internal/test/daemon.Daemon swarm aware
Upstream-commit: ce3c2e23315a8745dca792a39aa496d9b33689ea
Component: engine
2018-04-11 09:33:58 -07:00
6ed9fc6e5c Remove testify dependency as not used any more
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 322adc8a54
Component: cli
2018-04-11 14:14:57 +01:00
ac4eb0950b Update Notary vendor to 0.6.1
Minor update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 8812c54a4d
Component: cli
2018-04-11 14:10:52 +01:00
48d909a965 Merge pull request #36827 from AntaresS/remove-retry
remove the retries for service update
Upstream-commit: 5680ccd4abcc38abe4c4bbaf72656fdf0f236ddd
Component: engine
2018-04-11 06:06:05 -07:00
dc8e81cea5 Merge pull request #35518 from cyphar/libdm-dlsym-deferred_remove
pkg: devmapper: dynamically load dm_task_deferred_remove
Upstream-commit: 5219725890816a62185b6c7c0f022351e7aaee84
Component: engine
2018-04-11 14:11:16 +02:00
4059b74760 Make internal/test/daemon.Daemon swarm aware
This remove the daemon.Swarm construction by make the new test Daemon
struct aware of swarm.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 83d18cf4e3e84055f7034816eed2a10c04e777ca
Component: engine
2018-04-11 12:10:17 +02:00
bb59f6dc6e Move ipvlan and macvlan tests on their own folder…
… making each folder/suites quicker to run

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a3323d2e4349b7e8d449c6e571ca3d4aa3e53d63
Component: engine
2018-04-11 11:14:58 +02:00
c2ef763ca9 Refactor macvlan tests a bit
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0ab6116ce868a0fc671a49a89696e3a1ce35e26d
Component: engine
2018-04-11 11:14:54 +02:00
2c7fcaadfb Migrate test-integration-cli experimental ipvlan test to integration
All `Ipvlan` related test on `DockerSuite` and `DockerNetworkSuite`
are migrated to `ipvlan_test.go`.

The end goal being to remove the `experimental` builds.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 24f934751120ea420b7ba4d2e314df805f3eff06
Component: engine
2018-04-11 11:14:47 +02:00
1a3ab779c5 Merge pull request #36768 from crosbymichael/booo
Don't make container mount unbindable
Upstream-commit: 59d56084347bae27c72752e31f910a266638fe23
Component: engine
2018-04-11 09:54:44 +02:00
6aec02bb4f Merge pull request #994 from silvin-lubecki/fix-gometalinter
Fixed gometalinter errors on test files
Upstream-commit: 8e1cd515ba
Component: cli
2018-04-10 18:49:42 -07:00
59714fb174 remove the retries for service update
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 7380935331f0c35315003578258f6c1f47c1a586
Component: engine
2018-04-10 17:17:02 -07:00
c4fdce16ba Don't make container mount unbindable
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4c000662feb3c8e3d63cbcb044a47f627cd9bb45
Component: engine
2018-04-10 15:14:34 -04:00
e58320e94a Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-04-10 17:06:52 +00:00
1f461d4e5c Merge pull request #36824 from vdemeester/integration-daemon-refactoring
Move integration-cli daemon package to internal/test…
Upstream-commit: 68dd184c7c7201030f52c39e55bee170df365d60
Component: engine
2018-04-10 10:06:09 -07:00
d1f6615693 Merge component 'cli' from git@github.com:docker/cli master 2018-04-10 16:41:33 +00:00
f71c487025 Merge pull request #96 from utzb/master
use seccomp for xenial
Upstream-commit: c216602d16cfefdb175cdb902038789b00dd2cef
Component: packaging
2018-04-10 09:31:15 -07:00
baa55da752 Move integration-cli daemon package to internal/test…
… and do not use the `docker` cli in it. One of the reason of this
move is to not make `integration` package using legacy
`integration-cli` package.

Next move will be to support swarm within this package *and* provide
some helper function using the api (compared to the one using cli in
`integration-cli/daemon` package).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f0d277fe84a72b29c0d2d541c20d5a9c4d7e4884
Component: engine
2018-04-10 16:29:48 +02:00
37bdc4a0ae Fixed gometalinter errors on test files
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 54f8ca6660
Component: cli
2018-04-10 16:03:56 +02:00
4a24bb90a9 Merge pull request #992 from thaJeztah/bump-version-18.05
Bump version to 18.05.0-dev
Upstream-commit: 16eee1dcdc
Component: cli
2018-04-10 11:49:01 +02:00
0657b91bfc Merge pull request #103 from thaJeztah/bump-golang-1.9.5
Bump Golang to 1.9.5
Upstream-commit: f169b1e43aa26020a6a2a2e09ca3d35371b6c50c
Component: packaging
2018-04-09 15:20:59 -07:00
70744081df Merge pull request #102 from seemethere/arm64_buster
Add aarch64 builder for debian-buster
Upstream-commit: 54456bf1ef88a6698744e035d3655c8bcfd8e410
Component: packaging
2018-04-09 15:11:10 -07:00
87af25ac9e Bump version to 18.05.0-dev
Docker 18.04.0 branch was cut from e6e47d95b5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 341486299a
Component: cli
2018-04-09 13:37:45 -07:00
fe0d099c16 Merge pull request #984 from eiais/trustfish
add fish completions for docker trust subcommand
Upstream-commit: ec412bdbb4
Component: cli
2018-04-09 22:29:09 +02:00
a5ee15c5ef Merge pull request #978 from bogdananton/fix-manifest-docs-typo
[docs] Fix typo in manifest command docs: updated `MANFEST` to `MANIFEST`.
Upstream-commit: 066fd62e37
Component: cli
2018-04-09 13:25:37 -07:00
080b13b520 Merge component 'engine' from git@github.com:moby/moby master 2018-04-09 17:06:20 +00:00
40b08ea4d1 Dockerbuilder: use the arch info from base image
Currently we hardcode the architecture to the `runtime.GOARCH` when
building a docker image, this will result in a confusing info if the
arch in the base image is different from the one on the host.

This PR takes use of the arch data from the base image during the build
process, thus we can get consistent arch info between the base image
and the finally built image.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 92b17b10bad1f1788419b70db5d6ed9cdf8d15ef
Component: engine
2018-04-09 10:40:21 +00:00
6d9f00fbde Merge pull request #36746 from vdemeester/experimental-build-tests
Migrate test-integration-cli experimental build tests to integration
Upstream-commit: cbde00b44273a584bed2ee3513db68924b4a6dba
Component: engine
2018-04-09 10:21:03 +02:00
94172b42d6 refactor: simplify code to make function more readable
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
Upstream-commit: a6379399818402be12b9d29e343d348031cbe62f
Component: engine
2018-04-09 15:50:20 +08:00
6657091b64 Merge component 'engine' from git@github.com:moby/moby master 2018-04-07 17:06:24 +00:00
e45b2e29df Merge pull request #36808 from justincormack/sys-rw-priv-always
Always make sysfs read-write with privileged
Upstream-commit: fb08a5c6c3e68a66f2096d97fdec9455fa007dde
Component: engine
2018-04-07 09:29:23 +09:00
0b3d7f605d Merge pull request #36806 from adshmh/integration-config-tests-use-unique-names
config integration tests use unique resource names
Upstream-commit: 390fd38bcbf6c5ea1456211c31eaee412b0f3f72
Component: engine
2018-04-07 09:28:14 +09:00
728f075089 Merge component 'cli' from git@github.com:docker/cli master 2018-04-06 16:41:33 +00:00
2cf9f7eb88 Always make sysfs read-write with privileged
It does not make any sense to vary this based on whether the
rootfs is read only. We removed all the other mount dependencies
on read-only eg see #35344.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: a729853bc712910574a7417f67764ec8c523928b
Component: engine
2018-04-06 16:17:18 +01:00
b7d779bc5e integration tests under integration/config use unique names when creating resources
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 69481edc0770208f7af96c0eb48c0ab90e4889fb
Component: engine
2018-04-06 06:06:02 -04:00
5d0f671bd1 Update examples to reflect docker-runc's runtime root for plugins.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 5fd9eab3d0
Component: cli
2018-04-05 12:14:59 -07:00
74bf31d3e3 Merge pull request #986 from thaJeztah/bump-golang-1.9.5
Bump Golang to 1.9.5
Upstream-commit: fe83feeb72
Component: cli
2018-04-05 19:10:23 +02:00
0814aa2ae5 Merge component 'engine' from git@github.com:moby/moby master 2018-04-05 17:05:49 +00:00
33403f2a86 Bump Golang to 1.9.5
go1.9.5 (released 2018/03/28) includes fixes to the compiler, go command, and
net/http/pprof package. See the Go 1.9.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.9.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d3b8ceb52c
Component: cli
2018-04-05 10:02:23 -07:00
c18ca5abde Merge component 'cli' from git@github.com:docker/cli master 2018-04-05 16:41:29 +00:00
89747f2a26 Merge pull request #981 from vdemeester/docs-fix-stack-deploy-reference
Fix `docker stack deploy` reference flag
Upstream-commit: 62104e2497
Component: cli
2018-04-05 09:32:41 -07:00
cb04b581ce Merge pull request #983 from vdemeester/972-fix-merge-network
Fix error with merge composefile with networks…
Upstream-commit: 3eb215c128
Component: cli
2018-04-05 09:31:26 -07:00
96e7de35a2 Fix error with merge composefile with networks…
… and other cases too. Updating mergo fixes the bugs (but introduced a
slight behaviour change that had to be fixed too)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0122730faf
Component: cli
2018-04-05 10:37:35 +02:00
12207142e4 If Content-Type is application/json;charset=UTF-8, RequestBody is empty.
Signed-off-by: odg0318 <odg0318@gmail.com>
Upstream-commit: 6ac73d34e4d8f2b6303f0ed49b58d0a92c19c6f1
Component: engine
2018-04-05 04:03:45 -04:00
d97a287d94 Merge pull request #36769 from stevvooe/defensive-attachment-processing
daemon/cluster: handle partial attachment entries during configure
Upstream-commit: 8a9e1808cfdef414e60307b4ccd96719731be304
Component: engine
2018-04-05 09:35:11 +02:00
7e2f77eef8 Merge pull request #36728 from darrenstahlmsft/LayerLeak
Fix Windows layer leak when write fails
Upstream-commit: a8260058e39f7014f811394f86ae2c0bc899e11e
Component: engine
2018-04-04 19:05:59 -07:00
a72a47a3d9 Bump Golang to 1.9.5
go1.9.5 (released 2018/03/28) includes fixes to the compiler, go command, and
net/http/pprof package. See the Go 1.9.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.9.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c62336593118020462d65d4e9784143e07de2da7
Component: packaging
2018-04-04 18:01:28 -07:00
95a3a5cb78 daemon/cluster: handle partial attachment entries during configure
We have seen a panic when re-joining a node to a swarm cluster. The
cause of the issue is unknown, so we just need to add a test for nil
objects and log when we get the condition. Hopefully this can prevent
the crash and we can recover the config at a later time.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 454128c6e82cded211c1412e3eb350b1f7533ee2
Component: engine
2018-04-04 15:53:14 -07:00
0dacb7da76 Merge pull request #36779 from thaJeztah/bump-golang-1.9.5
Update Golang to 1.9.5
Upstream-commit: a15cbcb3cfc320430c3af027c3e384466cd4c1cf
Component: engine
2018-04-04 13:28:58 -07:00
28820945d1 Fix Windows layer leak when write fails
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 1f28844d7869609f371ab2a7881e4488a79a7e27
Component: engine
2018-04-04 12:31:23 -07:00
3ccf86f831 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-04-04 18:09:40 +00:00
15dcf3ac74 Merge component 'engine' from git@github.com:moby/moby master 2018-04-04 18:09:33 +00:00
91ed2df48d Add aarch64 builder for debian-buster
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: a42fb6433445b05c1318c9db2b1325bfb50f24af
Component: packaging
2018-04-04 16:59:31 +00:00
bf1e88e279 Merge pull request #98 from seemethere/f28
Add packaging code for Fedora 28
Upstream-commit: 9efc79dd124c6c2a07488e68ddbad1558b8e5e30
Component: packaging
2018-04-04 09:44:21 -07:00
7681719a24 Update Golang to 1.9.5
go1.9.5 (released 2018/03/28) includes fixes to the compiler, go
command, and net/http/pprof package. See the Go 1.9.5 milestone on
the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.9.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0b6f8a7eff325a683b10d64db363da2145aa1c36
Component: engine
2018-04-04 06:59:53 -07:00
e416848066 Merge pull request #36701 from thaJeztah/bump-swarmkit
Bump SwarmKit to 831df679a0b8a21b4dccd5791667d030642de7ff
Upstream-commit: 094aa1a5527df23922e1de85919da7ab67455067
Component: engine
2018-04-03 21:22:52 -07:00
119115ef8d add fish completions for docker trust subcommand
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Upstream-commit: 4439f6446e
Component: cli
2018-04-03 18:04:04 -07:00
06bbeec2bc Add packaging code for Fedora 28
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 00148a3c994c753a3e171b1aa2b422342e00fd16
Component: packaging
2018-04-03 23:50:57 +00:00
1e976c5ef2 Merge component 'engine' from git@github.com:moby/moby master 2018-04-03 23:35:47 +00:00
bf5c5d2816 Merge pull request #36749 from stevvooe/update-containerd-1.0.3
containerd: update to 1.0.3 release
Upstream-commit: 10ca8d9771fd0d4051cb8291d7980ae909d437f7
Component: engine
2018-04-03 12:07:26 -07:00
b7c2550378 Merge component 'engine' from git@github.com:moby/moby master 2018-04-03 17:06:38 +00:00
dcc0cb0975 Merge component 'cli' from git@github.com:docker/cli master 2018-04-03 16:41:31 +00:00
ebe9fb4969 Merge pull request #36774 from AkihiroSuda/libnetwork-20180403
update libnetwork to improve scalabiltiy of bridge network isolation rules
Upstream-commit: eb3f0252d0187d61f591f88be1ac583c910df0e3
Component: engine
2018-04-03 09:21:10 -07:00
2da3a78249 Merge pull request #36762 from zorrorffm/moby_dev
Add quotation marks for $CURDIR
Upstream-commit: 6c0d6236117effb139dd3d3edf984877f81e0a94
Component: engine
2018-04-03 10:28:11 +02:00
77bb3ea6e7 Fix docker stack deploy reference flag
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2ee9635b1e
Component: cli
2018-04-03 10:11:52 +02:00
0b341811fc update libnetwork to improve scalabiltiy of bridge network isolation rules
* libnetwork#2121: Retry other external DNS servers on ServFail
* libnetwork#2125: Fix README flag and expose orphan network peers
* libnetwork#2126: Adding goreport card
* libnetwork#2130: Modify awk to use cut in check_ip_overlap
* libnetwork#2117: [Carry 1534] Improve scalabiltiy of bridge network isolation rules

Full changes: 2bf63300c5...5c1218c956

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: b159da19734269c4a162763ebfa28dff07b703f3
Component: engine
2018-04-03 16:50:00 +09:00
6a9a060b45 Merge pull request #979 from joaofnfernandes/docs-secrets-6294
Use printf, not echo when creating secrets
Upstream-commit: 17aaad6f06
Component: cli
2018-04-03 09:45:11 +02:00
f323a813e1 Merge pull request #36724 from dnephin/api-docs-add-build-target
Add target field to build API docs
Upstream-commit: 045206a45c15625249d7956a6e18d2accaab6383
Component: engine
2018-04-02 22:35:00 -07:00
54e71e814c Merge pull request #36770 from mrueg/36754-follow-up-test
Fix tests for pkg/archive
Upstream-commit: a2db190088a6c11af05023469733f3293c741084
Component: engine
2018-04-03 13:49:48 +09:00
d94b697fa2 Merge pull request #980 from thaJeztah/fix-history-format-placeholder
Fix --format example for docker history
Upstream-commit: 4faf9a1736
Component: cli
2018-04-02 20:14:51 -07:00
7b60a70f28 Fix tests for pkg/archive
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
Upstream-commit: 108bbd96cb6f9aaa2a761e1a33250f36d58882f9
Component: engine
2018-04-03 01:17:52 +02:00
74a9225ea5 Fix --format example for docker history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2f7bf40e73
Component: cli
2018-04-02 16:07:40 -07:00
314f0caa92 Bump SwarmKit to 831df679a0b8a21b4dccd5791667d030642de7ff
Changes included:

- Ingress network should not be attachable
- [manager/state] Add fernet as an option for raft encryption
- Log GRPC server errors
- Log leadership changes at manager level
- [state/raft] Increase raft ElectionTick to 10xHeartbeatTick
- Remove the containerd executor
- agent: backoff session when no remotes are available
- [ca/manager] Remove root CA key encryption support entirely
- Fix agent logging race (fixes https://github.com/docker/swarmkit/issues/2576)
- Adding logic to restore networks in order

Also adds github.com/fernet/fernet-go as a new dependency

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 27749659d5a30999691e401a351221780a483099
Component: engine
2018-04-02 15:17:38 -07:00
15ef970018 Use printf, not echo when creating secrets
Update the docs so that users don't use `echo` when creating
secrets from STDIN. `echo` adds a trailing new line, so users
will probably be confused when their passwords don't work.

Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
Upstream-commit: 5238f3e93e
Component: cli
2018-04-02 15:15:19 -07:00
35efc4d5f1 containerd: update to 1.0.3 release
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 554d657c1f7a0f4dce51f0d26407fb05a0580fa1
Component: engine
2018-04-02 13:42:49 -07:00
1841491e85 Merge pull request #36745 from arm64b/fix-misused-nwname
Fix a misused network object name
Upstream-commit: 785b3e32876e10d638d9b1bae00e3f340a2f47ec
Component: engine
2018-04-02 10:35:20 -07:00
766917be06 Add quotation marks for $CURDIR
This change fixes bug when $CURDIR contains special character e.g. '&&'.

Change-Id: I658eb60d97c2229cf8b4e0a61dbbecf3edc9d573
Signed-off-by: Fangming.Fang <fangming.fang@arm.com>
Upstream-commit: 83062593d7ce759bb96e271e30460afa4a695dba
Component: engine
2018-04-02 05:48:35 +00:00
84fd46c694 Merge pull request #36756 from redbaron/userns-copy-fifo-fix
Fix FIFO, sockets and device files when run in user NS
Upstream-commit: 7410b046491a027fa49cc69475c09fa929b9f810
Component: engine
2018-04-01 20:02:11 -07:00
5392f72ea0 [docs] Fix typo in manifest command docs: updated MANFEST to MANIFEST.
Signed-off-by: Bogdan Anton <contact@bogdananton.ro>
Upstream-commit: 9fa6bd4174
Component: cli
2018-04-01 17:40:31 +03:00
94036de956 Fix FIFO, sockets and device files when run in user NS
commit 617c352e9225 "Don't create devices if in a user namespace"

introduced check, which meant to skip mknod operation when run
in user namespace, but instread skipped FIFO and socket files
copy.

Signed-off-by: Maxim Ivanov <ivanov.maxim@gmail.com>
Upstream-commit: 6f084f292932c464a30b56edb9edbe238bdcf0aa
Component: engine
2018-04-01 12:33:59 +01:00
b0b28797bc Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-03-31 17:06:47 +00:00
fafe3fe50a Merge component 'engine' from git@github.com:moby/moby master 2018-03-31 17:06:40 +00:00
861c35095f Merge pull request #100 from seemethere/update_readme
Add Bionic to README
Upstream-commit: 9e33949813b2589271f7a4535008b209d95200ab
Component: packaging
2018-03-30 15:13:50 -07:00
96b3d4192f Add Bionic to README
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 205c26fc9d83bfcb04b39d7b3fb5ae9c1fcbbcc3
Component: packaging
2018-03-30 22:12:42 +00:00
8e1baea5f9 Merge pull request #36706 from arm64b/add-defult-timeout-config-func
Add default pollSettings config functions
Upstream-commit: 635f359f8b61887faa9427d9c673be96faf992b5
Component: engine
2018-03-30 19:31:06 +02:00
fb9c6b4cbb Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-03-30 17:06:07 +00:00
09c16ca1db Merge component 'engine' from git@github.com:moby/moby master 2018-03-30 17:06:00 +00:00
fe76970085 TestDaemonNoSpaceLeftOnDeviceError: simplify
There is no need to perform a separate losetup step; mount (even
the one in busybox!) is smart enough to set up a loopback device
all by itself (even without -o loop present!). More to say, while
doing this, it sets LO_FLAGS_AUTOCLEAR flag for the kernel to
delete the loopback device as soon as its fs is unmounted (this
is supposed to work since kernel 2.6.25).

Also, remove mount options (-t ext4, -o loop,rw) as they are
either defaults (rw) or mount is smart enough to figure out.
Leave -n so it won't do unnecessary write to container's /etc/mtab.

While at it, touch up some comments.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a978fd22daefcc68d37c46177a545f7e1dfc6d9e
Component: engine
2018-03-30 09:14:49 -07:00
57682a5381 Merge pull request #36715 from cpuguy83/plugin_exec_fixes
Make sure plugin container is removed on failure
Upstream-commit: 859e43e64c4358c9aa48e045c0e5b048361a4c9b
Component: engine
2018-03-30 13:17:31 +02:00
61213d110b Migrate test-integration-cli experimental build tests to integration
All `docker build` tests that require an `ExperimentalDaemon` are
migrated to `integration/build` package and start an experimental
daemon to test on it.

The end goal being to remove the `experimental` builds.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 183076e89df64928bd2e94ad0da9725b482367cd
Component: engine
2018-03-30 13:10:02 +02:00
d785136a3a Fix a misused network object name
A minor nit. `test01` never been created and used in
`TestDockerNetworkInspectCustomSpecified()` function, so correct it.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: f041953d04bffa2be05466173f02dd016c68286d
Component: engine
2018-03-30 09:47:41 +00:00
9113717a6d Merge pull request #36741 from tonistiigi/yamllint
dockerfile: restore yamllint
Upstream-commit: 1d59c66b704ad94f9f7b40b82b9df16cc6082a0a
Component: engine
2018-03-30 10:22:44 +01:00
187be19082 Merge pull request #36736 from tonistiigi/remove-test-kernel-version
copy: remove kernel version test
Upstream-commit: 6c948b562d826fd95da5f972305d22c47a479494
Component: engine
2018-03-30 10:53:40 +02:00
fa2b7ebcd9 Merge pull request #36734 from cpuguy83/context_directory_size
Support cancellation in `directory.Size()`
Upstream-commit: f0b9eb8627b0bbf3cbd95edd78cc552cb3626520
Component: engine
2018-03-30 10:38:33 +02:00
2028cd9738 ci: quote bash variable
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: dc597777665c080490dd7540b7ac88fd91e746e1
Component: engine
2018-03-29 18:06:45 -07:00
85555b0bc6 Merge pull request #36726 from chungers/raft-params
Expose swarmkit's Raft tuning parameters in engine config
Upstream-commit: 8b6a8271a62eec40827bf77f32b794f650556c24
Component: engine
2018-03-29 17:19:04 -07:00
bdbb1213a7 dockerfile: restore yamllint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 708b068d3095c6a6be939eb2da78c921d2e945e2
Component: engine
2018-03-29 16:43:31 -07:00
9b41292c7f Support cancellation in directory.Size()
Makes sure that if the user cancels a request that the daemon stops
trying to traverse a directory.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9d46c4c138d7b3f7778c13fe84857712bd6c97a9
Component: engine
2018-03-29 15:49:15 -04:00
60950b5248 Windows: GetLayerPath in graphdriver
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: 3aab84803dec4a28484b319531685276435263cd
Component: engine
2018-03-29 11:45:45 -07:00
1e72ac567b Merge pull request #99 from seemethere/arm64_bionic
Add Ubuntu 18.04 arm64 builds
Upstream-commit: bad901ee77ac8aebb7cf7207bd4eb153e7a0f05d
Component: packaging
2018-03-29 11:37:51 -07:00
9a9ab34587 Add Ubuntu 18.04 arm64 builds
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: aac8310bbee3c7480487a624756d25d22d53c7dd
Component: packaging
2018-03-29 18:09:08 +00:00
c26d6b4944 copy: remove kernel version test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4d6b8f73a89abf715fa33b3f553884c575a3b136
Component: engine
2018-03-29 10:45:43 -07:00
72c010f740 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2018-03-29 17:06:47 +00:00
68ce936581 Merge component 'engine' from git@github.com:moby/moby master 2018-03-29 17:06:40 +00:00
b95f740ca4 Merge pull request #36631 from vdemeester/e2e-integration-cli-run
e2e integration cli run
Upstream-commit: deed26f7f0f9a9d279b8ac99389f204d9063d1a4
Component: engine
2018-03-29 12:06:29 +02:00
28e52cd76e Skip some tests in certain condition to run with e2e image
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e55d6fc8573580f6eea009cd7f1034aa912128ef
Component: engine
2018-03-29 09:10:39 +02:00
002f9525b1 Using the default PollSettings function
Using the default PollSettings functions to adjust the timeout
value instead of changing the value each time when needed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: b8912feeffcdfd489c9fc1212277840adac2719c
Component: engine
2018-03-29 05:00:14 +00:00
2751013fe1 Add default pollSettings adjustment routines
Add the default function per resource to override the `pollSettings`
which will be re-used where it's needed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: ee6959addc5664a5c55765f2c721f84414ea4779
Component: engine
2018-03-29 04:47:14 +00:00
39837033f0 Merge pull request #36638 from ctelfer/rolling-update-libnetwork-import
Import libnetwork fix for rolling updates
Upstream-commit: f12574891cb2ea69809f2425a0d5658a320293fe
Component: engine
2018-03-28 21:27:14 -07:00
9a7c928884 Expose swarm raft tuning parameters in engine config
Signed-off-by: David Chung <david.chung@docker.com>
Upstream-commit: 275a1ca7c8ec1d556c37bb50ac574beffbb16e5a
Component: engine
2018-03-28 16:54:43 -07:00
2d5676eecc Merge pull request #97 from seemethere/bionic
Add building code for Ubuntu Bionic (18.04) LTS
Upstream-commit: f2312f5028c946ddeaa89405334ca91a4e5fcb1c
Component: packaging
2018-03-28 16:36:04 -07:00
65120ca559 Add building code for Ubuntu Bionic (18.04) LTS
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 460f0b5becbbc5ec2bd341df409af8f06c0a70f7
Component: packaging
2018-03-28 21:53:58 +00:00
fa48e15468 Merge pull request #484 from seemethere/change
[master] Change to docker fork of moby-components
2018-03-28 13:28:24 -07:00
efdc8dee9a Change to docker fork of moby-components
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-03-28 20:26:30 +00:00
8cca58175d Merge pull request #36711 from cpuguy83/plugin_mounts_sorting
Don't sort plugin mounts slice
Upstream-commit: 18d16885308c35cf38db03b39a779198704a8f42
Component: engine
2018-03-28 11:57:38 -07:00
59210a575a Add target field to build API docs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 95ccb55fe281fdccb996b0b82befcb3998beac25
Component: engine
2018-03-28 14:34:58 -04:00
e260e8f94d Remove (now) extra call to sb.DisableService()
This call was added as part of commit a042e5a20 and at the time was
useful.  sandbox.DisableService() basically calls
endpoint.deleteServiceInfoFromCluster() for every endpoint in the
sandbox.  However, with the libnetwork change, endpoint.sbLeave()
invokes endpoint.deleteServiceInfoFromCluster(). The releaseNetwork()
call invokes sandbox.Delete() immediately after
sandbox.DisableService().  The sandbox.Delete() in turn ultimately
invokes endpoint.sbLeave() for every endpoint in the sandbox which thus
removes the endpoint's load balancing entry via
endpoint.deleteServiceInfoFromCluster().  So the call to
sandbox.DisableService() is now redundant.

It is noteworthy that, while redundant, the presence of the call would
not cause errors.  It would just be sub-optimal.  The DisableService()
call would cause libnetwork to down-weight the load balancing entries
while the call to sandbox.Delete() would cause it to remove the entries
immediately afterwards.  Aside from the wasted computation, the extra
call would also propagate an extra state change in the networkDB gossip
messages.  So, overall, it is much better to just avoid the extra
overhead.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: c27417aa7de46daa415600b39fc8a9c411c8c493
Component: engine
2018-03-28 14:16:31 -04:00
aebec1d07b Import libnetwork fix for rolling updates
This patch allows endpoints to complete servicing connections while
being removed from a service.  The fix is entirely within libnetwork
and requires no changes to the moby codebase proper.  It operates
by initially down-weighting a container endpoint in the load balancer
to 0 while keeping the endpoint present in the load balancer.  This
allows traffic to continue to flow to the endpoint while preventing new
connections from going to the endpoint.  This allows the container
to complete requests during the "stop_grace_period" and then exit when
finished without interruption of service.

This change requires propagating the status of disabled service
endpoints via the networkDB.  Accordingly, the patch includes both code
to generate and handle service update messages.  It also augments the
service structure with a ServiceDisabled boolean to convey whether an
endpoint should ultimately be removed or just disabled.  This,
naturally, required a rebuild of the protocol buffer code.

The protocol buffer encoding is designed to support additions of fields
to messages in a backwards-compatible manner.  Protocol buffer
unmarshalling code automatically skips past any fields that it isn't
aware of.  As a result, an older moby daemon without this fix can
receive and will process correctly networkDB messages from newer moby
daemons with this patch.

As it turns out, the additional field is simply a bool that is otherwise
irrelevent on networkDB create and delete events.  So its absence in
older moby daemon processing has no impact.  However, the fix leverages
the "update" networkDB message which was previously unused in
libnetwork.  Although older libnetwork implementations parse the message
cleanly, they will see the message as unexpected and as such issue a log
at error level indicating the receipt of such.

Other than this there should be no other negative impact for use of this
patch in mixed environments. (Although older mobys won't be able to
gracefully downgrade connections on their nodes of course.)

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: 50dbdeff9fd186bb0e9926996436e1f56529a831
Component: engine
2018-03-28 14:16:31 -04:00
af66ab6f08 Merge component 'engine' from git@github.com:moby/moby master 2018-03-28 17:07:19 +00:00
6489f0428a Merge component 'cli' from git@github.com:docker/cli master 2018-03-28 16:41:29 +00:00
10857ac7fc Merge pull request #36697 from vdemeester/network-macvlan-test-migration
Migrate test-integration-cli experimental macvlan test to integration
Upstream-commit: 38588656727d19f4a36d14c3620ecaff73160315
Component: engine
2018-03-28 17:56:42 +02:00
92debf8e45 Use containerd client Reconnect() API.
This fixes an issue where the containerd client is cached in a container
object in libcontainerd and becomes stale after containerd is restarted.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2c682d5209d1d1cdd232ce3909fa25b6023f9a5b
Component: engine
2018-03-28 09:43:08 -04:00
59748a4be4 Bump containerd client vendor commit
This does not bump the containerd binary.
Picks last commit before go1.10 switch, which is not currently supported
in moby.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 30cb23360e21c7914f41e69496abde4780bd7bc1
Component: engine
2018-03-28 09:25:38 -04:00
fb7d4261c9 Don't sort plugin mounts slice
This was added as part of a53930a04fa81b082aa78e66b342ff19cc63cc5f with
the intent to sort the mounts in the plugin config, but this was sorting
*all* the mounts from the default OCI spec which is problematic.

In reality we don't need to sort this because we are only adding a
self-binded mount to flag it as rshared.

We may want to look at sorting the plugin mounts before they are added
to the OCI spec in the future, but for now I think the existing behavior
is fine since the plugin author has control of the order (except for the
propagated mount).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ec90839ca302ca53a7d55e4c7f79e7b4779f5e15
Component: engine
2018-03-28 09:10:43 -04:00
a2df8e9502 Make sure plugin container is removed on failure
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f81172b9031160218e51fb2a7dbeee19962a60a9
Component: engine
2018-03-28 09:07:24 -04:00
e5e13f7dec Migrate test-integration-cli experimental macvlan test to integration
All `Macvlan` related test on `DockerSuite` and `DockerNetworkSuite`
are migrated to `macvlan_test.go`.

Also, as `macvlan` seems to be out of experimental, this removes
the *skip* when the run is not experimental (and doesn't start a
daemon with experimental either).

The end goal being to remove the `experimental` builds.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ef5bc603266b9fa5df525319d67329ebc14a8ee7
Component: engine
2018-03-28 10:47:11 +02:00
f7430e1bae Merge pull request #36651 from keloyang/judgment-daemonWaitCh
Add if judgment before receiving operations on daemonWaitCh
Upstream-commit: b6a7d027e99d4416489b829307f2ad57ba52ada7
Component: engine
2018-03-28 10:07:57 +02:00
5f335fa91f Merge pull request #965 from thaJeztah/fix-version-output
Fix docker version output alignment
Upstream-commit: eb4a4fe9b9
Component: cli
2018-03-28 09:53:34 +02:00
a2853ba98e Merge pull request #975 from tonistiigi/vendor-moby
vendor: update moby to ed7b6428
Upstream-commit: 442f56faf6
Component: cli
2018-03-27 14:54:42 -07:00
0ff4beab6e vendor: update moby to ed7b6428
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a1cbaa827b
Component: cli
2018-03-27 14:11:29 -07:00
e578155b97 Merge pull request #968 from dnephin/remove-myself-as-code-owner
Remove myself from CODEOWNERS
Upstream-commit: 26b834a698
Component: cli
2018-03-27 16:46:54 -04:00
baaac6847b Bump version to 18.05.0-ce-dev
Signed-off-by: GordonTheTurtle <engine-team@docker.com>
2018-03-27 17:52:22 +00:00
252f993dde Standardized log messages accross the different storage drivers.
Now all of the storage drivers use the field "storage-driver" in their log
messages, which is set to name of the respective driver.
Storage drivers changed:
- Aufs
- Btrfs
- Devicemapper
- Overlay
- Overlay 2
- Zfs

Signed-off-by: Alejandro GonzÃlez Hevia <alejandrgh11@gmail.com>
Upstream-commit: 9392838150f5495a63f33fed6570ae41f5a6d62e
Component: engine
2018-03-27 14:37:30 +02:00
6493e53acd Update build.md
Explicitly stated that you must add --build-arg for each build argument.
Added multiple arguments to example of `--build-arg` usage.
Fix for https://github.com/docker/docker.github.io/issues/6248

Signed-off-by: Preston Cowley <cowlinator@gmail.com>
Upstream-commit: ad44e2d45e
Component: cli
2018-03-26 14:28:49 -07:00
953c988bf8 Remove myself from CODEOWNERS
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3a633aa271
Component: cli
2018-03-26 13:39:03 -04:00
35825c3260 Fix docker version output alignment
Use tabwriter to print the version output

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 48eb7a082d
Component: cli
2018-03-26 17:59:20 +02:00
9166a5d3e5 Fix stack deploy re-deploying service after --force
When updating a service with the `--force` option, the `ForceUpdate`
property of the taskspec is incremented.

Stack deploy did not take this into account, and reset this
field to its default value (0), causing the service to be
re-deployed.

This patch copies the existing value before updating the service.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 76439457d2
Component: cli
2018-03-26 15:24:28 +02:00
d8e4be59e9 use seccomp for xenial
Upstream-commit: 4c02fd87dda048d5d5d7fa6c8bdb8fba04c257c1
Component: packaging
2018-03-23 23:47:58 +01:00
287db00d6b Add if judgment before receiving operations on daemonWaitCh
receive operations on a nil channel will always block, this lead containerd not started.

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
Upstream-commit: a50d9c0765d9861d226b323ffe190c0c99c3ac17
Component: engine
2018-03-21 05:53:55 -04:00
a2e4c2ffca LCOW: Write saved manifest.json in Unix paths
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0a49de4eb551510cf4aafa7d212ec2bb8041f642
Component: engine
2018-03-14 11:56:00 -07:00
c113de75ae LCOW: Graphdriver DiffGetter implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6b4f989bc2c19be58e10731b9b0504b5f94607bf
Component: engine
2018-03-14 11:55:06 -07:00
d2852cf7ac LCOW: Make sure OS is copied for docker save
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d5c781323d5534a01e42cf8fd8cf773c6f1cdff2
Component: engine
2018-03-14 11:46:46 -07:00
47c7cacdf3 LCOW: Check OS in takeLayerReference
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d8dbba14fd6a1be91e88082d4d4ba9aafd8c880a
Component: engine
2018-03-14 11:46:35 -07:00
12c92977bc man/docker-run.1: misc fixes
The list of changes here is too long to be described.

Maybe it's better to just rewrite the page from scratch, but at list this commit
makes some things better than before.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: e4405205ad
Component: cli
2018-03-06 15:05:32 -08:00
607f04235c man/docker-run.1: fix --interactive
Do not mention the default value twice.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c2670c59fb
Component: cli
2018-03-06 14:34:31 -08:00
ce28b1a891 man/docker-run.1: fix --device and --cgroup-device-rule
Use the proper man typesetting when describing the options
(i.e. use italics for variable parts, bold for literals).
Expand the description. Give better examples. Refer to mknod(2).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 70dea5c144
Component: cli
2018-03-06 14:33:22 -08:00
a2b8d3a9e8 pkg: devmapper: dynamically load dm_task_deferred_remove
dm_task_deferred_remove is not supported by all distributions, due to
out-dated versions of devicemapper. However, in the case where the
devicemapper library was updated without rebuilding Docker (which can
happen in some distributions) then we should attempt to dynamically load
the relevant object rather than try to link to it.

This can only be done if Docker was built dynamically, for obvious
reasons.

In order to avoid having issues arise when dlsym(3) was unnecessary,
gate the whole dlsym(3) logic behind a buildflag that we disable by
default (libdm_dlsym_deferred_remove).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 98fe4bd8f1e35f8e498e268f653a43cbfa31e751
Component: engine
2018-02-16 17:23:23 +11:00
f57ac5e0cd Add 17.03.2 CHANGELOG
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 4a4e7d9229d5981b2d1a1e4d78378e52040e8904)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: abb615b49ce7bdb6651a493781892f0cb0a94418
Component: engine
2018-02-12 19:54:00 +01:00
0f6bd1573f Fluentd Log Driver: Add partial flag into record
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Upstream-commit: 3ed3b33e558490db088103404e03539f5a3df832
Component: engine
2018-01-31 11:52:03 +09:00
6623 changed files with 662614 additions and 270623 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
.helpers/
Dockerfile.engine
image-linux
*.tar

View File

@ -1,85 +1,312 @@
# Changelog
For official release notes for Docker Engine CE and Docker Engine EE, visit the
[release notes page](https://docs.docker.com/engine/release-notes/).
## 18.09.9 (2019-08-28)
### Client
- Fix Windows absolute path detection on non-Windows. [docker/cli#1990](https://github.com/docker/cli/pull/1990)
- Fix Docker refusing to load key from delegation.key on Windows. [docker/cli#1968](https://github.com/docker/cli/pull/1968)
- Completion scripts updates for bash and zsh.
### Logging
- Fix for reading journald logs. [moby/moby#37819](https://github.com/moby/moby/pull/37819) [moby/moby#38859](https://github.com/moby/moby/pull/38859)
### Networking
- Prevent panic on network attach to a container with disabled networking. [moby/moby#39589](https://github.com/moby/moby/pull/39589)
- Fix service port for an application becomes unavailable randomly. [docker/libnetwork#2069](https://github.com/docker/libnetwork/pull/2069)
- Fix cleaning up `--config-only` networks after `--config-from` networks have ungracefully exited. [docker/libnetwork#2373](https://github.com/docker/libnetwork/pull/2373)
### Runtime
- Update to Go 1.11.13.
- Fix a potential engine panic when using XFS disk quota for containers. [moby/moby#39644](https://github.com/moby/moby/pull/39644)
### Swarm
- Fix "grpc: received message larger than max" errors. [moby/moby#39306](https://github.com/moby/moby/pull/39306)
- Fix an issue where nodes with lots of tasks could not be removed. [docker/swarmkit#2867](https://github.com/docker/swarmkit/pull/2867)
## 18.09.8 (2019-07-17)
### Client
- Fix Rollback config type interpolation. [docker/cli#1973](https://github.com/docker/cli/pull/1973)
### Runtime
- Fix [CVE-2019-13509](https://nvd.nist.gov/vuln/detail/CVE-2019-13509) in DebugRequestMiddleware: unconditionally scrub data field.
## 18.09.7 (2019-06-27)
### Builder
- Fix panic when building dockerfiles containing only comments. [moby/moby#38487](https://github.com/moby/moby/pull/38487)
- builder: add workaround for gcr auth issue. [moby/moby#38246](https://github.com/moby/moby/pull/38246)
- builder-next: fix gcr workaround token cache. [moby/moby#39183](https://github.com/moby/moby/pull/39183)
### Runtime
* Performance optimizations in aufs and layer store for massively parallel container creation/removal. [moby/moby#39107](https://github.com/moby/moby/pull/39107)
* Update to containerd 1.2.6. [moby/moby#39016](https://github.com/moby/moby/pull/39016)
- Fix: [CVE-2018-15664](https://nvd.nist.gov/vuln/detail/CVE-2018-15664) symlink-exchange attack with directory traversal. [moby/moby#39357](https://github.com/moby/moby/pull/39357)
- Windows: fix support for `docker service create --limit-cpu`. [moby/moby#39190](https://github.com/moby/moby/pull/39190)
- daemon: fix mirrors validation. [moby/moby#38991](https://github.com/moby/moby/pull/38991)
- Stop sorting uid and gid ranges in id maps. [moby/moby#39288](https://github.com/moby/moby/pull/39288)
### Logging
- Fix to allow large log lines for logger plugins. [moby/moby#39038](https://github.com/moby/moby/pull/39038)
## 18.09.6 (2019-05-02)
### Builder
- Fix `COPY` and `ADD` with multiple `<src>` do not invalidate cache if `DOCKER_BUILDKIT=1`. [moby/moby#38964](https://github.com/moby/moby/issues/38964)
### Networking
- Cleanup the cluster provider when the agent is closed. [docker/libnetwork#2354](https://github.com/docker/libnetwork/pull/2354)
- Windows: pick a random host port if the user does not specify a host port. [docker/libnetwork#2369](https://github.com/docker/libnetwork/pull/2369)
## 18.09.5 (2019-04-11)
### Builder
- Fix `DOCKER_BUILDKIT=1 docker build --squash .`. [docker/engine#176](https://github.com/docker/engine/pull/176)
### Client
- Fix tty initial size error. [docker/cli#1775](https://github.com/docker/cli/pull/1775)
- Fix dial-stdio goroutine leakage. [docker/cli#1795](https://github.com/docker/cli/pull/1795)
- Fix the stack informer's selector used to track deployment. [docker/cli#1794](https://github.com/docker/cli/pull/1794)
### Networking
- Fix `network=host` using wrong `resolv.conf` with `systemd-resolved`. [docker/engine#180](https://github.com/docker/engine/pull/180)
- Fix Windows ARP entries getting corrupted randomly under load. [docker/engine#192](https://github.com/docker/engine/pull/192)
### Runtime
- Fix stopped containers with restart policy showing as `Restarting`. [docker/engine#181](https://github.com/docker/engine/pull/181)
- Fix to use original process spec for execs. [docker/engine#178](https://github.com/docker/engine/pull/178)
### Swarm Mode
- Fix leaking task resources when nodes are deleted. [docker/engine#185](https://github.com/docker/engine/pull/185)
## 18.09.4 (2019-03-27)
### Builder
- Add validation for git ref so it can't be misinterpreted as a flag. [moby/moby#38944](https://github.com/moby/moby/pull/38944)
### Runtime
- Fix `docker cp` error with filenames greater than 100 characters. [moby/moby#38634](https://github.com/moby/moby/pull/38634)
- Fix layer/layer_store: ensure NewInputTarStream resources are released. [moby/moby#38413](https://github.com/moby/moby/pull/38413)
* Increase GRPC limit for GetConfigs. [moby/moby#38800](https://github.com/moby/moby/pull/38800)
* Update to containerd 1.2.5. [docker/engine#173](https://github.com/docker/engine/pull/173)
### Swarm Mode
- Fix nil pointer exception when joining node to swarm. [moby/moby#38618](https://github.com/moby/moby/issues/38618)
## 18.09.3 (2019-02-28)
### Networking
- Windows: avoid regeneration of network ids to prevent broken references to networks. [docker/engine#149](https://github.com/docker/engine/pull/149)
### Runtime
* Update to Go 1.10.8.
* Modify some of the names in the container name generator. [docker/engine#159](https://github.com/docker/engine/pull/159)
- When copying existing folder, ignore xattr set errors when the target filesystem doesn't support xattr. [docker/engine#135](https://github.com/docker/engine/pull/135)
- Graphdriver: fix "device" mode not being detected if "character-device" bit is set. [docker/engine#160](https://github.com/docker/engine/pull/160)
- Fix nil pointer derefence on failure to connect to containerd. [docker/engine#162](https://github.com/docker/engine/pull/162)
- Delete stale containerd object on start failure. [docker/engine#154](https://github.com/docker/engine/pull/154)
## 18.09.2 (2019-02-11)
### Security
- Update `runc` to address a critical vulnerability that allows specially-crafted containers to gain administrative privileges on the host. ([CVE-2019-5736](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5736))
## 18.09.1 (2019-01-09)
### Builder
- Fix inefficient networking config. [docker/engine#123](https://github.com/docker/engine/pull/123)
- Fix docker system prune doesn't accept until filter. [docker/engine#122](https://github.com/docker/engine/pull/122)
- Avoid unset credentials in containerd. [docker/engine#122](https://github.com/docker/engine/pull/122)
* Update to BuildKit 0.3.3. [docker/engine#122](https://github.com/docker/engine/pull/122)
+ Additional warnings for use of deprecated legacy overlay and devicemapper storage dirvers. [docker/engine#85](https://github.com/docker/engine/pull/85)
### Client
+ Add bash completion for experimental CLI commands (manifest). [docker/cli#1542](https://github.com/docker/cli/pull/1542)
- Fix yamldocs outputing `[flags]` in usage output. [docker/cli#1540](https://github.com/docker/cli/pull/1540)
- Fix setting default schema to tcp for docker host. [docker/cli#1454](https://github.com/docker/cli/pull/1454)
- prune: perform image pruning before build cache pruning. [docker/cli#1532](https://github.com/docker/cli/pull/1532)
- Fix bash completion for `service update --force`. [docker/cli#1526](https://github.com/docker/cli/pull/1526)
### Networking
- Fix iptables compatibility on debian. [docker/engine#107](https://github.com/docker/engine/pull/107)
### Packaging
+ Add docker.socket requirement for docker.service. [docker/docker-ce-packaging#276](https://github.com/docker/docker-ce-packaging/pull/276)
+ Add socket activation for RHEL-based distributions. [docker/docker-ce-packaging#274](https://github.com/docker/docker-ce-packaging/pull/274)
- Add libseccomp requirement for RPM packages. [docker/docker-ce-packaging#266](https://github.com/docker/docker-ce-packaging/pull/266)
### Runtime
* Add `/proc/asound` to masked paths. [docker/engine#126](https://github.com/docker/engine/pull/126)
* Update to containerd 1.2.1-rc.0. [docker/engine#121](https://github.com/docker/engine/pull/121)
+ Windows: allow process isolation. [docker/engine#81](https://github.com/docker/engine/pull/81)
- Windows: DetachVhd attempt in cleanup [docker/engine#113](https://github.com/docker/engine/pull/113)
- API: properly handle invalid JSON to return a 400 status. [docker/engine#110](https://github.com/docker/engine/pull/110)
- API: ignore default address-pools on API < 1.39. [docker/engine#118](https://github.com/docker/engine/pull/118)
- API: add missing default address pool fields to swagger. [docker/engine#119](https://github.com/docker/engine/pull/119)
- awslogs: account for UTF-8 normalization in limits. [docker/engine#112](https://github.com/docker/engine/pull/112)
- Prohibit reading more than 1MB in HTTP error responses. [docker/engine#114](https://github.com/docker/engine/pull/114)
- apparmor: allow receiving of signals from `docker kill`. [docker/engine#116](https://github.com/docker/engine/pull/116)
- overlay2: use index=off if possible (fix EBUSY on mount). [docker/engine#84](https://github.com/docker/engine/pull/84)
## 18.09.0 (2018-11-08)
### Deprecation
For more information on the list of deprecated flags and APIs, have a look at
https://docs.docker.com/engine/deprecated/ where you can find the target removal dates
## 18.04.0-ce (2018-04-10)
* Deprecate devicemapper storage driver [docker/cli#1455](https://github.com/docker/cli/pull/1455) / [docker/cli#1424](https://github.com/docker/cli/pull/1424)
* Deprecate legacy overlay storage driver [docker/cli#1455](https://github.com/docker/cli/pull/1455) / [docker/cli#1425](https://github.com/docker/cli/pull/1425)
* Remove support for TLS < 1.2 [moby/moby#37660](https://github.com/moby/moby/pull/37660)
* Remove Ubuntu 14.04 "Trusty Tahr" as a supported platform [docker-ce-packaging#255](https://github.com/docker/docker-ce-packaging/pull/255) / [docker-ce-packaging#254](https://github.com/docker/docker-ce-packaging/pull/254)
* Remove Debian 8 "Jessie" as a supported platform [docker-ce-packaging#255](https://github.com/docker/docker-ce-packaging/pull/255) / [docker-ce-packaging#254](https://github.com/docker/docker-ce-packaging/pull/254)
### API
+ Update API version to 1.39 [moby/moby#37640](https://github.com/moby/moby/pull/37640)
+ Add support for remote connections using SSH [docker/cli#1014](https://github.com/docker/cli/pull/1014)
+ Builder: add prune options to the API [moby/moby#37651](https://github.com/moby/moby/pull/37651)
+ Add "Warnings" to `/info` endpoint, and move detection to the daemon [moby/moby#37502](https://github.com/moby/moby/pull/37502)
* Do not return "`<unknown>`" in /info response [moby/moby#37472](https://github.com/moby/moby/pull/37472)
### Builder
- Fix typos in builder and client. [moby/moby#36424](https://github.com/moby/moby/pull/36424)
+ Allow BuildKit builds to run without experimental mode enabled. Buildkit can now be configured with an option in daemon.json [moby/moby#37593](https://github.com/moby/moby/pull/37593) [moby/moby#37686](https://github.com/moby/moby/pull/37686) [moby/moby#37692](https://github.com/moby/moby/pull/37692) [docker/cli#1303](https://github.com/docker/cli/pull/1303) [docker/cli#1275](https://github.com/docker/cli/pull/1275)
+ Add support for build-time secrets using a `--secret` flag when using BuildKit [docker/cli#1288](https://github.com/docker/cli/pull/1288)
+ Add SSH agent socket forwarder (`docker build --ssh $SSHMOUNTID=$SSH_AUTH_SOCK`) when using BuildKit [docker/cli#1438](https://github.com/docker/cli/pull/1438) / [docker/cli#1419](https://github.com/docker/cli/pull/1419)
+ Add `--chown` flag support for `ADD` and `COPY` commands on Windows [moby/moby#35521](https://github.com/moby/moby/pull/35521)
+ Add `builder prune` subcommand to prune BuildKit build cache [docker/cli#1295](https://github.com/docker/cli/pull/1295) [docker/cli#1334](https://github.com/docker/cli/pull/1334)
+ BuildKit: Add configurable garbage collection policy for the BuildKit build cache [docker/engine#59](https://github.com/docker/engine/pull/59) / [moby/moby#37846](https://github.com/moby/moby/pull/37846)
+ BuildKit: Add support for `docker build --pull ...` when using BuildKit [moby/moby#37613](https://github.com/moby/moby/pull/37613)
+ BuildKit: Add support or "registry-mirrors" and "insecure-registries" when using BuildKit docker/engine#59](https://github.com/docker/engine/pull/59) / [moby/moby#37852](https://github.com/moby/moby/pull/37852)
+ BuildKit: Enable net modes and bridge. [moby/moby#37620](https://github.com/moby/moby/pull/37620)
* BuildKit: Change `--console=[auto,false,true]` to `--progress=[auto,plain,tty]` [docker/cli#1276](https://github.com/docker/cli/pull/1276)
* BuildKit: Set BuildKit's ExportedProduct variable to show useful errors in the future. [moby/moby#37439](https://github.com/moby/moby/pull/37439)
- BuildKit: Do not cancel buildkit status request. [moby/moby#37597](https://github.com/moby/moby/pull/37597)
- Fix no error is shown if build args are missing during docker build [moby/moby#37396](https://github.com/moby/moby/pull/37396)
- Fix error "unexpected EOF" when adding an 8GB file [moby/moby#37771](https://github.com/moby/moby/pull/37771)
- LCOW: Ensure platform is populated on `COPY`/`ADD`. [moby/moby#37563](https://github.com/moby/moby/pull/37563)
### Client
* Print Stack API and Kubernetes versions in version command. [docker/cli#898](https://github.com/docker/cli/pull/898)
- Fix Kubernetes duplication in version command. [docker/cli#953](https://github.com/docker/cli/pull/953)
* Use HasAvailableFlags instead of HasFlags for Options in help. [docker/cli#959](https://github.com/docker/cli/pull/959)
+ Add support for mandatory variables to stack deploy. [docker/cli#893](https://github.com/docker/cli/pull/893)
- Fix docker stack services command Port output. [docker/cli#943](https://github.com/docker/cli/pull/943)
* Deprecate unencrypted storage. [docker/cli#561](https://github.com/docker/cli/pull/561)
* Don't set a default filename for ConfigFile. [docker/cli#917](https://github.com/docker/cli/pull/917)
- Fix compose network name. [docker/cli#941](https://github.com/docker/cli/pull/941)
+ Add `docker engine` subcommand to manage the lifecycle of a Docker Engine running as a privileged container on top of containerd, and to allow upgrades to Docker Engine Enterprise [docker/cli#1260](https://github.com/docker/cli/pull/1260)
+ Expose product license in `docker info` output [docker/cli#1313](https://github.com/docker/cli/pull/1313)
+ Show warnings produced by daemon in `docker info` output [docker/cli#1225](https://github.com/docker/cli/pull/1225)
* Hide `--data-path-addr` flags when connected to a daemon that doesn't support this option [docker/docker/cli#1240](https://github.com/docker/cli/pull/1240)
* Only show buildkit-specific flags if BuildKit is enabled [docker/cli#1438](https://github.com/docker/cli/pull/1438) / [docker/cli#1427](https://github.com/docker/cli/pull/1427)
* Improve version output alignment [docker/cli#1204](https://github.com/docker/cli/pull/1204)
* Sort plugin names and networks in a natural order [docker/cli#1166](https://github.com/docker/cli/pull/1166), [docker/cli#1266](https://github.com/docker/cli/pull/1266)
* Updated bash and zsh [completion scripts](https://github.com/docker/cli/issues?q=label%3Aarea%2Fcompletion+milestone%3A18.09.0+is%3Aclosed)
- Fix mapping a range of host ports to a single container port [docker/cli#1102](https://github.com/docker/cli/pull/1102)
- Fix `trust inspect` typo: "`AdminstrativeKeys`" [docker/cli#1300](https://github.com/docker/cli/pull/1300)
- Fix environment file parsing for imports of absent variables and those with no name. [docker/cli#1019](https://github.com/docker/cli/pull/1019)
- Fix a potential "out of memory exception" when running `docker image prune` with a large list of dangling images [docker/cli#1432](https://github.com/docker/cli/pull/1432) / [docker/cli#1423](https://github.com/docker/cli/pull/1423)
- Fix pipe handling in ConEmu and ConsoleZ on Windows [moby/moby#37600](https://github.com/moby/moby/pull/37600)
- Fix long startup on windows, with non-hns governed Hyper-V networks [docker/engine#67](https://github.com/docker/engine/pull/67) / [moby/moby#37774](https://github.com/moby/moby/pull/37774)
### Daemon
- Fix daemon won't start when "runtimes" option is defined both in config file and cli [docker/engine#57](https://github.com/docker/engine/pull/57) / [moby/moby#37871](https://github.com/moby/moby/pull/37871)
- Loosen permissions on `/etc/docker` directory to prevent "permission denied" errors when using `docker manifest inspect` [docker/engine#56](https://github.com/docker/engine/pull/56) / [moby/moby#37847](https://github.com/moby/moby/pull/37847)
- Fix denial of service with large numbers in `cpuset-cpus` and `cpuset-mems` [docker/engine#70](https://github.com/docker/engine/pull/70) / [moby/moby#37967](https://github.com/moby/moby/pull/37967)
### Experimental
- LCOW: Add `--platform` to `docker import` [docker/cli#1375](https://github.com/docker/cli/pull/1375) / [docker/cli#1371](https://github.com/docker/cli/pull/1371)
- LCOW: Add LinuxMetadata support by default on Windows [moby/moby#37514](https://github.com/moby/moby/pull/37514)
- LCOW: Mount to short container paths to avoid command-line length limit [moby/moby#37659](https://github.com/moby/moby/pull/37659)
- LCOW: Fix builder using wrong cache layer [moby/moby#37356](https://github.com/moby/moby/pull/37356)
### Logging
* Silent login: use credentials from cred store to login. [docker/cli#139](https://github.com/docker/cli/pull/139)
+ Add support for compressibility of log file. [moby/moby#29932](https://github.com/moby/moby/pull/29932)
- Fix empty LogPath with non-blocking logging mode. [moby/moby#36272](https://github.com/moby/moby/pull/36272)
+ Add "local" log driver [moby/moby#37092](https://github.com/moby/moby/pull/37092)
+ Amazon CloudWatch: add `awslogs-endpoint` logging option [moby/moby#37374](https://github.com/moby/moby/pull/37374)
* Pass log-level to containerd. [moby/moby#37419](https://github.com/moby/moby/pull/37419)
- Fix json-log file descriptors leaking when using `--follow` [docker/engine#48](https://github.com/docker/engine/pull/48) [moby/moby#37576](https://github.com/moby/moby/pull/37576) [moby/moby#37734](https://github.com/moby/moby/pull/37734)
- Fix a possible deadlock on closing the watcher on kqueue [moby/moby#37392](https://github.com/moby/moby/pull/37392)
- Use poller based watcher to work around the file caching issue in Windows [moby/moby#37412](https://github.com/moby/moby/pull/37412)
### Networking
- Prevent explicit removal of ingress network. [moby/moby#36538](https://github.com/moby/moby/pull/36538)
+ Add support for global default address pools [moby/moby#37558](https://github.com/moby/moby/pull/37558) [docker/cli#1233](https://github.com/docker/cli/pull/1233)
* Use direct server return (DSR) in east-west overlay load balancing [docker/engine#93](https://github.com/docker/engine/pull/93) / [docker/libnetwork#2270](https://github.com/docker/libnetwork/pull/2270)
* Builder: temporarily disable bridge networking when using buildkit. [moby/moby#37691](https://github.com/moby/moby/pull/37691)
- Handle systemd-resolved case by providing appropriate resolv.conf to networking layer [moby/moby#37485](https://github.com/moby/moby/pull/37485)
### Runtime
* Devmapper cleanup improvements. [moby/moby#36307](https://github.com/moby/moby/pull/36307)
* Devmapper.Mounted: remove. [moby/moby#36437](https://github.com/moby/moby/pull/36437)
* Devmapper/Remove(): use Rmdir, ignore errors. [moby/moby#36438](https://github.com/moby/moby/pull/36438)
* LCOW - Change platform parser directive to FROM statement flag. [moby/moby#35089](https://github.com/moby/moby/pull/35089)
* Split daemon service code to windows file. [moby/moby#36653](https://github.com/moby/moby/pull/36653)
* Windows: Block pulling uplevel images. [moby/moby#36327](https://github.com/moby/moby/pull/36327)
* Windows: Hyper-V containers are broken after 36586 was merged. [moby/moby#36610](https://github.com/moby/moby/pull/36610)
* Windows: Move kernel_windows to use golang registry functions. [moby/moby#36617](https://github.com/moby/moby/pull/36617)
* Windows: Pass back system errors on container exit. [moby/moby#35967](https://github.com/moby/moby/pull/35967)
* Windows: Remove servicing mode. [moby/moby#36267](https://github.com/moby/moby/pull/36267)
* Windows: Report Version and UBR. [moby/moby#36451](https://github.com/moby/moby/pull/36451)
* Bump Runc to 1.0.0-rc5. [moby/moby#36449](https://github.com/moby/moby/pull/36449)
* Mount failure indicates the path that failed. [moby/moby#36407](https://github.com/moby/moby/pull/36407)
* Change return for errdefs.getImplementer(). [moby/moby#36489](https://github.com/moby/moby/pull/36489)
* Client: fix hijackedconn reading from buffer. [moby/moby#36663](https://github.com/moby/moby/pull/36663)
* Content encoding negotiation added to archive request. [moby/moby#36164](https://github.com/moby/moby/pull/36164)
* Daemon/stats: more resilient cpu sampling. [moby/moby#36519](https://github.com/moby/moby/pull/36519)
* Daemon/stats: remove obnoxious types file. [moby/moby#36494](https://github.com/moby/moby/pull/36494)
* Daemon: use context error rather than inventing new one. [moby/moby#36670](https://github.com/moby/moby/pull/36670)
* Enable CRIU on non-amd64 architectures (v2). [moby/moby#36676](https://github.com/moby/moby/pull/36676)
- Fixes intermittent client hang after closing stdin to attached container [moby/moby#36517](https://github.com/moby/moby/pull/36517)
- Fix daemon panic on container export after restart [moby/moby#36586](https://github.com/moby/moby/pull/36586)
- Follow-up fixes on multi-stage moby's Dockerfile. [moby/moby#36425](https://github.com/moby/moby/pull/36425)
* Freeze busybox and latest glibc in Docker image. [moby/moby#36375](https://github.com/moby/moby/pull/36375)
* If container will run as non root user, drop permitted, effective caps early. [moby/moby#36587](https://github.com/moby/moby/pull/36587)
* Layer: remove metadata store interface. [moby/moby#36504](https://github.com/moby/moby/pull/36504)
* Minor optimizations to dockerd. [moby/moby#36577](https://github.com/moby/moby/pull/36577)
* Whitelist statx syscall. [moby/moby#36417](https://github.com/moby/moby/pull/36417)
+ Add missing error return for plugin creation. [moby/moby#36646](https://github.com/moby/moby/pull/36646)
- Fix AppArmor not being applied to Exec processes. [moby/moby#36466](https://github.com/moby/moby/pull/36466)
* Daemon/logger/ring.go: log error not instance. [moby/moby#36475](https://github.com/moby/moby/pull/36475)
- Fix stats collector spinning CPU if no stats are collected. [moby/moby#36609](https://github.com/moby/moby/pull/36609)
- Fix(distribution): digest cache should not be moved if it was an auth. [moby/moby#36509](https://github.com/moby/moby/pull/36509)
- Make sure plugin container is removed on failure. [moby/moby#36715](https://github.com/moby/moby/pull/36715)
* Bump to containerd 1.0.3. [moby/moby#36749](https://github.com/moby/moby/pull/36749)
* Don't sort plugin mount slice. [moby/moby#36711](https://github.com/moby/moby/pull/36711)
+ Configure containerd log-level to be the same as dockerd [moby/moby#37419](https://github.com/moby/moby/pull/37419)
+ Add configuration option for cri-containerd [moby/moby#37519](https://github.com/moby/moby/pull/37519)
+ Update containerd client to v1.2.0-rc.1 [moby/moby#37664](https://github.com/moby/moby/pull/37664), [docker/engine#75](https://github.com/docker/engine/pull/75) / [moby/moby#37710](https://github.com/moby/moby/pull/37710)
### Security
- Remove support for TLS < 1.2 [moby/moby#37660](https://github.com/moby/moby/pull/37660)
- Seccomp: Whitelist syscalls linked to `CAP_SYS_NICE` in default seccomp profile [moby/moby#37242](https://github.com/moby/moby/pull/37242)
- Seccomp: move the syslog syscall to be gated by `CAP_SYS_ADMIN` or `CAP_SYSLOG` [docker/engine#64](https://github.com/docker/engine/pull/64) / [moby/moby#37929](https://github.com/moby/moby/pull/37929)
- SELinux: Fix relabeling of local volumes specified via Mounts API on selinux-enabled systems [moby/moby#37739](https://github.com/moby/moby/pull/37739)
- Add warning if REST API is accessible through an insecure connection [moby/moby#37684](https://github.com/moby/moby/pull/37684)
- Mask proxy credentials from URL when displayed in system info [docker/engine#72](https://github.com/docker/engine/pull/72) / [moby/moby#37934](https://github.com/moby/moby/pull/37934)
### Storage drivers
- Fix mount propagation for btrfs [docker/engine#86](https://github.com/docker/engine/pull/86) / [moby/moby#38026](https://github.com/moby/moby/pull/38026)
### Swarm Mode
* Fixes for synchronizing the dispatcher shutdown with in-progress rpcs. [moby/moby#36371](https://github.com/moby/moby/pull/36371)
* Increase raft ElectionTick to 10xHeartbeatTick. [moby/moby#36672](https://github.com/moby/moby/pull/36672)
* Make Swarm manager Raft quorum parameters configurable in daemon config. [moby/moby#36726](https://github.com/moby/moby/pull/36726)
* Ingress network should not be attachable. [docker/swarmkit#2523](https://github.com/docker/swarmkit/pull/2523)
* [manager/state] Add fernet as an option for raft encryption. [docker/swarmkit#2535](https://github.com/docker/swarmkit/pull/2535)
* Log GRPC server errors. [docker/swarmkit#2541](https://github.com/docker/swarmkit/pull/2541)
* Log leadership changes at the manager level. [docker/swarmkit#2542](https://github.com/docker/swarmkit/pull/2542)
* Remove the containerd executor. [docker/swarmkit#2568](https://github.com/docker/swarmkit/pull/2568)
* Agent: backoff session when no remotes are available. [docker/swarmkit#2570](https://github.com/docker/swarmkit/pull/2570)
* [ca/manager] Remove root CA key encryption support entirely. [docker/swarmkit#2573](https://github.com/docker/swarmkit/pull/2573)
- Fix agent logging race. [docker/swarmkit#2578](https://github.com/docker/swarmkit/pull/2578)
* Adding logic to restore networks in order. [docker/swarmkit#2571](https://github.com/docker/swarmkit/pull/2571)
+ Add support for global default address pools [moby/moby#37558](https://github.com/moby/moby/pull/37558) [docker/cli#1233](https://github.com/docker/cli/pull/1233)
* Block task starting until node attachments are ready [moby/moby#37604](https://github.com/moby/moby/pull/37604)
* Propagate the provided external CA certificate to the external CA object in swarm. [docker/cli#1178](https://github.com/docker/cli/pull/1178)
- Fix nil pointer dereference in node allocation [docker/engine#94](https://github.com/docker/engine/pull/94) / [docker/swarmkit#2764](https://github.com/docker/swarmkit/pull/2764)
## Packaging
* Remove Ubuntu 14.04 "Trusty Tahr" as a supported platform [docker-ce-packaging#255](https://github.com/docker/docker-ce-packaging/pull/255) / [docker-ce-packaging#254](https://github.com/docker/docker-ce-packaging/pull/254)
* Remove Debian 8 "Jessie" as a supported platform [docker-ce-packaging#255](https://github.com/docker/docker-ce-packaging/pull/255) / [docker-ce-packaging#254](https://github.com/docker/docker-ce-packaging/pull/254)
* Remove 'docker-' prefix for containerd and runc binaries [docker/engine#61](https://github.com/docker/engine/pull/61) / [moby/moby#37907](https://github.com/moby/moby/pull/37907), [docker-ce-packaging#241](https://github.com/docker/docker-ce-packaging/pull/241)
* Split "engine", "cli", and "containerd" to separate packages, and run containerd as a separate systemd service [docker-ce-packaging#131](https://github.com/docker/docker-ce-packaging/pull/131), [docker-ce-packaging#158](https://github.com/docker/docker-ce-packaging/pull/158)
* Build binaries with Go 1.10.4 [docker-ce-packaging#181](https://github.com/docker/docker-ce-packaging/pull/181)
* Remove `-ce` / `-ee` suffix from version string [docker-ce-packaging#206](https://github.com/docker/docker-ce-packaging/pull/206)

View File

@ -2,7 +2,7 @@ CLI_DIR:=$(CURDIR)/components/cli
ENGINE_DIR:=$(CURDIR)/components/engine
PACKAGING_DIR:=$(CURDIR)/components/packaging
MOBY_COMPONENTS_SHA=ab7c118272b02d8672dc0255561d0c4015979780
MOBY_COMPONENTS_URL=https://raw.githubusercontent.com/shykes/moby-extras/$(MOBY_COMPONENTS_SHA)/cmd/moby-components
MOBY_COMPONENTS_URL=https://raw.githubusercontent.com/docker/moby-extras/$(MOBY_COMPONENTS_SHA)/cmd/moby-components
MOBY_COMPONENTS=.helpers/moby-components-$(MOBY_COMPONENTS_SHA)
VERSION=$(shell cat VERSION)

View File

@ -1 +1 @@
18.04.0-ce
18.09.9-beta1

View File

@ -1,9 +1,9 @@
[component "packaging"]
url = git@github.com:docker/docker-ce-packaging
branch = master
branch = 18.09
[component "engine"]
url = git@github.com:moby/moby
branch = master
url = git@github.com:docker/engine
branch = 18.09
[component "cli"]
url = git@github.com:docker/cli
branch = master
branch = 18.09

View File

@ -1,9 +1,8 @@
# GitHub code owners
# See https://github.com/blog/2392-introducing-code-owners
cli/command/stack/** @dnephin @vdemeester
cli/compose/** @dnephin @vdemeester
cli/command/stack/** @vdemeester @silvin-lubecki
cli/compose/** @vdemeester
contrib/completion/bash/** @albers
contrib/completion/zsh/** @sdurrheimer
docs/** @mistyhacks @vdemeester @thaJeztah
scripts/** @dnephin
docs/** @vdemeester @thaJeztah

View File

@ -330,6 +330,7 @@ Pavel Tikhomirov <ptikhomirov@virtuozzo.com> <ptikhomirov@parallels.com>
Pawel Konczalski <mail@konczalski.de>
Peter Choi <phkchoi89@gmail.com> <reikani@Peters-MacBook-Pro.local>
Peter Dave Hello <hsu@peterdavehello.org> <PeterDaveHello@users.noreply.github.com>
Peter Hsu <shhsu@microsoft.com>
Peter Jaffe <pjaffe@nevo.com>
Peter Nagy <xificurC@gmail.com> <pnagy@gratex.com>
Peter Waller <p@pwaller.net> <peter@scraperwiki.com>
@ -378,8 +379,9 @@ Stefan Berger <stefanb@linux.vnet.ibm.com>
Stefan Berger <stefanb@linux.vnet.ibm.com> <stefanb@us.ibm.com>
Stefan J. Wernli <swernli@microsoft.com> <swernli@ntdev.microsoft.com>
Stefan S. <tronicum@user.github.com>
Stephen Day <stephen.day@docker.com>
Stephen Day <stevvooe@gmail.com>
Stephen Day <stephen.day@docker.com> <stevvooe@users.noreply.github.com>
Stephen Day <stevvooe@gmail.com> <stephen.day@docker.com>
Steve Desmond <steve@vtsv.ca> <stevedesmond-ca@users.noreply.github.com>
Sun Gengze <690388648@qq.com>
Sun Jianbo <wonderflow.sun@gmail.com>

View File

@ -26,6 +26,7 @@ Alex Mavrogiannis <alex.mavrogiannis@docker.com>
Alexander Boyd <alex@opengroove.org>
Alexander Larsson <alexl@redhat.com>
Alexander Morozov <lk4d4@docker.com>
Alexander Ryabov <i@sepa.spb.ru>
Alexandre González <agonzalezro@gmail.com>
Alfred Landrum <alfred.landrum@docker.com>
Alicia Lauerman <alicia@eta.im>
@ -69,6 +70,7 @@ Bill Wang <ozbillwang@gmail.com>
Bin Liu <liubin0329@gmail.com>
Bingshen Wang <bingshen.wbs@alibaba-inc.com>
Boaz Shuster <ripcurld.github@gmail.com>
Bogdan Anton <contact@bogdananton.ro>
Boris Pruessmann <boris@pruessmann.org>
Bradley Cicenas <bradley.cicenas@gmail.com>
Brandon Philips <brandon.philips@coreos.com>
@ -139,6 +141,7 @@ Dattatraya Kumbhar <dattatraya.kumbhar@gslab.com>
Dave Goodchild <buddhamagnet@gmail.com>
Dave Henderson <dhenderson@gmail.com>
Dave Tucker <dt@docker.com>
David Beitey <david@davidjb.com>
David Calavera <david.calavera@gmail.com>
David Cramer <davcrame@cisco.com>
David Dooling <dooling@gmail.com>
@ -222,6 +225,7 @@ Harry Zhang <harryz@hyper.sh>
He Simei <hesimei@zju.edu.cn>
Helen Xie <chenjg@harmonycloud.cn>
Henning Sprang <henning.sprang@gmail.com>
Henry N <henrynmail-github@yahoo.de>
Hernan Garcia <hernandanielg@gmail.com>
Hongbin Lu <hongbin034@gmail.com>
Hu Keping <hukeping@huawei.com>
@ -329,6 +333,7 @@ Kenfe-Mickaël Laventure <mickael.laventure@gmail.com>
Kevin Burke <kev@inburke.com>
Kevin Feyrer <kevin.feyrer@btinternet.com>
Kevin Kern <kaiwentan@harmonycloud.cn>
Kevin Kirsche <Kev.Kirsche+GitHub@gmail.com>
Kevin Meredith <kevin.m.meredith@gmail.com>
Kevin Richardson <kevin@kevinrichardson.co>
khaled souf <khaled.souf@gmail.com>
@ -367,6 +372,7 @@ Luca Marturana <lucamarturana@gmail.com>
Lucas Chan <lucas-github@lucaschan.com>
Luka Hartwig <mail@lukahartwig.de>
Lukasz Zajaczkowski <Lukasz.Zajaczkowski@ts.fujitsu.com>
Lydell Manganti <LydellManganti@users.noreply.github.com>
Lénaïc Huard <lhuard@amadeus.com>
Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Mabin <bin.ma@huawei.com>
@ -432,6 +438,7 @@ Máximo Cuadros <mcuadros@gmail.com>
Nace Oroz <orkica@gmail.com>
Nahum Shalman <nshalman@omniti.com>
Nalin Dahyabhai <nalin@redhat.com>
Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Natalie Parker <nparker@omnifone.com>
Nate Brennand <nate.brennand@clever.com>
Nathan Hsieh <hsieh.nathan@gmail.com>
@ -463,7 +470,9 @@ Paul Weaver <pauweave@cisco.com>
Pavel Pospisil <pospispa@gmail.com>
Paweł Szczekutowicz <pszczekutowicz@gmail.com>
Peeyush Gupta <gpeeyush@linux.vnet.ibm.com>
Per Lundberg <per.lundberg@ecraft.com>
Peter Edge <peter.edge@gmail.com>
Peter Hsu <shhsu@microsoft.com>
Peter Jaffe <pjaffe@nevo.com>
Peter Nagy <xificurC@gmail.com>
Peter Salvatore <peter@psftw.com>
@ -475,6 +484,7 @@ pidster <pid@pidster.com>
pixelistik <pixelistik@users.noreply.github.com>
Pratik Karki <prertik@outlook.com>
Prayag Verma <prayag.verma@gmail.com>
Preston Cowley <preston.cowley@sony.com>
Pure White <daniel48@126.com>
Qiang Huang <h.huangqiang@huawei.com>
Qinglan Peng <qinglanpeng@zju.edu.cn>
@ -540,7 +550,7 @@ Srini Brahmaroutu <srbrahma@us.ibm.com>
Stefan S. <tronicum@user.github.com>
Stefan Scherer <scherer_stefan@icloud.com>
Stefan Weil <sw@weilnetz.de>
Stephen Day <stephen.day@docker.com>
Stephen Day <stevvooe@gmail.com>
Stephen Rust <srust@blockbridge.com>
Steve Durrheimer <s.durrheimer@gmail.com>
Steven Burgess <steven.a.burgess@hotmail.com>

View File

@ -27,7 +27,9 @@
"cpuguy83",
"dnephin",
"justincormack",
"silvin-lubecki",
"stevvooe",
"thajeztah",
"tibor",
"tonistiigi",
"vdemeester",
@ -39,7 +41,6 @@
# TODO Describe the docs maintainers role.
people = [
"misty",
"thajeztah"
]
@ -93,19 +94,19 @@
Email = "justin.cormack@docker.com"
GitHub = "justincormack"
[people.misty]
Name = "Misty Stanley-Jones"
Email = "misty@docker.com"
GitHub = "mistyhacks"
[people.programmerq]
Name = "Jeff Anderson"
Email = "jeff@docker.com"
GitHub = "programmerq"
[people.silvin-lubecki]
Name = "Silvin Lubecki"
Email = "silvin.lubecki@docker.com"
GitHub = "silvin-lubecki"
[people.stevvooe]
Name = "Stephen Day"
Email = "stephen.day@docker.com"
Email = "stevvooe@gmail.com"
GitHub = "stevvooe"
[people.thajeztah]

View File

@ -21,6 +21,10 @@ test: test-unit ## run tests
test-coverage: ## run test coverage
./scripts/test/unit-with-coverage $(shell go list ./... | grep -vE '/vendor/|/e2e/')
.PHONY: fmt
fmt:
go list -f {{.Dir}} ./... | xargs gofmt -w -s -d
.PHONY: lint
lint: ## run all the lint tools
gometalinter --config gometalinter.json ./...
@ -46,10 +50,6 @@ binary-osx: ## build executable for macOS
dynbinary: ## build dynamically linked binary
./scripts/build/dynbinary
.PHONY: watch
watch: ## monitor file changes and run go test
./scripts/test/watch
vendor: vendor.conf ## check that vendor matches vendor.conf
rm -rf vendor
bash -c 'vndr |& grep -v -i clone'

View File

@ -26,13 +26,11 @@ Test<Function Name><Test Case Name>
where appropriate, but may not be appropriate in all cases.
Assertions should be made using
[testify/assert](https://godoc.org/github.com/stretchr/testify/assert) and test
requirements should be verified using
[testify/require](https://godoc.org/github.com/stretchr/testify/require).
[gotest.tools/assert](https://godoc.org/gotest.tools/assert).
Fakes, and testing utilities can be found in
[internal/test](https://godoc.org/github.com/docker/cli/internal/test) and
[gotestyourself](https://godoc.org/github.com/gotestyourself/gotestyourself).
[gotest.tools](https://godoc.org/gotest.tools).
## End-to-End Test Suite

View File

@ -1 +1 @@
18.04.0-ce
18.09.0-dev

View File

@ -4,7 +4,7 @@ clone_folder: c:\gopath\src\github.com\docker\cli
environment:
GOPATH: c:\gopath
GOVERSION: 1.10
GOVERSION: 1.11.13
DEPVERSION: v0.4.1
install:
@ -20,4 +20,4 @@ build_script:
- ps: .\scripts\make.ps1 -Binary
test_script:
- ps: .\scripts\make.ps1 -TestUnit
- ps: .\scripts\make.ps1 -TestUnit

View File

@ -4,10 +4,11 @@ jobs:
lint:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
docker: [{image: 'docker:18.03-git'}]
steps:
- checkout
- setup_remote_docker:
version: 18.03.1-ce
reusable: true
exclusive: false
- run:
@ -15,26 +16,23 @@ jobs:
- run:
name: "Lint"
command: |
dockerfile=dockerfiles/Dockerfile.lint
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-linter:$CIRCLE_BUILD_NUM .
docker build -f dockerfiles/Dockerfile.lint --tag cli-linter:$CIRCLE_BUILD_NUM .
docker run --rm cli-linter:$CIRCLE_BUILD_NUM
cross:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
docker: [{image: 'docker:18.03-git'}]
parallelism: 3
steps:
- checkout
- setup_remote_docker:
version: 18.03.1-ce
reusable: true
exclusive: false
- run:
name: "Cross"
command: |
dockerfile=dockerfiles/Dockerfile.cross
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-builder:$CIRCLE_BUILD_NUM .
docker build -f dockerfiles/Dockerfile.cross --tag cli-builder:$CIRCLE_BUILD_NUM .
name=cross-$CIRCLE_BUILD_NUM-$CIRCLE_NODE_INDEX
docker run \
-e CROSS_GROUP=$CIRCLE_NODE_INDEX \
@ -48,18 +46,17 @@ jobs:
test:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
docker: [{image: 'docker:18.03-git'}]
steps:
- checkout
- setup_remote_docker:
version: 18.03.1-ce
reusable: true
exclusive: false
- run:
name: "Unit Test with Coverage"
command: |
dockerfile=dockerfiles/Dockerfile.dev
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-builder:$CIRCLE_BUILD_NUM .
docker build -f dockerfiles/Dockerfile.dev --tag cli-builder:$CIRCLE_BUILD_NUM .
docker run --name \
test-$CIRCLE_BUILD_NUM cli-builder:$CIRCLE_BUILD_NUM \
make test-coverage
@ -76,33 +73,34 @@ jobs:
validate:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
docker: [{image: 'docker:18.03-git'}]
steps:
- checkout
- setup_remote_docker:
version: 18.03.1-ce
reusable: true
exclusive: false
- run:
name: "Validate Vendor, Docs, and Code Generation"
command: |
dockerfile=dockerfiles/Dockerfile.dev
echo "COPY . ." >> $dockerfile
rm -f .dockerignore # include .git
docker build -f $dockerfile --tag cli-builder-with-git:$CIRCLE_BUILD_NUM .
docker build -f dockerfiles/Dockerfile.dev --tag cli-builder-with-git:$CIRCLE_BUILD_NUM .
docker run --rm cli-builder-with-git:$CIRCLE_BUILD_NUM \
make ci-validate
no_output_timeout: 15m
shellcheck:
working_directory: /work
docker: [{image: 'docker:17.06-git'}]
docker: [{image: 'docker:18.03-git'}]
steps:
- checkout
- setup_remote_docker
- setup_remote_docker:
version: 18.03.1-ce
reusable: true
exclusive: false
- run:
name: "Run shellcheck"
command: |
dockerfile=dockerfiles/Dockerfile.shellcheck
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-validator:$CIRCLE_BUILD_NUM .
docker build -f dockerfiles/Dockerfile.shellcheck --tag cli-validator:$CIRCLE_BUILD_NUM .
docker run --rm cli-validator:$CIRCLE_BUILD_NUM \
make shellcheck
workflows:

View File

@ -17,12 +17,12 @@ func SetupRootCommand(rootCmd *cobra.Command) {
cobra.AddTemplateFunc("operationSubCommands", operationSubCommands)
cobra.AddTemplateFunc("managementSubCommands", managementSubCommands)
cobra.AddTemplateFunc("wrappedFlagUsages", wrappedFlagUsages)
cobra.AddTemplateFunc("useLine", UseLine)
rootCmd.SetUsageTemplate(usageTemplate)
rootCmd.SetHelpTemplate(helpTemplate)
rootCmd.SetFlagErrorFunc(FlagErrorFunc)
rootCmd.SetHelpCommand(helpCommand)
rootCmd.SetVersionTemplate("Docker version {{.Version}}\n")
rootCmd.PersistentFlags().BoolP("help", "h", false, "Print usage")
rootCmd.PersistentFlags().MarkShorthandDeprecated("help", "please use --help")
@ -99,20 +99,10 @@ func managementSubCommands(cmd *cobra.Command) []*cobra.Command {
return cmds
}
// UseLine returns the usage line for a command. This implementation is different
// from the default Command.UseLine in that it does not add a `[flags]` to the
// end of the line.
func UseLine(cmd *cobra.Command) string {
if cmd.HasParent() {
return cmd.Parent().CommandPath() + " " + cmd.Use
}
return cmd.Use
}
var usageTemplate = `Usage:
{{- if not .HasSubCommands}} {{ useLine . }}{{end}}
{{- if .HasSubCommands}} {{ .CommandPath}} COMMAND{{end}}
{{- if not .HasSubCommands}} {{.UseLine}}{{end}}
{{- if .HasSubCommands}} {{ .CommandPath}}{{- if .HasAvailableFlags}} [OPTIONS]{{end}} COMMAND{{end}}
{{ .Short | trim }}

View File

@ -0,0 +1,22 @@
package builder
import (
"github.com/spf13/cobra"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
)
// NewBuilderCommand returns a cobra command for `builder` subcommands
func NewBuilderCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "builder",
Short: "Manage builds",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
}
cmd.AddCommand(
NewPruneCommand(dockerCli),
)
return cmd
}

View File

@ -0,0 +1,96 @@
package builder
import (
"context"
"fmt"
"strings"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
units "github.com/docker/go-units"
"github.com/spf13/cobra"
)
type pruneOptions struct {
force bool
all bool
filter opts.FilterOpt
keepStorage opts.MemBytes
}
// NewPruneCommand returns a new cobra prune command for images
func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
options := pruneOptions{filter: opts.NewFilterOpt()}
cmd := &cobra.Command{
Use: "prune",
Short: "Remove build cache",
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
spaceReclaimed, output, err := runPrune(dockerCli, options)
if err != nil {
return err
}
if output != "" {
fmt.Fprintln(dockerCli.Out(), output)
}
fmt.Fprintln(dockerCli.Out(), "Total reclaimed space:", units.HumanSize(float64(spaceReclaimed)))
return nil
},
Annotations: map[string]string{"version": "1.39"},
}
flags := cmd.Flags()
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
flags.BoolVarP(&options.all, "all", "a", false, "Remove all unused images, not just dangling ones")
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'unused-for=24h')")
flags.Var(&options.keepStorage, "keep-storage", "Amount of disk space to keep for cache")
return cmd
}
const (
normalWarning = `WARNING! This will remove all dangling build cache. Are you sure you want to continue?`
allCacheWarning = `WARNING! This will remove all build cache. Are you sure you want to continue?`
)
func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint64, output string, err error) {
pruneFilters := options.filter.Value()
pruneFilters = command.PruneFilters(dockerCli, pruneFilters)
warning := normalWarning
if options.all {
warning = allCacheWarning
}
if !options.force && !command.PromptForConfirmation(dockerCli.In(), dockerCli.Out(), warning) {
return 0, "", nil
}
report, err := dockerCli.Client().BuildCachePrune(context.Background(), types.BuildCachePruneOptions{
All: options.all,
KeepStorage: options.keepStorage.Value(),
Filters: pruneFilters,
})
if err != nil {
return 0, "", err
}
if len(report.CachesDeleted) > 0 {
var sb strings.Builder
sb.WriteString("Deleted build cache objects:\n")
for _, id := range report.CachesDeleted {
sb.WriteString(id)
sb.WriteByte('\n')
}
output = sb.String()
}
return report.SpaceReclaimed, output, nil
}
// CachePrune executes a prune command for build cache
func CachePrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) {
return runPrune(dockerCli, pruneOptions{force: true, all: all, filter: filter})
}

View File

@ -5,8 +5,8 @@ import (
"strings"
"testing"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestLoadFileV01Success(t *testing.T) {

View File

@ -1,9 +1,10 @@
package checkpoint
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -9,11 +9,15 @@ import (
// NewCheckpointCommand returns the `checkpoint` subcommand (only in experimental)
func NewCheckpointCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "checkpoint",
Short: "Manage checkpoints",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
Annotations: map[string]string{"experimental": "", "version": "1.25"},
Use: "checkpoint",
Short: "Manage checkpoints",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
Annotations: map[string]string{
"experimental": "",
"ostype": "linux",
"version": "1.25",
},
}
cmd.AddCommand(
newCreateCommand(dockerCli),

View File

@ -1,10 +1,9 @@
package checkpoint
import (
"context"
"fmt"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"

View File

@ -7,9 +7,9 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestCheckpointCreateErrors(t *testing.T) {

View File

@ -1,7 +1,7 @@
package checkpoint
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -6,10 +6,10 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/golden"
)
func TestCheckpointListErrors(t *testing.T) {

View File

@ -1,7 +1,7 @@
package checkpoint
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -6,9 +6,9 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestCheckpointRemoveErrors(t *testing.T) {

View File

@ -1,23 +1,27 @@
package command
import (
"context"
"io"
"net"
"net/http"
"os"
"path/filepath"
"runtime"
"strconv"
"time"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/config"
cliconfig "github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/cli/connhelper"
cliflags "github.com/docker/cli/cli/flags"
manifeststore "github.com/docker/cli/cli/manifest/store"
registryclient "github.com/docker/cli/cli/registry/client"
"github.com/docker/cli/cli/trust"
dopts "github.com/docker/cli/opts"
clitypes "github.com/docker/cli/types"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
registrytypes "github.com/docker/docker/api/types/registry"
@ -28,7 +32,6 @@ import (
"github.com/theupdateframework/notary"
notaryclient "github.com/theupdateframework/notary/client"
"github.com/theupdateframework/notary/passphrase"
"golang.org/x/net/context"
)
// Streams is an interface which exposes the standard input and output streams
@ -53,19 +56,21 @@ type Cli interface {
ManifestStore() manifeststore.Store
RegistryClient(bool) registryclient.RegistryClient
ContentTrustEnabled() bool
NewContainerizedEngineClient(sockPath string) (clitypes.ContainerizedClient, error)
}
// DockerCli is an instance the docker command line client.
// Instances of the client can be returned from NewDockerCli.
type DockerCli struct {
configFile *configfile.ConfigFile
in *InStream
out *OutStream
err io.Writer
client client.APIClient
serverInfo ServerInfo
clientInfo ClientInfo
contentTrust bool
configFile *configfile.ConfigFile
in *InStream
out *OutStream
err io.Writer
client client.APIClient
serverInfo ServerInfo
clientInfo ClientInfo
contentTrust bool
newContainerizeClient func(string) (clitypes.ContainerizedClient, error)
}
// DefaultVersion returns api.defaultVersion or DOCKER_API_VERSION if specified.
@ -129,6 +134,20 @@ func (cli *DockerCli) ContentTrustEnabled() bool {
return cli.contentTrust
}
// BuildKitEnabled returns whether buildkit is enabled either through a daemon setting
// or otherwise the client-side DOCKER_BUILDKIT environment variable
func BuildKitEnabled(si ServerInfo) (bool, error) {
buildkitEnabled := si.BuildkitVersion == types.BuilderBuildKit
if buildkitEnv := os.Getenv("DOCKER_BUILDKIT"); buildkitEnv != "" {
var err error
buildkitEnabled, err = strconv.ParseBool(buildkitEnv)
if err != nil {
return false, errors.Wrap(err, "DOCKER_BUILDKIT environment variable expects boolean value")
}
}
return buildkitEnabled, nil
}
// ManifestStore returns a store for local manifests
func (cli *DockerCli) ManifestStore() manifeststore.Store {
// TODO: support override default location from config file
@ -162,15 +181,18 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions) error {
if err != nil {
return err
}
hasExperimental, err := isEnabled(cli.configFile.Experimental)
var experimentalValue string
// Environment variable always overrides configuration
if experimentalValue = os.Getenv("DOCKER_CLI_EXPERIMENTAL"); experimentalValue == "" {
experimentalValue = cli.configFile.Experimental
}
hasExperimental, err := isEnabled(experimentalValue)
if err != nil {
return errors.Wrap(err, "Experimental field")
}
orchestrator := GetOrchestrator(hasExperimental, opts.Common.Orchestrator, cli.configFile.Orchestrator)
cli.clientInfo = ClientInfo{
DefaultVersion: cli.client.ClientVersion(),
HasExperimental: hasExperimental,
Orchestrator: orchestrator,
}
cli.initializeFromClient()
return nil
@ -202,6 +224,7 @@ func (cli *DockerCli) initializeFromClient() {
cli.serverInfo = ServerInfo{
HasExperimental: ping.Experimental,
OSType: ping.OSType,
BuildkitVersion: ping.BuilderVersion,
}
cli.client.NegotiateAPIVersionPing(ping)
}
@ -225,28 +248,28 @@ func (cli *DockerCli) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions
return trust.GetNotaryRepository(cli.In(), cli.Out(), UserAgent(), imgRefAndAuth.RepoInfo(), imgRefAndAuth.AuthConfig(), actions...)
}
// NewContainerizedEngineClient returns a containerized engine client
func (cli *DockerCli) NewContainerizedEngineClient(sockPath string) (clitypes.ContainerizedClient, error) {
return cli.newContainerizeClient(sockPath)
}
// ServerInfo stores details about the supported features and platform of the
// server
type ServerInfo struct {
HasExperimental bool
OSType string
BuildkitVersion types.BuilderVersion
}
// ClientInfo stores details about the supported features of the client
type ClientInfo struct {
HasExperimental bool
DefaultVersion string
Orchestrator Orchestrator
}
// HasKubernetes checks if kubernetes orchestrator is enabled
func (c ClientInfo) HasKubernetes() bool {
return c.HasExperimental && c.Orchestrator == OrchestratorKubernetes
}
// NewDockerCli returns a DockerCli instance with IO output and error streams set by in, out and err.
func NewDockerCli(in io.ReadCloser, out, err io.Writer, isTrusted bool) *DockerCli {
return &DockerCli{in: NewInStream(in), out: NewOutStream(out), err: err, contentTrust: isTrusted}
func NewDockerCli(in io.ReadCloser, out, err io.Writer, isTrusted bool, containerizedFn func(string) (clitypes.ContainerizedClient, error)) *DockerCli {
return &DockerCli{in: NewInStream(in), out: NewOutStream(out), err: err, contentTrust: isTrusted, newContainerizeClient: containerizedFn}
}
// NewAPIClientFromFlags creates a new APIClient from command line flags
@ -255,24 +278,43 @@ func NewAPIClientFromFlags(opts *cliflags.CommonOptions, configFile *configfile.
if err != nil {
return &client.Client{}, err
}
var clientOpts []func(*client.Client) error
helper, err := connhelper.GetConnectionHelper(host)
if err != nil {
return &client.Client{}, err
}
if helper == nil {
clientOpts = append(clientOpts, withHTTPClient(opts.TLSOptions))
clientOpts = append(clientOpts, client.WithHost(host))
} else {
clientOpts = append(clientOpts, func(c *client.Client) error {
httpClient := &http.Client{
// No tls
// No proxy
Transport: &http.Transport{
DialContext: helper.Dialer,
},
}
return client.WithHTTPClient(httpClient)(c)
})
clientOpts = append(clientOpts, client.WithHost(helper.Host))
clientOpts = append(clientOpts, client.WithDialContext(helper.Dialer))
}
customHeaders := configFile.HTTPHeaders
if customHeaders == nil {
customHeaders = map[string]string{}
}
customHeaders["User-Agent"] = UserAgent()
clientOpts = append(clientOpts, client.WithHTTPHeaders(customHeaders))
verStr := api.DefaultVersion
if tmpStr := os.Getenv("DOCKER_API_VERSION"); tmpStr != "" {
verStr = tmpStr
}
clientOpts = append(clientOpts, client.WithVersion(verStr))
return client.NewClientWithOpts(
withHTTPClient(opts.TLSOptions),
client.WithHTTPHeaders(customHeaders),
client.WithVersion(verStr),
client.WithHost(host),
)
return client.NewClientWithOpts(clientOpts...)
}
func getServerHost(hosts []string, tlsOptions *tlsconfig.Options) (string, error) {

View File

@ -1,6 +1,7 @@
package command
import (
"context"
"crypto/x509"
"os"
"runtime"
@ -12,11 +13,11 @@ import (
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/pkg/errors"
"golang.org/x/net/context"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/env"
"gotest.tools/fs"
)
func TestNewAPIClientFromFlags(t *testing.T) {
@ -42,9 +43,29 @@ func TestNewAPIClientFromFlags(t *testing.T) {
assert.Check(t, is.Equal(api.DefaultVersion, apiclient.ClientVersion()))
}
func TestNewAPIClientFromFlagsForDefaultSchema(t *testing.T) {
host := ":2375"
opts := &flags.CommonOptions{Hosts: []string{host}}
configFile := &configfile.ConfigFile{
HTTPHeaders: map[string]string{
"My-Header": "Custom-Value",
},
}
apiclient, err := NewAPIClientFromFlags(opts, configFile)
assert.NilError(t, err)
assert.Check(t, is.Equal("tcp://localhost"+host, apiclient.DaemonHost()))
expectedHeaders := map[string]string{
"My-Header": "Custom-Value",
"User-Agent": UserAgent(),
}
assert.Check(t, is.DeepEqual(expectedHeaders, apiclient.(*client.Client).CustomHTTPHeaders()))
assert.Check(t, is.Equal(api.DefaultVersion, apiclient.ClientVersion()))
}
func TestNewAPIClientFromFlagsWithAPIVersionFromEnv(t *testing.T) {
customVersion := "v3.3.3"
defer patchEnvVariable(t, "DOCKER_API_VERSION", customVersion)()
defer env.Patch(t, "DOCKER_API_VERSION", customVersion)()
opts := &flags.CommonOptions{}
configFile := &configfile.ConfigFile{}
@ -53,19 +74,6 @@ func TestNewAPIClientFromFlagsWithAPIVersionFromEnv(t *testing.T) {
assert.Check(t, is.Equal(customVersion, apiclient.ClientVersion()))
}
// TODO: use gotestyourself/env.Patch
func patchEnvVariable(t *testing.T, key, value string) func() {
oldValue, ok := os.LookupEnv(key)
assert.NilError(t, os.Setenv(key, value))
return func() {
if !ok {
assert.NilError(t, os.Unsetenv(key))
return
}
assert.NilError(t, os.Setenv(key, oldValue))
}
}
type fakeClient struct {
client.Client
pingFunc func() (types.Ping, error)
@ -173,110 +181,6 @@ func TestExperimentalCLI(t *testing.T) {
}
}
func TestOrchestratorSwitch(t *testing.T) {
defaultVersion := "v0.00"
var testcases = []struct {
doc string
configfile string
envOrchestrator string
flagOrchestrator string
expectedOrchestrator string
expectedKubernetes bool
}{
{
doc: "default",
configfile: `{
"experimental": "enabled"
}`,
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
{
doc: "kubernetesIsExperimental",
configfile: `{
"experimental": "disabled",
"orchestrator": "kubernetes"
}`,
envOrchestrator: "kubernetes",
flagOrchestrator: "kubernetes",
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
{
doc: "kubernetesConfigFile",
configfile: `{
"experimental": "enabled",
"orchestrator": "kubernetes"
}`,
expectedOrchestrator: "kubernetes",
expectedKubernetes: true,
},
{
doc: "kubernetesEnv",
configfile: `{
"experimental": "enabled"
}`,
envOrchestrator: "kubernetes",
expectedOrchestrator: "kubernetes",
expectedKubernetes: true,
},
{
doc: "kubernetesFlag",
configfile: `{
"experimental": "enabled"
}`,
flagOrchestrator: "kubernetes",
expectedOrchestrator: "kubernetes",
expectedKubernetes: true,
},
{
doc: "envOverridesConfigFile",
configfile: `{
"experimental": "enabled",
"orchestrator": "kubernetes"
}`,
envOrchestrator: "swarm",
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
{
doc: "flagOverridesEnv",
configfile: `{
"experimental": "enabled"
}`,
envOrchestrator: "kubernetes",
flagOrchestrator: "swarm",
expectedOrchestrator: "swarm",
expectedKubernetes: false,
},
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
dir := fs.NewDir(t, testcase.doc, fs.WithFile("config.json", testcase.configfile))
defer dir.Remove()
apiclient := &fakeClient{
version: defaultVersion,
}
if testcase.envOrchestrator != "" {
defer patchEnvVariable(t, "DOCKER_ORCHESTRATOR", testcase.envOrchestrator)()
}
cli := &DockerCli{client: apiclient, err: os.Stderr}
cliconfig.SetDir(dir.Path())
options := flags.NewClientOptions()
if testcase.flagOrchestrator != "" {
options.Common.Orchestrator = testcase.flagOrchestrator
}
err := cli.Initialize(options)
assert.NilError(t, err)
assert.Check(t, is.Equal(testcase.expectedKubernetes, cli.ClientInfo().HasKubernetes()))
assert.Check(t, is.Equal(testcase.expectedOrchestrator, string(cli.ClientInfo().Orchestrator)))
})
}
}
func TestGetClientWithPassword(t *testing.T) {
expected := "password"

View File

@ -2,11 +2,14 @@ package commands
import (
"os"
"runtime"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/builder"
"github.com/docker/cli/cli/command/checkpoint"
"github.com/docker/cli/cli/command/config"
"github.com/docker/cli/cli/command/container"
"github.com/docker/cli/cli/command/engine"
"github.com/docker/cli/cli/command/image"
"github.com/docker/cli/cli/command/manifest"
"github.com/docker/cli/cli/command/network"
@ -24,7 +27,7 @@ import (
)
// AddCommands adds all the commands from cli/command to the root command
func AddCommands(cmd *cobra.Command, dockerCli *command.DockerCli) {
func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
cmd.AddCommand(
// checkpoint
checkpoint.NewCheckpointCommand(dockerCli),
@ -40,6 +43,9 @@ func AddCommands(cmd *cobra.Command, dockerCli *command.DockerCli) {
image.NewImageCommand(dockerCli),
image.NewBuildCommand(dockerCli),
// builder
builder.NewBuilderCommand(dockerCli),
// manifest
manifest.NewManifestCommand(dockerCli),
@ -116,7 +122,10 @@ func AddCommands(cmd *cobra.Command, dockerCli *command.DockerCli) {
hide(image.NewSaveCommand(dockerCli)),
hide(image.NewTagCommand(dockerCli)),
)
if runtime.GOOS == "linux" {
// engine
cmd.AddCommand(engine.NewEngineCommand(dockerCli))
}
}
func hide(cmd *cobra.Command) *cobra.Command {

View File

@ -1,10 +1,11 @@
package config
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"fmt"
"io"
"io/ioutil"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/pkg/system"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type createOptions struct {
@ -40,7 +40,7 @@ func newConfigCreateCommand(dockerCli command.Cli) *cobra.Command {
flags := cmd.Flags()
flags.VarP(&createOpts.labels, "label", "l", "Config labels")
flags.StringVar(&createOpts.templateDriver, "template-driver", "", "Template driver")
flags.SetAnnotation("driver", "version", []string{"1.37"})
flags.SetAnnotation("template-driver", "version", []string{"1.37"})
return cmd
}

View File

@ -10,10 +10,10 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/golden"
)
const configDataFile = "config-create-with-name.golden"

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type inspectOptions struct {

View File

@ -11,8 +11,8 @@ import (
"github.com/pkg/errors"
// Import builders to get the builder function as package function
. "github.com/docker/cli/internal/test/builders"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/golden"
"gotest.tools/assert"
"gotest.tools/golden"
)
func TestConfigInspectErrors(t *testing.T) {

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"sort"
"github.com/docker/cli/cli"
@ -8,20 +9,10 @@ import (
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/spf13/cobra"
"golang.org/x/net/context"
"vbom.ml/util/sortorder"
)
type byConfigName []swarm.Config
func (r byConfigName) Len() int { return len(r) }
func (r byConfigName) Swap(i, j int) { r[i], r[j] = r[j], r[i] }
func (r byConfigName) Less(i, j int) bool {
return sortorder.NaturalLess(r[i].Spec.Name, r[j].Spec.Name)
}
type listOptions struct {
quiet bool
format string
@ -67,7 +58,9 @@ func runConfigList(dockerCli command.Cli, options listOptions) error {
}
}
sort.Sort(byConfigName(configs))
sort.Slice(configs, func(i, j int) bool {
return sortorder.NaturalLess(configs[i].Spec.Name, configs[j].Spec.Name)
})
configCtx := formatter.Context{
Output: dockerCli.Out(),

View File

@ -12,9 +12,9 @@ import (
"github.com/pkg/errors"
// Import builders to get the builder function as package function
. "github.com/docker/cli/internal/test/builders"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/golden"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/golden"
)
func TestConfigListErrors(t *testing.T) {

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type removeOptions struct {

View File

@ -6,9 +6,9 @@ import (
"testing"
"github.com/docker/cli/internal/test"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestConfigRemoveErrors(t *testing.T) {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"net/http/httputil"
@ -14,7 +15,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type attachOptions struct {

View File

@ -9,8 +9,8 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/pkg/errors"
"gotest.tools/assert"
)
func TestNewAttachCommandErrors(t *testing.T) {
@ -100,7 +100,7 @@ func TestGetExitStatus(t *testing.T) {
},
{
result: &container.ContainerWaitOKBody{
Error: &container.ContainerWaitOKBodyError{expectedErr.Error()},
Error: &container.ContainerWaitOKBodyError{Message: expectedErr.Error()},
},
expectedError: expectedErr,
},

View File

@ -1,30 +1,35 @@
package container
import (
"context"
"io"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {
client.Client
inspectFunc func(string) (types.ContainerJSON, error)
execInspectFunc func(execID string) (types.ContainerExecInspect, error)
execCreateFunc func(container string, config types.ExecConfig) (types.IDResponse, error)
createContainerFunc func(config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
containerStartFunc func(container string, options types.ContainerStartOptions) error
imageCreateFunc func(parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
infoFunc func() (types.Info, error)
containerStatPathFunc func(container, path string) (types.ContainerPathStat, error)
containerCopyFromFunc func(container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
logFunc func(string, types.ContainerLogsOptions) (io.ReadCloser, error)
waitFunc func(string) (<-chan container.ContainerWaitOKBody, <-chan error)
containerListFunc func(types.ContainerListOptions) ([]types.Container, error)
Version string
inspectFunc func(string) (types.ContainerJSON, error)
execInspectFunc func(execID string) (types.ContainerExecInspect, error)
execCreateFunc func(container string, config types.ExecConfig) (types.IDResponse, error)
createContainerFunc func(config *container.Config,
hostConfig *container.HostConfig,
networkingConfig *network.NetworkingConfig,
containerName string) (container.ContainerCreateCreatedBody, error)
containerStartFunc func(container string, options types.ContainerStartOptions) error
imageCreateFunc func(parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
infoFunc func() (types.Info, error)
containerStatPathFunc func(container, path string) (types.ContainerPathStat, error)
containerCopyFromFunc func(container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
logFunc func(string, types.ContainerLogsOptions) (io.ReadCloser, error)
waitFunc func(string) (<-chan container.ContainerWaitOKBody, <-chan error)
containerListFunc func(types.ContainerListOptions) ([]types.Container, error)
containerExportFunc func(string) (io.ReadCloser, error)
containerExecResizeFunc func(id string, options types.ResizeOptions) error
Version string
}
func (f *fakeClient) ContainerList(_ context.Context, options types.ContainerListOptions) ([]types.Container, error) {
@ -124,3 +129,17 @@ func (f *fakeClient) ContainerStart(_ context.Context, container string, options
}
return nil
}
func (f *fakeClient) ContainerExport(_ context.Context, container string) (io.ReadCloser, error) {
if f.containerExportFunc != nil {
return f.containerExportFunc(container)
}
return nil, nil
}
func (f *fakeClient) ContainerExecResize(_ context.Context, id string, options types.ResizeOptions) error {
if f.containerExecResizeFunc != nil {
return f.containerExecResizeFunc(id, options)
}
return nil
}

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type commitOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io"
"os"
"path/filepath"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/pkg/system"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type copyOptions struct {

View File

@ -11,10 +11,10 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/archive"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/gotestyourself/gotestyourself/skip"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/fs"
"gotest.tools/skip"
)
func TestRunCopyWithInvalidArguments(t *testing.T) {
@ -182,7 +182,7 @@ func TestSplitCpArg(t *testing.T) {
}
for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
skip.IfCondition(t, testcase.os != "" && testcase.os != runtime.GOOS)
skip.If(t, testcase.os != "" && testcase.os != runtime.GOOS)
container, path := splitCpArg(testcase.path)
assert.Check(t, is.Equal(testcase.expectedContainer, container))

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"os"
@ -17,7 +18,6 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
)
type createOptions struct {

View File

@ -16,10 +16,10 @@ import (
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/google/go-cmp/cmp"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/fs"
)
func TestCIDFileNoOPWithNoFilename(t *testing.T) {

View File

@ -1,12 +1,13 @@
package container
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type diffOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
@ -13,7 +14,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type execOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io/ioutil"
"testing"
@ -9,10 +10,9 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"golang.org/x/net/context"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func withDefaultOpts(options execOptions) execOptions {

View File

@ -1,13 +1,13 @@
package container
import (
"context"
"io"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type exportOptions struct {

View File

@ -0,0 +1,33 @@
package container
import (
"io"
"io/ioutil"
"strings"
"testing"
"github.com/docker/cli/internal/test"
"gotest.tools/assert"
"gotest.tools/fs"
)
func TestContainerExportOutputToFile(t *testing.T) {
dir := fs.NewDir(t, "export-test")
defer dir.Remove()
cli := test.NewFakeCli(&fakeClient{
containerExportFunc: func(container string) (io.ReadCloser, error) {
return ioutil.NopCloser(strings.NewReader("bar")), nil
},
})
cmd := NewExportCommand(cli)
cmd.SetOutput(ioutil.Discard)
cmd.SetArgs([]string{"-o", dir.Join("foo"), "container"})
assert.NilError(t, cmd.Execute())
expected := fs.Expected(t,
fs.WithFile("foo", "bar", fs.MatchAnyFileMode),
)
assert.Assert(t, fs.Equal(dir.Path(), expected))
}

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"runtime"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/pkg/term"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
// The default escape key sequence: ctrl-p, ctrl-q

View File

@ -1,11 +1,12 @@
package container
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/inspect"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type inspectOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type killOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io/ioutil"
"github.com/docker/cli/cli"
@ -10,7 +11,6 @@ import (
"github.com/docker/cli/templates"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type psOptions struct {

View File

@ -10,8 +10,8 @@ import (
"github.com/docker/docker/api/types"
// Import builders to get the builder function as package function
. "github.com/docker/cli/internal/test/builders"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/golden"
"gotest.tools/assert"
"gotest.tools/golden"
)
func TestContainerListErrors(t *testing.T) {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stdcopy"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type logsOptions struct {

View File

@ -9,8 +9,8 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
var logFn = func(expectedOut string) func(string, types.ContainerLogsOptions) (io.ReadCloser, error) {

View File

@ -370,9 +370,24 @@ func parse(flags *pflag.FlagSet, copts *containerOptions) (*containerConfig, err
entrypoint = []string{""}
}
ports, portBindings, err := nat.ParsePortSpecs(copts.publish.GetAll())
publishOpts := copts.publish.GetAll()
var ports map[nat.Port]struct{}
var portBindings map[nat.Port][]nat.PortBinding
ports, portBindings, err = nat.ParsePortSpecs(publishOpts)
// If simple port parsing fails try to parse as long format
if err != nil {
return nil, err
publishOpts, err = parsePortOpts(publishOpts)
if err != nil {
return nil, err
}
ports, portBindings, err = nat.ParsePortSpecs(publishOpts)
if err != nil {
return nil, err
}
}
// Merge in exposed ports to the map of published ports
@ -661,6 +676,23 @@ func parse(flags *pflag.FlagSet, copts *containerOptions) (*containerConfig, err
}, nil
}
func parsePortOpts(publishOpts []string) ([]string, error) {
optsList := []string{}
for _, publish := range publishOpts {
params := map[string]string{"protocol": "tcp"}
for _, param := range strings.Split(publish, ",") {
opt := strings.Split(param, "=")
if len(opt) < 2 {
return optsList, errors.Errorf("invalid publish opts format (should be name=value but got '%s')", param)
}
params[opt[0]] = opt[1]
}
optsList = append(optsList, fmt.Sprintf("%s:%s/%s", params["target"], params["published"], params["protocol"]))
}
return optsList, nil
}
func parseLoggingOpts(loggingDriver string, loggingOpts []string) (map[string]string, error) {
loggingOptsMap := opts.ConvertKVStringsToMap(loggingOpts)
if loggingDriver == "none" && len(loggingOpts) > 0 {

View File

@ -12,10 +12,10 @@ import (
"github.com/docker/docker/api/types/container"
networktypes "github.com/docker/docker/api/types/network"
"github.com/docker/go-connections/nat"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"github.com/spf13/pflag"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestValidateAttach(t *testing.T) {
@ -42,7 +42,6 @@ func TestValidateAttach(t *testing.T) {
}
}
// nolint: unparam
func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, error) {
flags, copts := setupRunFlags()
if err := flags.Parse(args); err != nil {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type pauseOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -9,7 +10,6 @@ import (
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type portOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/opts"
units "github.com/docker/go-units"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type pruneOptions struct {
@ -73,6 +73,6 @@ func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint6
// RunPrune calls the Container Prune API
// This returns the amount of space reclaimed and a detailed output string
func RunPrune(dockerCli command.Cli, filter opts.FilterOpt) (uint64, string, error) {
func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) {
return runPrune(dockerCli, pruneOptions{force: true, filter: filter})
}

View File

@ -4,8 +4,8 @@ import (
"testing"
"github.com/docker/cli/opts"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestBuildContainerListOptions(t *testing.T) {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type renameOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
"time"
@ -9,7 +10,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type restartOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -9,7 +10,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type rmOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"net/http/httputil"
@ -21,7 +22,6 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
)
type runOptions struct {
@ -124,9 +124,6 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
stdout, stderr := dockerCli.Out(), dockerCli.Err()
client := dockerCli.Client()
// TODO: pass this as an argument
cmdPath := "run"
warnOnOomKillDisable(*hostConfig, stderr)
warnOnLocalhostDNS(*hostConfig, stderr)
@ -160,10 +157,11 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
}
ctx, cancelFun := context.WithCancel(context.Background())
defer cancelFun()
createResponse, err := createContainer(ctx, dockerCli, containerConfig, &opts.createOptions)
if err != nil {
reportError(stderr, cmdPath, err.Error(), true)
reportError(stderr, "run", err.Error(), true)
return runStartContainerErr(err)
}
if opts.sigProxy {
@ -209,7 +207,7 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
<-errCh
}
reportError(stderr, cmdPath, err.Error(), false)
reportError(stderr, "run", err.Error(), false)
if copts.autoRemove {
// wait container to be removed
<-statusChan

View File

@ -2,14 +2,15 @@ package container
import (
"fmt"
"io/ioutil"
"testing"
"github.com/docker/cli/internal/test"
"github.com/docker/cli/internal/test/notary"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestRunLabel(t *testing.T) {
@ -66,6 +67,7 @@ func TestRunCommandWithContentTrustErrors(t *testing.T) {
cli.SetNotaryClient(tc.notaryFunc)
cmd := NewRunCommand(cli)
cmd.SetArgs(tc.args)
cmd.SetOutput(ioutil.Discard)
err := cmd.Execute()
assert.Assert(t, err != nil)
assert.Assert(t, is.Contains(cli.ErrBuffer().String(), tc.expectedError))

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"net/http/httputil"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type startOptions struct {
@ -47,14 +47,17 @@ func NewStartCommand(dockerCli command.Cli) *cobra.Command {
flags.StringVar(&opts.checkpoint, "checkpoint", "", "Restore from this checkpoint")
flags.SetAnnotation("checkpoint", "experimental", nil)
flags.SetAnnotation("checkpoint", "ostype", []string{"linux"})
flags.StringVar(&opts.checkpointDir, "checkpoint-dir", "", "Use a custom checkpoint storage directory")
flags.SetAnnotation("checkpoint-dir", "experimental", nil)
flags.SetAnnotation("checkpoint-dir", "ostype", []string{"linux"})
return cmd
}
// nolint: gocyclo
func runStart(dockerCli command.Cli, opts *startOptions) error {
ctx, cancelFun := context.WithCancel(context.Background())
defer cancelFun()
if opts.attach || opts.openStdin {
// We're going to attach to a container.

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"strings"
@ -15,7 +16,6 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type statsOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"encoding/json"
"io"
"strings"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/client"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
type stats struct {

View File

@ -5,7 +5,7 @@ import (
"testing"
"github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
"gotest.tools/assert"
)
func TestCalculateMemUsageUnixNoCache(t *testing.T) {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
"time"
@ -9,7 +10,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type stopOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
"text/tabwriter"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type topOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"os"
gosignal "os/signal"
@ -12,13 +13,12 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/signal"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
// resizeTtyTo resizes tty to specific height and width
func resizeTtyTo(ctx context.Context, client client.ContainerAPIClient, id string, height, width uint, isExec bool) {
func resizeTtyTo(ctx context.Context, client client.ContainerAPIClient, id string, height, width uint, isExec bool) error {
if height == 0 && width == 0 {
return
return nil
}
options := types.ResizeOptions{
@ -34,19 +34,42 @@ func resizeTtyTo(ctx context.Context, client client.ContainerAPIClient, id strin
}
if err != nil {
logrus.Debugf("Error resize: %s", err)
logrus.Debugf("Error resize: %s\r", err)
}
return err
}
// resizeTty is to resize the tty with cli out's tty size
func resizeTty(ctx context.Context, cli command.Cli, id string, isExec bool) error {
height, width := cli.Out().GetTtySize()
return resizeTtyTo(ctx, cli.Client(), id, height, width, isExec)
}
// initTtySize is to init the tty's size to the same as the window, if there is an error, it will retry 5 times.
func initTtySize(ctx context.Context, cli command.Cli, id string, isExec bool, resizeTtyFunc func(ctx context.Context, cli command.Cli, id string, isExec bool) error) {
rttyFunc := resizeTtyFunc
if rttyFunc == nil {
rttyFunc = resizeTty
}
if err := rttyFunc(ctx, cli, id, isExec); err != nil {
go func() {
var err error
for retry := 0; retry < 5; retry++ {
time.Sleep(10 * time.Millisecond)
if err = rttyFunc(ctx, cli, id, isExec); err == nil {
break
}
}
if err != nil {
fmt.Fprintln(cli.Err(), "failed to resize tty, using default size")
}
}()
}
}
// MonitorTtySize updates the container tty size when the terminal tty changes size
func MonitorTtySize(ctx context.Context, cli command.Cli, id string, isExec bool) error {
resizeTty := func() {
height, width := cli.Out().GetTtySize()
resizeTtyTo(ctx, cli.Client(), id, height, width, isExec)
}
resizeTty()
initTtySize(ctx, cli, id, isExec, resizeTty)
if runtime.GOOS == "windows" {
go func() {
prevH, prevW := cli.Out().GetTtySize()
@ -55,7 +78,7 @@ func MonitorTtySize(ctx context.Context, cli command.Cli, id string, isExec bool
h, w := cli.Out().GetTtySize()
if prevW != w || prevH != h {
resizeTty()
resizeTty(ctx, cli, id, isExec)
}
prevH = h
prevW = w
@ -66,7 +89,7 @@ func MonitorTtySize(ctx context.Context, cli command.Cli, id string, isExec bool
gosignal.Notify(sigchan, signal.SIGWINCH)
go func() {
for range sigchan {
resizeTty()
resizeTty(ctx, cli, id, isExec)
}
}()
}

View File

@ -0,0 +1,30 @@
package container
import (
"context"
"testing"
"time"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestInitTtySizeErrors(t *testing.T) {
expectedError := "failed to resize tty, using default size\n"
fakeContainerExecResizeFunc := func(id string, options types.ResizeOptions) error {
return errors.Errorf("Error response from daemon: no such exec")
}
fakeResizeTtyFunc := func(ctx context.Context, cli command.Cli, id string, isExec bool) error {
height, width := uint(1024), uint(768)
return resizeTtyTo(ctx, cli.Client(), id, height, width, isExec)
}
ctx := context.Background()
cli := test.NewFakeCli(&fakeClient{containerExecResizeFunc: fakeContainerExecResizeFunc})
initTtySize(ctx, cli, "8mm8nn8tt8bb", true, fakeResizeTtyFunc)
time.Sleep(100 * time.Millisecond)
assert.Check(t, is.Equal(expectedError, cli.ErrBuffer().String()))
}

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type unpauseOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -10,7 +11,6 @@ import (
containertypes "github.com/docker/docker/api/types/container"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type updateOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"strconv"
"github.com/docker/cli/cli/command"
@ -10,7 +11,6 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/versions"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
func waitExitOrRemoved(ctx context.Context, dockerCli command.Cli, containerID string, waitRemove bool) <-chan int {

View File

@ -1,16 +1,16 @@
package container
import (
"context"
"strings"
"testing"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types/container"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"golang.org/x/net/context"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func waitFn(cid string) (<-chan container.ContainerWaitOKBody, <-chan error) {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type waitOptions struct {

View File

@ -0,0 +1,209 @@
package engine
import (
"context"
"fmt"
"strings"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/cli/internal/licenseutils"
clitypes "github.com/docker/cli/types"
"github.com/docker/docker/api/types"
"github.com/docker/licensing/model"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
type activateOptions struct {
licenseFile string
version string
registryPrefix string
format string
image string
quiet bool
displayOnly bool
sockPath string
licenseLoginFunc func(ctx context.Context, authConfig *types.AuthConfig) (licenseutils.HubUser, error)
}
// newActivateCommand creates a new `docker engine activate` command
func newActivateCommand(dockerCli command.Cli) *cobra.Command {
var options activateOptions
options.licenseLoginFunc = licenseutils.Login
cmd := &cobra.Command{
Use: "activate [OPTIONS]",
Short: "Activate Enterprise Edition",
Long: `Activate Enterprise Edition.
With this command you may apply an existing Docker enterprise license, or
interactively download one from Docker. In the interactive exchange, you can
sign up for a new trial, or download an existing license. If you are
currently running a Community Edition engine, the daemon will be updated to
the Enterprise Edition Docker engine with additional capabilities and long
term support.
For more information about different Docker Enterprise license types visit
https://www.docker.com/licenses
For non-interactive scriptable deployments, download your license from
https://hub.docker.com/ then specify the file with the '--license' flag.
`,
RunE: func(cmd *cobra.Command, args []string) error {
return runActivate(dockerCli, options)
},
}
flags := cmd.Flags()
flags.StringVar(&options.licenseFile, "license", "", "License File")
flags.StringVar(&options.version, "version", "", "Specify engine version (default is to use currently running version)")
flags.StringVar(&options.registryPrefix, "registry-prefix", clitypes.RegistryPrefix, "Override the default location where engine images are pulled")
flags.StringVar(&options.image, "engine-image", "", "Specify engine image")
flags.StringVar(&options.format, "format", "", "Pretty-print licenses using a Go template")
flags.BoolVar(&options.displayOnly, "display-only", false, "only display license information and exit")
flags.BoolVar(&options.quiet, "quiet", false, "Only display available licenses by ID")
flags.StringVar(&options.sockPath, "containerd", "", "override default location of containerd endpoint")
return cmd
}
func runActivate(cli command.Cli, options activateOptions) error {
if !isRoot() {
return errors.New("this command must be run as a privileged user")
}
ctx := context.Background()
client, err := cli.NewContainerizedEngineClient(options.sockPath)
if err != nil {
return errors.Wrap(err, "unable to access local containerd")
}
defer client.Close()
authConfig, err := getRegistryAuth(cli, options.registryPrefix)
if err != nil {
return err
}
var license *model.IssuedLicense
// Lookup on hub if no license provided via params
if options.licenseFile == "" {
if license, err = getLicenses(ctx, authConfig, cli, options); err != nil {
return err
}
if options.displayOnly {
return nil
}
} else {
if license, err = licenseutils.LoadLocalIssuedLicense(ctx, options.licenseFile); err != nil {
return err
}
}
summary, err := licenseutils.GetLicenseSummary(ctx, *license)
if err != nil {
return err
}
fmt.Fprintf(cli.Out(), "License: %s\n", summary)
if options.displayOnly {
return nil
}
dclient := cli.Client()
if err = licenseutils.ApplyLicense(ctx, dclient, license); err != nil {
return err
}
// Short circuit if the user didn't specify a version and we're already running enterprise
if options.version == "" {
serverVersion, err := dclient.ServerVersion(ctx)
if err != nil {
return err
}
if strings.Contains(strings.ToLower(serverVersion.Platform.Name), "enterprise") {
fmt.Fprintln(cli.Out(), "Successfully activated engine license on existing enterprise engine.")
return nil
}
options.version = serverVersion.Version
}
opts := clitypes.EngineInitOptions{
RegistryPrefix: options.registryPrefix,
EngineImage: options.image,
EngineVersion: options.version,
}
if err := client.ActivateEngine(ctx, opts, cli.Out(), authConfig); err != nil {
return err
}
fmt.Fprintln(cli.Out(), `Successfully activated engine.
Restart docker with 'systemctl restart docker' to complete the activation.`)
return nil
}
func getLicenses(ctx context.Context, authConfig *types.AuthConfig, cli command.Cli, options activateOptions) (*model.IssuedLicense, error) {
user, err := options.licenseLoginFunc(ctx, authConfig)
if err != nil {
return nil, err
}
fmt.Fprintf(cli.Out(), "Looking for existing licenses for %s...\n", user.User.Username)
subs, err := user.GetAvailableLicenses(ctx)
if err != nil {
return nil, err
}
if len(subs) == 0 {
return doTrialFlow(ctx, cli, user)
}
format := options.format
if len(format) == 0 {
format = formatter.TableFormatKey
}
updatesCtx := formatter.Context{
Output: cli.Out(),
Format: formatter.NewSubscriptionsFormat(format, options.quiet),
Trunc: false,
}
if err := formatter.SubscriptionsWrite(updatesCtx, subs); err != nil {
return nil, err
}
if options.displayOnly {
return nil, nil
}
fmt.Fprintf(cli.Out(), "Please pick a license by number: ")
var num int
if _, err := fmt.Fscan(cli.In(), &num); err != nil {
return nil, errors.Wrap(err, "failed to read user input")
}
if num < 0 || num >= len(subs) {
return nil, fmt.Errorf("invalid choice")
}
return user.GetIssuedLicense(ctx, subs[num].ID)
}
func doTrialFlow(ctx context.Context, cli command.Cli, user licenseutils.HubUser) (*model.IssuedLicense, error) {
if !command.PromptForConfirmation(cli.In(), cli.Out(),
"No existing licenses found, would you like to set up a new Enterprise Basic Trial license?") {
return nil, fmt.Errorf("you must have an existing enterprise license or generate a new trial to use the Enterprise Docker Engine")
}
targetID := user.User.ID
// If the user is a member of any organizations, allow trials generated against them
if len(user.Orgs) > 0 {
fmt.Fprintf(cli.Out(), "%d\t%s\n", 0, user.User.Username)
for i, org := range user.Orgs {
fmt.Fprintf(cli.Out(), "%d\t%s\n", i+1, org.Orgname)
}
fmt.Fprintf(cli.Out(), "Please choose an account to generate the trial in:")
var num int
if _, err := fmt.Fscan(cli.In(), &num); err != nil {
return nil, errors.Wrap(err, "failed to read user input")
}
if num < 0 || num > len(user.Orgs) {
return nil, fmt.Errorf("invalid choice")
}
if num > 0 {
targetID = user.Orgs[num-1].ID
}
}
return user.GenerateTrialLicense(ctx, targetID)
}

View File

@ -0,0 +1,146 @@
package engine
import (
"context"
"fmt"
"testing"
"time"
"github.com/docker/cli/internal/licenseutils"
"github.com/docker/cli/internal/test"
clitypes "github.com/docker/cli/types"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/licensing"
"github.com/docker/licensing/model"
"gotest.tools/assert"
"gotest.tools/fs"
"gotest.tools/golden"
)
const (
// nolint: lll
expiredLicense = `{"key_id":"irlYm3b9fdD8hMUXjazF39im7VQSSbAm9tfHK8cKUxJt","private_key":"aH5tTRDAVJpCRS2CRetTQVXIKgWUPfoCHODhDvNPvAbz","authorization":"ewogICAicGF5bG9hZCI6ICJleUpsZUhCcGNtRjBhVzl1SWpvaU1qQXhPQzB3TXkweE9GUXdOem93TURvd01Gb2lMQ0owYjJ0bGJpSTZJbkZtTVMxMlVtRmtialp5YjFaMldXdHJlVXN4VFdKMGNGUmpXR1ozVjA4MVRWZFFTM2cwUnpJd2NIYzlJaXdpYldGNFJXNW5hVzVsY3lJNk1Td2ljMk5oYm01cGJtZEZibUZpYkdWa0lqcDBjblZsTENKc2FXTmxibk5sVkhsd1pTSTZJazltWm14cGJtVWlMQ0owYVdWeUlqb2lVSEp2WkhWamRHbHZiaUo5IiwKICAgInNpZ25hdHVyZXMiOiBbCiAgICAgIHsKICAgICAgICAgImhlYWRlciI6IHsKICAgICAgICAgICAgImp3ayI6IHsKICAgICAgICAgICAgICAgImUiOiAiQVFBQiIsCiAgICAgICAgICAgICAgICJrZXlJRCI6ICJKN0xEOjY3VlI6TDVIWjpVN0JBOjJPNEc6NEFMMzpPRjJOOkpIR0I6RUZUSDo1Q1ZROk1GRU86QUVJVCIsCiAgICAgICAgICAgICAgICJraWQiOiAiSjdMRDo2N1ZSOkw1SFo6VTdCQToyTzRHOjRBTDM6T0YyTjpKSEdCOkVGVEg6NUNWUTpNRkVPOkFFSVQiLAogICAgICAgICAgICAgICAia3R5IjogIlJTQSIsCiAgICAgICAgICAgICAgICJuIjogInlkSXktbFU3bzdQY2VZLTQtcy1DUTVPRWdDeUY4Q3hJY1FJV3VLODRwSWlaY2lZNjczMHlDWW53TFNLVGx3LVU2VUNfUVJlV1Jpb01OTkU1RHM1VFlFWGJHRzZvbG0ycWRXYkJ3Y0NnLTJVVUhfT2NCOVd1UDZnUlBIcE1GTXN4RHpXd3ZheThKVXVIZ1lVTFVwbTFJdi1tcTdscDVuUV9SeHJUMEtaUkFRVFlMRU1FZkd3bTNoTU9fZ2VMUFMtaGdLUHRJSGxrZzZfV2NveFRHb0tQNzlkX3dhSFl4R05sN1doU25laUJTeGJwYlFBS2syMWxnNzk4WGI3dlp5RUFURE1yUlI5TWVFNkFkajVISnBZM0NveVJBUENtYUtHUkNLNHVvWlNvSXUwaEZWbEtVUHliYncwMDBHTy13YTJLTjhVd2dJSW0waTVJMXVXOUdrcTR6akJ5NXpoZ3F1VVhiRzliV1BBT1lycTVRYTgxRHhHY0JsSnlIWUFwLUREUEU5VEdnNHpZbVhqSm54WnFIRWR1R3FkZXZaOFhNSTB1a2ZrR0lJMTR3VU9pTUlJSXJYbEVjQmZfNDZJOGdRV0R6eHljWmVfSkdYLUxBdWF5WHJ5clVGZWhWTlVkWlVsOXdYTmFKQi1rYUNxejVRd2FSOTNzR3ctUVNmdEQwTnZMZTdDeU9ILUU2dmc2U3RfTmVUdmd2OFluaENpWElsWjhIT2ZJd05lN3RFRl9VY3o1T2JQeWttM3R5bHJOVWp0MFZ5QW10dGFjVkkyaUdpaGNVUHJtazRsVklaN1ZEX0xTVy1pN3lvU3VydHBzUFhjZTJwS0RJbzMwbEpHaE9fM0tVbWwyU1VaQ3F6SjF5RW1LcHlzSDVIRFc5Y3NJRkNBM2RlQWpmWlV2TjdVIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiYWxnIjogIlJTMjU2IgogICAgICAgICB9LAogICAgICAgICAic2lnbmF0dXJlIjogIm5saTZIdzRrbW5KcTBSUmRXaGVfbkhZS2VJLVpKenM1U0d5SUpDakh1dWtnVzhBYklpVzFZYWJJR2NqWUt0QTY4dWN6T1hyUXZreGxWQXJLSlgzMDJzN0RpbzcxTlNPRzJVcnhsSjlibDFpd0F3a3ZyTEQ2T0p5MGxGLVg4WnRabXhPVmNQZmwzcmJwZFQ0dnlnWTdNcU1QRXdmb0IxTmlWZDYyZ1cxU2NSREZZcWw3R0FVaFVKNkp4QU15VzVaOXl5YVE0NV8wd0RMUk5mRjA5YWNXeVowTjRxVS1hZjhrUTZUUWZUX05ERzNCR3pRb2V3cHlEajRiMFBHb0diOFhLdDlwekpFdEdxM3lQM25VMFFBbk90a2gwTnZac1l1UFcyUnhDT3lRNEYzVlR3UkF2eF9HSTZrMVRpYmlKNnByUWluUy16Sjh6RE8zUjBuakE3OFBwNXcxcVpaUE9BdmtzZFNSYzJDcVMtcWhpTmF5YUhOVHpVNnpyOXlOZHR2S0o1QjNST0FmNUtjYXNiWURjTnVpeXBUNk90LUtqQ2I1dmYtWVpnc2FRNzJBdFBhSU4yeUpNREZHbmEwM0hpSjMxcTJRUlp5eTZrd3RYaGtwcDhTdEdIcHYxSWRaV09SVWttb0g5SFBzSGk4SExRLTZlM0tEY2x1RUQyMTNpZnljaVhtN0YzdHdaTTNHeDd1UXR1SldHaUlTZ2Z0QW9lVjZfUmI2VThkMmZxNzZuWHYxak5nckRRcE5waEZFd2tCdGRtZHZ2THByZVVYX3BWangza1AxN3pWbXFKNmNOOWkwWUc4WHg2VmRzcUxsRXUxQ2Rhd3Q0eko1M3VHMFlKTjRnUDZwc25yUS1uM0U1aFdlMDJ3d3dBZ3F3bGlPdmd4V1RTeXJyLXY2eDI0IiwKICAgICAgICAgInByb3RlY3RlZCI6ICJleUptYjNKdFlYUk1aVzVuZEdnaU9qRTNNeXdpWm05eWJXRjBWR0ZwYkNJNkltWlJJaXdpZEdsdFpTSTZJakl3TVRjdE1EVXRNRFZVTWpFNk5UYzZNek5hSW4wIgogICAgICB9CiAgIF0KfQ=="}`
)
func TestActivateNoContainerd(t *testing.T) {
testCli.SetContainerizedEngineClient(
func(string) (clitypes.ContainerizedClient, error) {
return nil, fmt.Errorf("some error")
},
)
isRoot = func() bool { return true }
cmd := newActivateCommand(testCli)
cmd.Flags().Set("license", "invalidpath")
cmd.SilenceUsage = true
cmd.SilenceErrors = true
err := cmd.Execute()
assert.ErrorContains(t, err, "unable to access local containerd")
}
func TestActivateBadLicense(t *testing.T) {
testCli.SetContainerizedEngineClient(
func(string) (clitypes.ContainerizedClient, error) {
return &fakeContainerizedEngineClient{}, nil
},
)
isRoot = func() bool { return true }
cmd := newActivateCommand(testCli)
cmd.SilenceUsage = true
cmd.SilenceErrors = true
cmd.Flags().Set("license", "invalidpath")
err := cmd.Execute()
assert.Error(t, err, "open invalidpath: no such file or directory")
}
func TestActivateExpiredLicenseDryRun(t *testing.T) {
dir := fs.NewDir(t, "license", fs.WithFile("docker.lic", expiredLicense, fs.WithMode(0644)))
defer dir.Remove()
filename := dir.Join("docker.lic")
isRoot = func() bool { return true }
c := test.NewFakeCli(&verClient{client.Client{}, types.Version{}, nil, types.Info{}, nil})
c.SetContainerizedEngineClient(
func(string) (clitypes.ContainerizedClient, error) {
return &fakeContainerizedEngineClient{}, nil
},
)
cmd := newActivateCommand(c)
cmd.SilenceUsage = true
cmd.SilenceErrors = true
cmd.Flags().Set("license", filename)
cmd.Flags().Set("display-only", "true")
c.OutBuffer().Reset()
err := cmd.Execute()
assert.NilError(t, err)
golden.Assert(t, c.OutBuffer().String(), "expired-license-display-only.golden")
}
type mockLicenseClient struct{}
func (c mockLicenseClient) LoginViaAuth(ctx context.Context, username, password string) (authToken string, err error) {
return "", fmt.Errorf("not implemented")
}
func (c mockLicenseClient) GetHubUserOrgs(ctx context.Context, authToken string) (orgs []model.Org, err error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) GetHubUserByName(ctx context.Context, username string) (user *model.User, err error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) VerifyLicense(ctx context.Context, license model.IssuedLicense) (res *model.CheckResponse, err error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) GenerateNewTrialSubscription(ctx context.Context, authToken, dockerID string) (subscriptionID string, err error) {
return "", fmt.Errorf("not implemented")
}
func (c mockLicenseClient) ListSubscriptions(ctx context.Context, authToken, dockerID string) (response []*model.Subscription, err error) {
expires := time.Date(2010, time.January, 1, 0, 0, 0, 0, time.UTC)
return []*model.Subscription{
{
State: "active",
Expires: &expires,
},
}, nil
}
func (c mockLicenseClient) ListSubscriptionsDetails(ctx context.Context, authToken, dockerID string) (response []*model.SubscriptionDetail, err error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) DownloadLicenseFromHub(ctx context.Context, authToken, subscriptionID string) (license *model.IssuedLicense, err error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) ParseLicense(license []byte) (parsedLicense *model.IssuedLicense, err error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) StoreLicense(ctx context.Context, dclnt licensing.WrappedDockerClient, licenses *model.IssuedLicense, localRootDir string) error {
return fmt.Errorf("not implemented")
}
func (c mockLicenseClient) LoadLocalLicense(ctx context.Context, dclnt licensing.WrappedDockerClient) (*model.Subscription, error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) SummarizeLicense(res *model.CheckResponse, keyID string) *model.Subscription {
return nil
}
func TestActivateDisplayOnlyHub(t *testing.T) {
isRoot = func() bool { return true }
c := test.NewFakeCli(&verClient{client.Client{}, types.Version{}, nil, types.Info{}, nil})
c.SetContainerizedEngineClient(
func(string) (clitypes.ContainerizedClient, error) {
return &fakeContainerizedEngineClient{}, nil
},
)
hubUser := licenseutils.HubUser{
Client: mockLicenseClient{},
}
options := activateOptions{
licenseLoginFunc: func(ctx context.Context, authConfig *types.AuthConfig) (licenseutils.HubUser, error) {
return hubUser, nil
},
displayOnly: true,
}
c.OutBuffer().Reset()
err := runActivate(c, options)
assert.NilError(t, err)
golden.Assert(t, c.OutBuffer().String(), "expired-hub-license-display-only.golden")
}

View File

@ -0,0 +1,13 @@
// +build !windows
package engine
import (
"golang.org/x/sys/unix"
)
var (
isRoot = func() bool {
return unix.Geteuid() == 0
}
)

View File

@ -0,0 +1,9 @@
// +build windows
package engine
var (
isRoot = func() bool {
return true
}
)

View File

@ -0,0 +1,34 @@
package engine
import (
"context"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/trust"
clitypes "github.com/docker/cli/types"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
registrytypes "github.com/docker/docker/api/types/registry"
"github.com/pkg/errors"
)
func getRegistryAuth(cli command.Cli, registryPrefix string) (*types.AuthConfig, error) {
if registryPrefix == "" {
registryPrefix = clitypes.RegistryPrefix
}
distributionRef, err := reference.ParseNormalizedNamed(registryPrefix)
if err != nil {
return nil, errors.Wrapf(err, "failed to parse image name: %s", registryPrefix)
}
imgRefAndAuth, err := trust.GetImageReferencesAndAuth(context.Background(), nil, authResolver(cli), distributionRef.String())
if err != nil {
return nil, errors.Wrap(err, "failed to get imgRefAndAuth")
}
return imgRefAndAuth.AuthConfig(), nil
}
func authResolver(cli command.Cli) func(ctx context.Context, index *registrytypes.IndexInfo) types.AuthConfig {
return func(ctx context.Context, index *registrytypes.IndexInfo) types.AuthConfig {
return command.ResolveAuthConfig(ctx, cli, index)
}
}

View File

@ -0,0 +1,125 @@
package engine
import (
"context"
"fmt"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/cli/internal/versions"
clitypes "github.com/docker/cli/types"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
type checkOptions struct {
registryPrefix string
preReleases bool
engineImage string
downgrades bool
upgrades bool
format string
quiet bool
sockPath string
}
func newCheckForUpdatesCommand(dockerCli command.Cli) *cobra.Command {
var options checkOptions
cmd := &cobra.Command{
Use: "check [OPTIONS]",
Short: "Check for available engine updates",
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
return runCheck(dockerCli, options)
},
}
flags := cmd.Flags()
flags.StringVar(&options.registryPrefix, "registry-prefix", clitypes.RegistryPrefix, "Override the existing location where engine images are pulled")
flags.BoolVar(&options.downgrades, "downgrades", false, "Report downgrades (default omits older versions)")
flags.BoolVar(&options.preReleases, "pre-releases", false, "Include pre-release versions")
flags.StringVar(&options.engineImage, "engine-image", "", "Specify engine image (default uses the same image as currently running)")
flags.BoolVar(&options.upgrades, "upgrades", true, "Report available upgrades")
flags.StringVar(&options.format, "format", "", "Pretty-print updates using a Go template")
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Only display available versions")
flags.StringVar(&options.sockPath, "containerd", "", "override default location of containerd endpoint")
return cmd
}
func runCheck(dockerCli command.Cli, options checkOptions) error {
if !isRoot() {
return errors.New("this command must be run as a privileged user")
}
ctx := context.Background()
client := dockerCli.Client()
serverVersion, err := client.ServerVersion(ctx)
if err != nil {
return err
}
availVersions, err := versions.GetEngineVersions(ctx, dockerCli.RegistryClient(false), options.registryPrefix, options.engineImage, serverVersion.Version)
if err != nil {
return err
}
availUpdates := []clitypes.Update{
{Type: "current", Version: serverVersion.Version},
}
if len(availVersions.Patches) > 0 {
availUpdates = append(availUpdates,
processVersions(
serverVersion.Version,
"patch",
options.preReleases,
availVersions.Patches)...)
}
if options.upgrades {
availUpdates = append(availUpdates,
processVersions(
serverVersion.Version,
"upgrade",
options.preReleases,
availVersions.Upgrades)...)
}
if options.downgrades {
availUpdates = append(availUpdates,
processVersions(
serverVersion.Version,
"downgrade",
options.preReleases,
availVersions.Downgrades)...)
}
format := options.format
if len(format) == 0 {
format = formatter.TableFormatKey
}
updatesCtx := formatter.Context{
Output: dockerCli.Out(),
Format: formatter.NewUpdatesFormat(format, options.quiet),
Trunc: false,
}
return formatter.UpdatesWrite(updatesCtx, availUpdates)
}
func processVersions(currentVersion, verType string,
includePrerelease bool,
availVersions []clitypes.DockerVersion) []clitypes.Update {
availUpdates := []clitypes.Update{}
for _, ver := range availVersions {
if !includePrerelease && ver.Prerelease() != "" {
continue
}
if ver.Tag != currentVersion {
availUpdates = append(availUpdates, clitypes.Update{
Type: verType,
Version: ver.Tag,
Notes: fmt.Sprintf("%s?%s", clitypes.ReleaseNotePrefix, ver.Tag),
})
}
}
return availUpdates
}

View File

@ -0,0 +1,114 @@
package engine
import (
"context"
"fmt"
"testing"
manifesttypes "github.com/docker/cli/cli/manifest/types"
"github.com/docker/cli/internal/test"
"github.com/docker/distribution"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/opencontainers/go-digest"
"gotest.tools/assert"
"gotest.tools/golden"
)
var (
testCli = test.NewFakeCli(&client.Client{})
)
type verClient struct {
client.Client
ver types.Version
verErr error
info types.Info
infoErr error
}
func (c *verClient) ServerVersion(ctx context.Context) (types.Version, error) {
return c.ver, c.verErr
}
func (c *verClient) Info(ctx context.Context) (types.Info, error) {
return c.info, c.infoErr
}
type testRegistryClient struct {
tags []string
}
func (c testRegistryClient) GetManifest(ctx context.Context, ref reference.Named) (manifesttypes.ImageManifest, error) {
return manifesttypes.ImageManifest{}, nil
}
func (c testRegistryClient) GetManifestList(ctx context.Context, ref reference.Named) ([]manifesttypes.ImageManifest, error) {
return nil, nil
}
func (c testRegistryClient) MountBlob(ctx context.Context, source reference.Canonical, target reference.Named) error {
return nil
}
func (c testRegistryClient) PutManifest(ctx context.Context, ref reference.Named, manifest distribution.Manifest) (digest.Digest, error) {
return "", nil
}
func (c testRegistryClient) GetTags(ctx context.Context, ref reference.Named) ([]string, error) {
return c.tags, nil
}
func TestCheckForUpdatesNoCurrentVersion(t *testing.T) {
isRoot = func() bool { return true }
c := test.NewFakeCli(&verClient{client.Client{}, types.Version{}, nil, types.Info{}, nil})
c.SetRegistryClient(testRegistryClient{})
cmd := newCheckForUpdatesCommand(c)
cmd.SilenceUsage = true
cmd.SilenceErrors = true
err := cmd.Execute()
assert.ErrorContains(t, err, "no such file or directory")
}
func TestCheckForUpdatesGetEngineVersionsHappy(t *testing.T) {
c := test.NewFakeCli(&verClient{client.Client{}, types.Version{Version: "1.1.0"}, nil, types.Info{ServerVersion: "1.1.0"}, nil})
c.SetRegistryClient(testRegistryClient{[]string{
"1.0.1", "1.0.2", "1.0.3-beta1",
"1.1.1", "1.1.2", "1.1.3-beta1",
"1.2.0", "2.0.0", "2.1.0-beta1",
}})
isRoot = func() bool { return true }
cmd := newCheckForUpdatesCommand(c)
cmd.Flags().Set("pre-releases", "true")
cmd.Flags().Set("downgrades", "true")
cmd.Flags().Set("engine-image", "engine-community")
cmd.SilenceUsage = true
cmd.SilenceErrors = true
err := cmd.Execute()
assert.NilError(t, err)
golden.Assert(t, c.OutBuffer().String(), "check-all.golden")
c.OutBuffer().Reset()
cmd.Flags().Set("pre-releases", "false")
cmd.Flags().Set("downgrades", "true")
err = cmd.Execute()
assert.NilError(t, err)
fmt.Println(c.OutBuffer().String())
golden.Assert(t, c.OutBuffer().String(), "check-no-prerelease.golden")
c.OutBuffer().Reset()
cmd.Flags().Set("pre-releases", "false")
cmd.Flags().Set("downgrades", "false")
err = cmd.Execute()
assert.NilError(t, err)
fmt.Println(c.OutBuffer().String())
golden.Assert(t, c.OutBuffer().String(), "check-no-downgrades.golden")
c.OutBuffer().Reset()
cmd.Flags().Set("pre-releases", "false")
cmd.Flags().Set("downgrades", "false")
cmd.Flags().Set("upgrades", "false")
err = cmd.Execute()
assert.NilError(t, err)
fmt.Println(c.OutBuffer().String())
golden.Assert(t, c.OutBuffer().String(), "check-patches-only.golden")
}

View File

@ -0,0 +1,101 @@
package engine
import (
"context"
"github.com/containerd/containerd"
registryclient "github.com/docker/cli/cli/registry/client"
clitypes "github.com/docker/cli/types"
"github.com/docker/docker/api/types"
)
type (
fakeContainerizedEngineClient struct {
closeFunc func() error
activateEngineFunc func(ctx context.Context,
opts clitypes.EngineInitOptions,
out clitypes.OutStream,
authConfig *types.AuthConfig) error
initEngineFunc func(ctx context.Context,
opts clitypes.EngineInitOptions,
out clitypes.OutStream,
authConfig *types.AuthConfig,
healthfn func(context.Context) error) error
doUpdateFunc func(ctx context.Context,
opts clitypes.EngineInitOptions,
out clitypes.OutStream,
authConfig *types.AuthConfig) error
getEngineVersionsFunc func(ctx context.Context,
registryClient registryclient.RegistryClient,
currentVersion,
imageName string) (clitypes.AvailableVersions, error)
getEngineFunc func(ctx context.Context) (containerd.Container, error)
removeEngineFunc func(ctx context.Context) error
getCurrentEngineVersionFunc func(ctx context.Context) (clitypes.EngineInitOptions, error)
}
)
func (w *fakeContainerizedEngineClient) Close() error {
if w.closeFunc != nil {
return w.closeFunc()
}
return nil
}
func (w *fakeContainerizedEngineClient) ActivateEngine(ctx context.Context,
opts clitypes.EngineInitOptions,
out clitypes.OutStream,
authConfig *types.AuthConfig) error {
if w.activateEngineFunc != nil {
return w.activateEngineFunc(ctx, opts, out, authConfig)
}
return nil
}
func (w *fakeContainerizedEngineClient) InitEngine(ctx context.Context,
opts clitypes.EngineInitOptions,
out clitypes.OutStream,
authConfig *types.AuthConfig,
healthfn func(context.Context) error) error {
if w.initEngineFunc != nil {
return w.initEngineFunc(ctx, opts, out, authConfig, healthfn)
}
return nil
}
func (w *fakeContainerizedEngineClient) DoUpdate(ctx context.Context,
opts clitypes.EngineInitOptions,
out clitypes.OutStream,
authConfig *types.AuthConfig) error {
if w.doUpdateFunc != nil {
return w.doUpdateFunc(ctx, opts, out, authConfig)
}
return nil
}
func (w *fakeContainerizedEngineClient) GetEngineVersions(ctx context.Context,
registryClient registryclient.RegistryClient,
currentVersion, imageName string) (clitypes.AvailableVersions, error) {
if w.getEngineVersionsFunc != nil {
return w.getEngineVersionsFunc(ctx, registryClient, currentVersion, imageName)
}
return clitypes.AvailableVersions{}, nil
}
func (w *fakeContainerizedEngineClient) GetEngine(ctx context.Context) (containerd.Container, error) {
if w.getEngineFunc != nil {
return w.getEngineFunc(ctx)
}
return nil, nil
}
func (w *fakeContainerizedEngineClient) RemoveEngine(ctx context.Context) error {
if w.removeEngineFunc != nil {
return w.removeEngineFunc(ctx)
}
return nil
}
func (w *fakeContainerizedEngineClient) GetCurrentEngineVersion(ctx context.Context) (clitypes.EngineInitOptions, error) {
if w.getCurrentEngineVersionFunc != nil {
return w.getCurrentEngineVersionFunc(ctx)
}
return clitypes.EngineInitOptions{}, nil
}

View File

@ -0,0 +1,23 @@
package engine
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
// NewEngineCommand returns a cobra command for `engine` subcommands
func NewEngineCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "engine COMMAND",
Short: "Manage the docker engine",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
}
cmd.AddCommand(
newActivateCommand(dockerCli),
newCheckForUpdatesCommand(dockerCli),
newUpdateCommand(dockerCli),
)
return cmd
}

View File

@ -0,0 +1,14 @@
package engine
import (
"testing"
"gotest.tools/assert"
)
func TestNewEngineCommand(t *testing.T) {
cmd := NewEngineCommand(testCli)
subcommands := cmd.Commands()
assert.Assert(t, len(subcommands) == 3)
}

View File

@ -0,0 +1,10 @@
package engine
import (
clitypes "github.com/docker/cli/types"
)
type extendedEngineInitOptions struct {
clitypes.EngineInitOptions
sockPath string
}

View File

@ -0,0 +1,11 @@
TYPE VERSION NOTES
current 1.1.0
patch 1.1.1 https://docker.com/engine/releasenotes?1.1.1
patch 1.1.2 https://docker.com/engine/releasenotes?1.1.2
patch 1.1.3-beta1 https://docker.com/engine/releasenotes?1.1.3-beta1
upgrade 1.2.0 https://docker.com/engine/releasenotes?1.2.0
upgrade 2.0.0 https://docker.com/engine/releasenotes?2.0.0
upgrade 2.1.0-beta1 https://docker.com/engine/releasenotes?2.1.0-beta1
downgrade 1.0.1 https://docker.com/engine/releasenotes?1.0.1
downgrade 1.0.2 https://docker.com/engine/releasenotes?1.0.2
downgrade 1.0.3-beta1 https://docker.com/engine/releasenotes?1.0.3-beta1

View File

@ -0,0 +1,6 @@
TYPE VERSION NOTES
current 1.1.0
patch 1.1.1 https://docker.com/engine/releasenotes?1.1.1
patch 1.1.2 https://docker.com/engine/releasenotes?1.1.2
upgrade 1.2.0 https://docker.com/engine/releasenotes?1.2.0
upgrade 2.0.0 https://docker.com/engine/releasenotes?2.0.0

View File

@ -0,0 +1,8 @@
TYPE VERSION NOTES
current 1.1.0
patch 1.1.1 https://docker.com/engine/releasenotes?1.1.1
patch 1.1.2 https://docker.com/engine/releasenotes?1.1.2
upgrade 1.2.0 https://docker.com/engine/releasenotes?1.2.0
upgrade 2.0.0 https://docker.com/engine/releasenotes?2.0.0
downgrade 1.0.1 https://docker.com/engine/releasenotes?1.0.1
downgrade 1.0.2 https://docker.com/engine/releasenotes?1.0.2

View File

@ -0,0 +1,4 @@
TYPE VERSION NOTES
current 1.1.0
patch 1.1.1 https://docker.com/engine/releasenotes?1.1.1
patch 1.1.2 https://docker.com/engine/releasenotes?1.1.2

View File

@ -0,0 +1,3 @@
Looking for existing licenses for ...
NUM OWNER PRODUCT ID EXPIRES PRICING COMPONENTS
0 2010-01-01 00:00:00 +0000 UTC

View File

@ -0,0 +1 @@
License: Quantity: 1 Nodes Expiration date: 2018-03-18 Expired! You will no longer receive updates. Please renew at https://docker.com/licensing

View File

@ -0,0 +1,55 @@
package engine
import (
"context"
"fmt"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
clitypes "github.com/docker/cli/types"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
func newUpdateCommand(dockerCli command.Cli) *cobra.Command {
var options extendedEngineInitOptions
cmd := &cobra.Command{
Use: "update [OPTIONS]",
Short: "Update a local engine",
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
return runUpdate(dockerCli, options)
},
}
flags := cmd.Flags()
flags.StringVar(&options.EngineVersion, "version", "", "Specify engine version")
flags.StringVar(&options.EngineImage, "engine-image", "", "Specify engine image (default uses the same image as currently running)")
flags.StringVar(&options.RegistryPrefix, "registry-prefix", clitypes.RegistryPrefix, "Override the current location where engine images are pulled")
flags.StringVar(&options.sockPath, "containerd", "", "override default location of containerd endpoint")
return cmd
}
func runUpdate(dockerCli command.Cli, options extendedEngineInitOptions) error {
if !isRoot() {
return errors.New("this command must be run as a privileged user")
}
ctx := context.Background()
client, err := dockerCli.NewContainerizedEngineClient(options.sockPath)
if err != nil {
return errors.Wrap(err, "unable to access local containerd")
}
defer client.Close()
authConfig, err := getRegistryAuth(dockerCli, options.RegistryPrefix)
if err != nil {
return err
}
if err := client.DoUpdate(ctx, options.EngineInitOptions, dockerCli.Out(), authConfig); err != nil {
return err
}
fmt.Fprintln(dockerCli.Out(), `Successfully updated engine.
Restart docker with 'systemctl restart docker' to complete the update.`)
return nil
}

Some files were not shown because too many files have changed in this diff Show More