Commit Graph

28901 Commits

Author SHA1 Message Date
0cda3fd8df update incorrect comments of CheckpointList
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 98ffe52fbc953ec2fce0d3b6c3b2405188b96cd5
Component: engine
2017-02-04 00:41:35 +08:00
cfc078d90b Merge pull request #30654 from Microsoft/jjh/unifyworkdir
Windows: Unify workdir handling
Upstream-commit: c3b660b112804dfb1752efc1368a104897c7b884
Component: engine
2017-02-03 00:37:54 -08:00
69398158f9 Merge pull request #30685 from Microsoft/jjh/commandLine
Windows: Remove unused commandLine
Upstream-commit: edd977db97f2a0584eac56ded9a9b4a6cf55435b
Component: engine
2017-02-02 16:06:31 -08:00
c16190c838 Merge pull request #30180 from allencloud/add-endpoint-mode-a-default-value
add endpoint mode a default value
Upstream-commit: e07c392c49c44f5bc8986bad6378d9c5228669ce
Component: engine
2017-02-02 11:51:44 -08:00
a336fcff25 Merge pull request #30644 from Microsoft/jjh/makecheckgoversion
Windows: make.ps1 validate go version
Upstream-commit: 12b8432413de26e91af78f664a2f811ab095f174
Component: engine
2017-02-02 11:39:56 -08:00
bb87b715d8 Windows: Unify workdir handling
Signed-off-by: John Howard <jhoward@microsoft.com>

Working directory processing was handled differently for Hyper-V and Windows-Server containers, as annotated in the builder documentation (updated in this PR). For Hyper-V containers, the working directory set by WORKDIR was not created. This PR makes Hyper-V containers work the same as Windows Server containers (and the same as Linux).

Example (only applies to Hyper-V containers, so not reproducible under CI environment)
Dockerfile:
FROM microsoft/nanoserver
WORKDIR c:\installer
ENV GOROOT=c:\installer
ADD go.exe .
RUN go --help
Running on Windows Server 2016, using docker master without this change, but with daemon set to --exec-opt isolation=hyperv as it would be for Client operating systems.
PS E:\go\src\github.com\docker\docker> dockerd -g c:\control --exec-opt isolation=hyperv
time="2017-02-01T15:48:09.657286100-08:00" level=info msg="Windows default isolation mode: hyperv"
time="2017-02-01T15:48:09.662720900-08:00" level=info msg="[graphdriver] using prior storage driver: windowsfilter"
time="2017-02-01T15:48:10.011588000-08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-02-01T15:48:10.016655800-08:00" level=info msg="Loading containers: start."
time="2017-02-01T15:48:10.460820000-08:00" level=info msg="Loading containers: done."
time="2017-02-01T15:48:10.509859600-08:00" level=info msg="Daemon has completed initialization"
time="2017-02-01T15:48:10.509859600-08:00" level=info msg="Docker daemon" commit=3c64061 graphdriver=windowsfilter version=1.14.0-dev
First with no explicit isolation:
PS E:\docker\build\unifyworkdir> docker build --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 7e0f41d08204
Removing intermediate container 236c7802042a
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in 8ea5237183c1
 ---> 394b70435261
Removing intermediate container 8ea5237183c1
Step 4/5 : ADD go.exe .
 ---> e47401a1745c
Removing intermediate container 88dcc28e74b1
Step 5/5 : RUN go --help
 ---> Running in efe90e1b6b8b
container efe90e1b6b8b76586abc5c1dc0e2797b75adc26517c48733d90651e767c8463b encountered an error during CreateProcess: failure in a Windows system call: The directory name is invalid. (0x10b) extra info: {"ApplicationName":"","CommandLine":"cmd /S /C go --help","User":"","WorkingDirectory":"C:\\installer","Environment":{"GOROOT":"c:\\installer"},"EmulateConsole":false,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}
PS E:\docker\build\unifyworkdir>
Then forcing process isolation:
PS E:\docker\build\unifyworkdir> docker build --isolation=process --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 350c955980c8
Removing intermediate container 8339c1e9250c
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in bde511c5e3e0
 ---> b8820063b5b6
