Commit Graph

5817 Commits

Author SHA1 Message Date
Andrew Hsu 9787a2d94b
Merge pull request #2081 from thaJeztah/18.09_backport_bump_vndr
[18.09 backport] bump LK4D4/vndr v0.0.3 and revendor
2019-09-23 10:25:44 -07:00
Sebastiaan van Stijn 47a40bd409
revendor on 18.09 branch
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-06 17:16:39 +02:00
Sebastiaan van Stijn 7d9172058d
bump LK4D4/vndr v0.0.3 and revendor
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 909b85460c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-06 17:05:33 +02:00
Andrew Hsu 1752eb3626
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)
2019-08-14 11:54:37 -07:00
Sebastiaan van Stijn feb68f9055
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>
2019-08-14 10:21:33 +02:00
Sebastiaan van Stijn aed09dc7eb
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>
2019-08-14 03:07:24 +02:00
Sebastiaan van Stijn f3af74c18c
Merge pull request #1984 from thaJeztah/18.09_backport_bump_credential_helpers
[18.09 backport] bump docker-credential-helpers v0.6.3
2019-08-08 04:02:26 +02:00
Sebastiaan van Stijn ea2b474196
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>
2019-08-08 03:41:34 +02:00
Sebastiaan van Stijn 24dcc56123
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>
2019-08-08 03:41:31 +02:00
Kirill Kolyshkin 31c078b66d
Merge pull request #2021 from thaJeztah/18.09_backport_fix_e2e
[18.09 backport] Disable TLS for e2e docker-in-docker daemon
2019-08-07 17:29:10 -07:00
Sebastiaan van Stijn 0feb4080ba
Merge pull request #2015 from kolyshkin/18.09-golang-1.11.12
[18.09] Bump Go to 1.11.12
2019-08-06 22:56:56 +02:00
Sebastiaan van Stijn 9c8ac0a123
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>
2019-07-29 17:09:53 -07:00
Sebastiaan van Stijn a88330d9dd
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>
2019-07-29 17:09:50 -07:00
Kirill Kolyshkin 62f123fbd2
Merge pull request #1961 from thaJeztah/18.09_format_vendor
[18.09 backport] bump gotest.tools 2.3.0, and reformat vendor.conf
2019-07-23 16:33:19 -07:00
Sebastiaan van Stijn 7b3d023163
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>
2019-07-23 16:01:57 -07:00
Sebastiaan van Stijn 32c4d8c40f
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>
2019-07-23 16:01:52 -07:00
Sebastiaan van Stijn 773a91f9e9
Sort vendor.conf alphabetically
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-23 16:01:48 -07:00
Sebastiaan van Stijn 1764ffafca
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>
2019-07-23 16:01:45 -07:00
Ian Campbell c1c3add698
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>
2019-07-23 16:01:41 -07:00
Kirill Kolyshkin e298714728
Merge pull request #1959 from thaJeztah/18.09_backport_bump_docker_licensing
[18.09 backport] bump docker/licensing to 9781369abdb5281cdc07a2a446c6df01347ec793
2019-07-23 15:59:32 -07:00
Kirill Kolyshkin 1de93b845b
Merge pull request #1971 from thaJeztah/18.09_backport_skip_windows_permissions_check
[18.09 backport] Windows: skip permissions check on key
2019-07-23 15:58:01 -07:00
Kirill Kolyshkin 3d0a1f66eb
Merge pull request #1994 from thaJeztah/18.09_backport_cross_platform_bind
[18.09 backport] Detect Windows absolute paths on non-Windows CLI
2019-07-23 15:56:25 -07:00
Kir Kolyshkin e065aa2798 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>
2019-07-23 15:31:36 -07:00
Kirill Kolyshkin 5f4a501c27
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
2019-07-23 15:21:43 -07:00
Kirill Kolyshkin 7969d87630
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
2019-07-23 14:27:08 -07:00
Kirill Kolyshkin 642235d082
Merge pull request #2002 from thaJeztah/18.09_backport_docs
[18.09 backport] assorted docs and completion script fixes
2019-07-23 14:14:55 -07:00
Matteo Orefice 0dff33436c
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>
2019-07-12 16:18:41 +02:00
Rohan Verma 048af5b37b
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>
2019-07-12 16:10:24 +02:00
Harald Albers 7ee8241f71
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>
2019-07-12 16:09:59 +02:00
Bret Fisher 74d51dc13b
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>
2019-07-12 16:08:23 +02:00
Sebastiaan van Stijn a757fad956
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>
2019-07-10 23:39:41 +02:00
Sebastiaan van Stijn ec2ecc1c8b
Merge pull request #1978 from thaJeztah/18.09_backport_fix_rollback_config_interpolation
[18.09 backport] Fix Rollback config type interpolation
2019-07-03 23:09:20 +02:00
Silvin Lubecki 23c88a8311
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>
2019-07-03 19:20:08 +02:00
Sebastiaan van Stijn 6be8fce6f8
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>
2019-06-25 12:53:54 +02:00
Sebastiaan van Stijn 667aef15b0
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>
2019-06-20 13:56:10 +02:00
Andrew Hsu 3a749342a3
Merge pull request #1842 from thaJeztah/18.09_bump_buildkit_18.09
[18.09 backport] bump buildkit 05766c5c21a1e528eeb1c3522b2f05493fe9ac47 (docker-18.09 branch)
2019-06-18 09:49:42 -07:00
Sebastiaan van Stijn 9bd840b234
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>
2019-06-14 12:55:09 +02:00
Sebastiaan van Stijn b8fe5cea3d
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>
2019-06-14 12:53:40 +02:00
Sebastiaan van Stijn 1b3ed84535
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>
2019-06-14 12:53:34 +02:00
Sebastiaan van Stijn 85a73e440e
[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>
2019-06-14 12:53:31 +02:00
Sebastiaan van Stijn 9959062d9a
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>
2019-06-14 12:53:27 +02:00
Sebastiaan van Stijn dcc8f14cad
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>
2019-06-14 12:53:24 +02:00
Sebastiaan van Stijn a378a00954
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>
2019-06-14 12:53:21 +02:00
Sebastiaan van Stijn 534c774fab
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>
2019-06-14 12:53:18 +02:00
Ian Campbell c1c4b46f29
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>
2019-06-14 12:53:15 +02:00
Ian Campbell db7875928c
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>
2019-06-14 12:53:10 +02:00
Sebastiaan van Stijn 206ea57da8
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>
2019-06-14 12:53:07 +02:00
Kir Kolyshkin edbc0e0613
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>
2019-06-14 12:53:04 +02:00
Kir Kolyshkin dbd66addb9
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>
2019-06-14 12:53:01 +02:00
Kir Kolyshkin f9a42a4024
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>
2019-06-14 12:52:58 +02:00