Commit Graph

5802 Commits

Author SHA1 Message Date
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
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
Kir Kolyshkin a13ec91543
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>
2019-06-14 12:52:55 +02:00
Sebastiaan van Stijn 278d30bceb
bump tonistiigi/fsutil 2862f6bc5ac9b97124e552a5c108230b38a1b0ca
- tonistiigi/fsutil#54 walker: allow enotdir as enoent

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-04-20 13:22:11 +02:00
Sebastiaan van Stijn 65b28186fc
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>
2019-04-20 13:19:07 +02:00
Silvin Lubecki c89750f836
Merge pull request #1795 from thaJeztah/18.09_backport_dialstdio_1736
[18.09 backport] dial-stdio: fix goroutine leakage
2019-04-02 10:26:42 +02:00
Silvin Lubecki c805ad2964
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
2019-04-02 10:24:41 +02:00
Akihiro Suda d8c6c830f8
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>
2019-04-02 00:25:24 +02:00
Simon Ferquel f89d05edcb
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>
2019-04-01 18:23:43 +02:00
Sebastiaan van Stijn 90fa621791
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>
2019-03-30 00:45:35 +01:00
Andrew Hsu e1fe8f3c45
Merge pull request #1788 from thaJeztah/18.09_backport_annotations
[18.09 backport] fix annotations on --template-driver
2019-03-28 16:50:17 -07:00
Sune Keller 356eda4028
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>
2019-03-29 00:33:02 +01:00
Simon Ferquel 85148aa3f1
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>
2019-03-29 00:32:44 +01:00
Andrew Hsu 19c0311d46
Merge pull request #1775 from thaJeztah/18.09_backport_ttyexecresize
[18.09 backport] fixes 1492: tty initial size error
2019-03-28 10:20:48 -07:00
Andrew Hsu 207ff0831d
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
2019-03-28 10:19:59 -07:00
Andrew Hsu 57b27434ea
Merge pull request #1778 from thaJeztah/18.09_bump_engine
[18.09] bump engine 200b524eff60a9c95a22bc2518042ac2ff617d07 (18.09 branch)
2019-03-27 08:28:02 -07:00
Sebastiaan van Stijn 010c234a0d
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>
2019-03-27 10:08:23 +01:00