Removing intermediate container bde511c5e3e0
Step 4/5 : ADD go.exe .
 ---> e4ac32f8902b
Removing intermediate container d586e8492eda
Step 5/5 : RUN go --help
 ---> Running in 9e1aa235af5f
Cannot mkdir: C:\installer is not a directory
PS E:\docker\build\unifyworkdir>
Now compare the same results after this PR. Again, first with no explicit isolation (defaulting to Hyper-V containers as that's what the daemon it set to) - note it now succeeds 😄
PS E:\docker\build\unifyworkdir> docker build --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 4f319f301c69
Removing intermediate container 61b9c0b1ff6f
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in c464a1d612d8
 ---> 96a26ab9a7b5
Removing intermediate container c464a1d612d8
Step 4/5 : ADD go.exe .
 ---> 0290d61faf57
Removing intermediate container dc5a085fffe3
Step 5/5 : RUN go --help
 ---> Running in 60bd56042ff8
Go is a tool for managing Go source code.

Usage:

        go command [arguments]

The commands are:

        build       compile packages and dependencies
        clean       remove object files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         run go tool fix on packages
        fmt         run gofmt on package sources
        generate    generate Go files by processing source
        get         download and install packages and dependencies
        install     compile and install packages and dependencies
        list        list packages
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

        c           calling between Go and C
        buildmode   description of build modes
        filetype    file types
        gopath      GOPATH environment variable
        environment environment variables
        importpath  import path syntax
        packages    description of package lists
        testflag    description of testing flags
        testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

The command 'cmd /S /C go --help' returned a non-zero code: 2
And the same with forcing process isolation. Also works 😄
PS E:\docker\build\unifyworkdir> docker build --isolation=process --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> f423b9cc3e78
Removing intermediate container 41330c88893d
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in 0b99a2d7bf19
 ---> e051144bf8ec
Removing intermediate container 0b99a2d7bf19
Step 4/5 : ADD go.exe .
 ---> 7072e32b7c37
Removing intermediate container a7a97aa37fd1
Step 5/5 : RUN go --help
 ---> Running in 7097438a54e5
Go is a tool for managing Go source code.

Usage:

        go command [arguments]

The commands are:

        build       compile packages and dependencies
        clean       remove object files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         run go tool fix on packages
        fmt         run gofmt on package sources
        generate    generate Go files by processing source
        get         download and install packages and dependencies
        install     compile and install packages and dependencies
        list        list packages
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

        c           calling between Go and C
        buildmode   description of build modes
        filetype    file types
        gopath      GOPATH environment variable
        environment environment variables
        importpath  import path syntax
        packages    description of package lists
        testflag    description of testing flags
        testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

The command 'cmd /S /C go --help' returned a non-zero code: 2
PS E:\docker\build\unifyworkdir>
Upstream-commit: f42033ba9484ab31611bb1e4a0416beb3aa956da
Component: engine
2017-02-02 11:25:07 -08:00
f8a42143d3 Windows: Remove unused commandLine
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b7106a92f26271e0d2c6623446ce4a8bc987c445
Component: engine
2017-02-02 11:16:11 -08:00
1f8887a389 Merge pull request #30668 from albers/completion-log-opt-ringbuffer
Add bash completion for `{dockerd,docker run} --log-opt max-buffer-size|mode`
Upstream-commit: de26546680f4017545bc4bcf26347292c96d74f0
Component: engine
2017-02-02 08:47:03 -08:00
09c7b4aebd Add bash completion for {dockerd,docker run} --log-opt max-buffer-size|mode
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5d9acc2e61786e0b08ecf569001104ccf0565689
Component: engine
2017-02-02 17:29:35 +01:00
f630648959 Merge pull request #30653 from vipconsult/28766-fix-checkpoint-ls-error-messages
more descriptive error for checkpoint ls  for non existent containers
Upstream-commit: 31f1ff029f025ebf479ca77c6c3db5cac391b27b
Component: engine
2017-02-02 14:41:53 +01:00
c0cdf4a857 Merge pull request #30040 from Microsoft/jjh/ntauthority
Windows: Test for run as local system
Upstream-commit: ada44345dd8ce22f4883f4059641c5d1880a09da
Component: engine
2017-02-02 12:13:55 +01:00
2218a3a30e Merge pull request #29896 from Microsoft/jjh/gofmt
Windows: gofmt checker fixes
Upstream-commit: 8ed8366efd86273561876e0d1c540637b571aacc
Component: engine
2017-02-02 12:12:57 +01:00
6c5ae655f2 Merge pull request #30645 from yongtang/02012017-man-plugin-ls
Add markdown for man page of `docker plugin ls`
Upstream-commit: c6a3ed39f5d48db5d0d834e05741223cbebc12c4
Component: engine
2017-02-02 10:42:31 +01:00
b481e6b38d Merge pull request #28199 from yongtang/11062016-service-ls-format
Add `--format` to `docker service ls`
Upstream-commit: 4ca00c09b6ab7fb4fce0b909516e6b972f463c23
Component: engine
2017-02-02 10:40:04 +01:00
361314860c Merge pull request #30660 from yongtang/02012017-man-container
Make markdown for man pages of `docker container ...` consistent
Upstream-commit: 1caba6c71ef3fce2efcbc62a40371daad8a1cefd
Component: engine
2017-02-01 23:15:12 -08:00
cd42654045 Merge pull request #30663 from Mashimiao/reference-cmdline-service-tfix
reference/commandline: small tfix
Upstream-commit: 32697b57c88e0b1412976c46d570d8a6b3378315
Component: engine
2017-02-01 22:23:08 -08:00
49dc0429eb reference/commandline: small tfix
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 31f63d64e3b9d2731a31ed429fc42e0c420cdf88
Component: engine
2017-02-02 13:54:45 +08:00
9447ebbb9d Merge pull request #30460 from yongtang/28176-attach-binary-frame-websocket
Use binary frame for websocket attach endpoint
Upstream-commit: f0089a85ecba6a31c6e00b038b18096080e516ea
Component: engine
2017-02-01 20:02:46 -08:00
c9bd261258 Windows: gofmt check write out right filename
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a08e1304d4f2a0306e266825759cb78f9ba13e68
Component: engine
2017-02-01 19:13:33 -08:00
11c81928d2 Windows: Test for run as local system
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ffbe4b6ff13db3907a2c5c6ff4742ef115cec9b8
Component: engine
2017-02-01 18:37:44 -08:00
b8779a3770 Make markdown for man pages of docker container ... consistent
This fix updates the markdown for man pages of `docker container ...`
so that they are consistent. The changes are based on feedback:
https://github.com/docker/docker/pull/30645#discussion_r99020188
https://github.com/docker/docker/pull/30645#discussion_r99020304

1. Use `H2 (##)` as needed
2. Use unrpiviledged prompt (`$`) instead of (`#`)

This PR convers files under man/src/container/*.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6c27237f766665142b477083690450e0c745584e
Component: engine
2017-02-01 18:34:55 -08:00
84a7718751 Add markdown for man page of docker plugin ls
This fix adds markdown for man page of `docker plugin ls`,
based on https://github.com/docker/docker/pull/28627#issuecomment-276731752

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8ee9c635b245941f50f470e7b80f03fbcdf77ed7
Component: engine
2017-02-01 18:28:16 -08:00
38bc957cc1 Merge pull request #30203 from allencloud/validate-healthcheck-params-in-daemon-side
validate healthcheck params in daemon side
Upstream-commit: bb0a532fc21cb6b9390fb7e5eb0054bdc8045bbc
Component: engine
2017-02-01 21:19:30 -05:00
3e14cdc8d7 Merge pull request #30616 from thaJeztah/fix-yakkety-install
install dirmngr if needed
Upstream-commit: 632c8dd4cf8126a49a07d8ec6bf6553a3be3f1d4
Component: engine
2017-02-01 17:21:21 -08:00
7505453e38 more descriptive error fo checkpoint ls for non existent containers
Signed-off-by: Krasi Georgiev <krasi@vip-consult.solutions>
Upstream-commit: 8ddfd2f75928be5feda8bd8327a5e9dd60b85cf2
Component: engine
2017-02-02 00:42:29 +02:00
98919fc990 Merge pull request #29747 from xlgao-zju/break-the-for
exit collect when we get EOF
Upstream-commit: 3c64061b6719e26a2a14d314d39f42e7df6ad9a4
Component: engine
2017-02-01 22:29:18 +01:00
155575aa7b Merge pull request #28762 from cpuguy83/logger_ring_buffer
Implement optional ring buffer for container logs
Upstream-commit: dc20f2abd494e880c25d9e8669a10ead90cdbaf5
Component: engine
2017-02-01 13:04:01 -08:00
95223917a1 Merge pull request #30643 from dnephin/fix-stack-remove-test-flake
Add missing build tag for stack tests
Upstream-commit: 3138a8f9f23d5c896ed777157e32ef0c5c120a9a
Component: engine
2017-02-01 12:31:02 -08:00
44e0a761dd install dirmngr if needed
as of Ubuntu Yakkety, dirmngr is now in a separate
package (see https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1634464)

this patch updates the install script to install
the dirmngr package if it's not installed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f5263c8074c091555592787e32319a6a4f39e650
Component: engine
2017-02-01 12:17:23 -08:00
7558a71652 Merge pull request #30444 from albers/completion-checkpoints
Add bash completion for `docker checkpoint`
Upstream-commit: 39f717ac89a104b6a6224dd2350bc584e529cb82
Component: engine
2017-02-01 11:44:37 -08:00
ecb293ce1c Merge pull request #30613 from mattmoor/track-elided-pulls
Add tracking to elided layer pulls.
Upstream-commit: f9998c8c9f23dafaf86bf17c376d2f74274dfcfe
Component: engine
2017-02-01 11:38:35 -08:00
c238856aa4 Use sync.Pool for logger Messages
This reduces allocs and bytes used per log entry significantly as well
as some improvement to time per log operation.

Each log driver, however, must put messages back in the pool once they
are finished with the message.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3f4fccb65f0ef286c9c4e0f01c4ae7bb09a6ad89
Component: engine
2017-02-01 13:52:37 -05:00
11a6f80b8b Implement optional ring buffer for container logs
This allows the user to set a logging mode to "blocking" (default), or
"non-blocking", which uses the ring buffer as a proxy to the real log
driver.

This allows a container to never be blocked on stdio at the cost of
dropping log messages.

Introduces 2 new log-opts that works for all drivers, `log-mode` and
`log-size`. `log-mode` takes a  value of "blocking", or "non-blocking"
I chose not to implement this as a bool since it is difficult to
determine if the mode was set to false vs just not set... especially
difficult when merging the default daemon config with the container config.
`log-size` takes a size string, e.g. `2MB`, which sets the max size
of the ring buffer. When the max size is reached, it will start
dropping log messages.

```
BenchmarkRingLoggerThroughputNoReceiver-8           	2000000000	        36.2 ns/op	 856.35 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputWithReceiverDelay0-8   	300000000	       156 ns/op	 198.48 MB/s	      32 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay1-8        	2000000000	        36.1 ns/op	 857.80 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay10-8       	1000000000	        36.2 ns/op	 856.53 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay50-8       	2000000000	        34.7 ns/op	 894.65 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay100-8      	2000000000	        35.1 ns/op	 883.91 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay300-8      	1000000000	        35.9 ns/op	 863.90 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay500-8      	2000000000	        35.8 ns/op	 866.88 MB/s	       0 B/op	       0 allocs/op
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 054abff3b67bb5d66323e5418a43c845a3eac8a1
Component: engine
2017-02-01 13:52:37 -05:00
520f42e4b0 Windows: make.ps1 validate go version
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5e7a9e523ff057f856d8a1ceb9feb7cabac6218e
Component: engine
2017-02-01 10:31:27 -08:00
21f88f4070 Merge pull request #29863 from ncdc/journald-logdriver-drain-one-more-time-after-follow-ends
journald logs: drain 1 more time at container exit
Upstream-commit: dc78b3a1d4376ffa4417e465f9a816eaf8c8fbb5
Component: engine
2017-02-01 10:30:14 -08:00
7c9df75139 Add missing build tag for stack tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dd1d35c269a40aaec59171b6aab2c893ef44cd32
Component: engine
2017-02-01 13:25:37 -05:00
77ca635469 Merge pull request #30633 from vdemeester/29809-fix-network-ipam-configuration-on-master
Follow-up of 29826 Use default driver for IPAM if none
Upstream-commit: 829ea91bd16c006facf2948cab89302ef2db7306
Component: engine
2017-02-01 17:53:49 +01:00
256ff53fbd Add --format to docker service ls
This fix tries to improve the display of `docker service ls`
and adds `--format` flag to `docker service ls`.

In addition to `--format` flag, several other improvement:
1. Updates `docker stacks service`.
2. Adds `servicesFormat` to config file.

Related docs has been updated.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 000f0403d9084e8da427bafac3b594a822b3c386
Component: engine
2017-02-01 08:33:19 -08:00
ba31fcddc2 Merge pull request #29692 from yongtang/29492-daemon-shm-size
Add daemon option `--default-shm-size`
Upstream-commit: 354bd4aaddc3072dbe9ead45b22a1eaccda6a506
Component: engine
2017-02-01 16:56:10 +01:00
9655371ac7 Merge pull request #28627 from yongtang/28624-docker-plugin-ls
Add `--filter enabled=true` for `docker plugin ls`
Upstream-commit: 4c1b40b9d4a301edc5874e59edcec0f015490fec
Component: engine
2017-02-01 16:52:00 +01:00
4b01aa3662 Merge pull request #30430 from Thynix/30374-remove-kickass
Replace "kickass" in name generator with "vigorous"
Upstream-commit: f907205f5d57c3576265b9cfab839b6eb3cbe3f0
Component: engine
2017-02-01 10:33:07 -05:00
b2089d051a Merge pull request #27557 from yongtang/27178-ps-filter-publish-expose
Add `publish` and `expose` filter for `docker ps --filter`
Upstream-commit: 1b6a15eedcf4b2742af9e221ffc8efb283800e37
Component: engine
2017-02-01 16:32:28 +01:00
313335dc3d Merge pull request #22563 from mlaventure/cgroup-devices
Allow adding rules to cgroup devices.allow on container create/run
Upstream-commit: 27f90acd61f4937f1f722082793e806261e527f7
Component: engine
2017-02-01 16:29:34 +01:00
79aad07ab6 Merge pull request #30446 from jim-minter/attachrace
Resolve race conditions in attach API call
Upstream-commit: caa78da1c6f1337d3b1e638e2e77dd840734f6ed
Component: engine
2017-02-01 16:20:50 +01:00
5c89c83d5a Merge pull request #30537 from DiSiqueira/asserting_error
Underscoring an unused var in tests
Upstream-commit: e66717e9f8a8197ae7b25ecd5465b2ef8b47d56c
Component: engine
2017-02-01 16:08:20 +01:00
42f5ad3701 Use default driver for IPAM if none
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c3220641274bb99e120a1b3dd64078f02589717b
Component: engine
2017-02-01 15:54:56 +01:00
d66ad9dfab Resolve race conditions in attach API call
Signed-off-by: Jim Minter <jminter@redhat.com>
Upstream-commit: 84d6240cfe7cc66a7d3f6ac78ea6faad0e3108b9
Component: engine
2017-02-01 09:01:36 +00:00
2dd65c05da Merge pull request #30614 from Microsoft/jjh/vendorgowinio
Revendor Microsoft/go-winio v0.3.8
Upstream-commit: 8f8c4f20e39def31be57feb8913c676d49c96b47
Component: engine
2017-02-01 09:52:55 +01:00
f43ab01087 Merge pull request #30619 from johndmulhausen/patch-3
Fix for 404 in docs
Upstream-commit: 1de72681b598003eb186011237639bbfc4f67318
Component: engine
2017-02-01 09:50:11 +01:00
5fe34ca57b Merge pull request #30615 from tiborvass/plugin_errors
plugin: use pkg/errors in more places
Upstream-commit: 60f8f3fd64b0bfd69ca655e03d16489e9ac9fb38
Component: engine
2017-02-01 09:44:19 +01:00