Commit Graph

6608 Commits

Author SHA1 Message Date
Brian Goff dd360c7c0d
Merge pull request #2558 from tiborvass/19.03-expenv-panic
[19.03] Fix bug with panic when DOCKER_CLI_EXPERIMENTAL environment variable is incorrect
2020-05-28 13:41:25 -07:00
Tibor Vass 92b54c256a
Merge pull request #2560 from tiborvass/19.03-sshfix
[19.03] ssh: avoid setting flags through hostname
2020-05-28 13:34:20 -07:00
Tonis Tiigi 2ee7981985 ssh: avoid setting flags through hostname
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit d30970e3b1)
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-05-28 20:18:03 +00:00
Daniil Nikolenko e90b6bcb62 Fix bug with panic when DOCKER_CLI_EXPERIMENTAL environment variable is incorrect
Signed-off-by: Daniil Nikolenko <qoo2p5@gmail.com>
(cherry picked from commit cb010db830)
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-05-28 19:21:44 +00:00
Sebastiaan van Stijn 97afb72954
docs/extend: fix broken link and some markdown touch-ups
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a968359e08)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-28 17:30:32 +02:00
Sebastiaan van Stijn c280cdfd66
docs: fix broken link in dockerd.md
The Engine API docs are not available in this GitHub repository,
so linking to the docs.docker.com website instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 98a3d6a48a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-25 11:09:18 +02:00
Tibor Vass fd7874f16d
Merge pull request #2532 from thaJeztah/19.03_backport_bump_golang_1.13.11
[19.03 backport] Bump Golang 1.13.11
2020-05-20 10:43:45 -07:00
Tibor Vass a945f0e7e0
Merge pull request #2538 from silvin-lubecki/fix-version-old-engine-19-03
[19.03 backport] Fix version old engine 19 03
2020-05-20 10:35:44 -07:00
Silvin Lubecki 0f59532a1a Run e2e tests with different engine version on Jenkins
Rewrite Jenkinsfile to new declarative syntax without parallel as the e2e framework is not tailored for than (container name clash, port clash,...)

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>

(cherry picked from commit 74919d0569)
2020-05-20 19:02:21 +02:00
Silvin Lubecki 95df3499bb Add a new Makefile variable to override DockerInDocker engine version we use to run e2e tests
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 15d6565e49)
2020-05-20 18:58:28 +02:00
Silvin Lubecki 2d1476c6f0 Partially revert cf663b526a as it breaks the version negotiation with an older docker engine.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 54f766d240)
2020-05-20 18:57:39 +02:00
Sebastiaan van Stijn 936e9717ea
Bump Golang 1.13.11
full diff: https://github.com/golang/go/compare/go1.13.10...go1.13.11

go1.13.11 (released 2020/05/14) includes fixes to the compiler. See the Go 1.13.11
milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.11+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1ecca982ed)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-18 16:00:26 +02:00
Sebastiaan van Stijn ab108430b2
Merge pull request #2520 from thaJeztah/19.03_backport_markup_touch_ups
[19.03 backport] docs: more Markdown touch-ups
2020-05-11 19:24:50 +02:00
Sebastiaan van Stijn 489c7e9cda
docs: more Markdown touch-ups
- replace the "none" code-hint with "console"
- some changes in the "experimental" instructions
- reformat some notes
- reformat / re-indent JSON output to use 2 spaces (for consistency)
- split JSON outputs to separate code-block so that it can be highlighted

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4d948e468b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-11 17:57:13 +02:00
Silvin Lubecki 1705e47cdf
Merge pull request #2508 from thaJeztah/19.03_backport_config_dont_init
[19.03 backport] config: don't call homedir on init()
2020-05-11 16:27:11 +02:00
Silvin Lubecki a9a83d2e71
Merge pull request #2516 from thaJeztah/19.03_backport_bump_klog
[19.03 backport] vendor: k8s.io/klog v1.0.0-2-g4ad0115
2020-05-11 15:58:09 +02:00
Silvin Lubecki ae2012cced
Merge pull request #2518 from thaJeztah/19.03_backport_bump_pkg_errors
[19.03 backport] vendor: pkg/errors v0.9.1
2020-05-11 15:36:22 +02:00
Silvin Lubecki 052a71c4d0
Merge pull request #2509 from thaJeztah/19.03_backport_docs_fixes
[19.03 backport] documentation fixes
2020-05-11 14:40:18 +02:00
Sebastiaan van Stijn 9a57ea8869
Update some uses of errors.Cause() to errors.Is()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bb7ef2cb3a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-11 14:39:24 +02:00
Sebastiaan van Stijn 345b0e79e5
vendor: pkg/errors v0.9.1
full diff: https://github.com/pkg/errors/compare/v0.8.1...v0.9.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 082a8bd892)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-11 14:39:15 +02:00
Sebastiaan van Stijn 62a9babca6
vendor: k8s.io/klog v1.0.0-2-g4ad0115
Temporarily vendoring tip of the release-1.x branch, to address
docker context inspect being slow on Windows because this package
performs user lookup through `os.Current()` during `init()`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 466c50f939)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-10 14:25:33 +02:00
Sebastiaan van Stijn dbc73eafcb
docs: fix, and touch-up "docker context" docs
Using `/var/run/docker.sock` as docker host is invalid, and causes
an error, so adding `unix://` to it.

In addition, we document the name of the context to go after the
options, so change the order in the examples.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 803b9071e7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-09 12:51:36 +02:00
Maciej Kalisz e06fc01c1b
Update dead link and add missing info on COPY
1. Fix dead URL to [Dockerfile best practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache).
2. Add missing information about cache invalidation by `COPY`. It works in the same way as in the case of `ADD`. Informing only about the `ADD`s behavior is misleading as one can infer that these two directives differ in this regard.
3. Add missing info on RUN cache invalidation by COPY

Signed-off-by: Maciej Kalisz <maciej.d.kalisz@gmail.com>
(cherry picked from commit ef414633d6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-09 12:51:09 +02:00
Sebastiaan van Stijn 8434242c74
config: don't call homedir on init()
This patch changes the package to lazily obtain the user's home-
directory on first use, instead of when initializing the package.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8a30653ed5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-09 12:47:39 +02:00
Silvin Lubecki bef0d567ac
Merge pull request #2493 from thaJeztah/19.03_backport_update_dockerd_usage
[19.03 backport] docs: update usage output for dockerd (19.03)
2020-05-04 16:17:28 +02:00
Sebastiaan van Stijn 65c37227a9
docs: update usage output for dockerd (19.03)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d096339f41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-04 13:02:31 +02:00
Sebastiaan van Stijn 55a5ab0f0a
docs: fix order of flags in usage, and fix missing quote
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9a58504d33)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-04 12:53:20 +02:00
Tibor Vass a2d8a8a4cb
Merge pull request #2484 from thaJeztah/19.03_backport_fix_builder_link
[19.03 backport] builder: fix broken link
2020-04-30 14:47:08 -07:00
Sebastiaan van Stijn c150ba2b85
builder: fix broken link
This link was broken when generating the documentation (due to
a bug in Jekyll not converting wrapped internal links)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bc58d655c0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-30 21:48:14 +02:00
Silvin Lubecki 3929933368
Merge pull request #2457 from thaJeztah/19.03_backport_lazy_feature_detection
[19.03 backport] cli: perform feature detection lazily
2020-04-30 17:43:14 +02:00
Silvin Lubecki 62baa3ce57
Merge pull request #2471 from thaJeztah/19.03_backport_fix_bind_panic
[19.03 backport] fix panic on single-character volumes
2020-04-30 17:31:35 +02:00
Silvin Lubecki 7a2de8165b
Merge pull request #2470 from thaJeztah/19.03_backport_bump_yaml
[19.03 backport] vendor: bump gopkg.in/yaml.v2 v2.2.8
2020-04-30 17:22:21 +02:00
Sebastiaan van Stijn 0ea509c77c
Merge pull request #2481 from thaJeztah/19.03_backport_fix_run_reference_links
[19.03 backport] docs: fix links, and minor markdown touch-ups
2020-04-30 01:09:58 +02:00
Sebastiaan van Stijn 81909d70f0
docs: fix links, and minor markdown touch-ups
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 116c9a1f59)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-30 00:19:48 +02:00
Sebastiaan van Stijn cf663b526a
cli: perform feature detection lazily
- Perform feature detection when actually needed, instead of during
  initializing
- Version negotiation is performed either when making an API request,
  or when (e.g.) running `docker help` (to hide unsupported features)
- Use a 2 second timeout when 'pinging' the daemon; this should be
  sufficient for most cases, and when feature detection failed, the
  daemon will still perform validation (and produce an error if needed)
- context.WithTimeout doesn't currently work with ssh connections (connhelper),
  so we're only applying this timeout for tcp:// connections, otherwise
  keep the old behavior.

Before this change:

    time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker help &> /dev/null'
    real   0m32.919s
    user   0m0.370s
    sys    0m0.227s

    time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker context ls &> /dev/null'
    real   0m32.072s
    user   0m0.029s
    sys    0m0.023s

After this change:

    time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker help &> /dev/null'
    real   0m 2.28s
    user   0m 0.03s
    sys    0m 0.03s

    time sh -c 'DOCKER_HOST=tcp://42.42.42.41:4242 docker context ls &> /dev/null'
    real   0m 0.13s
    user   0m 0.02s
    sys    0m 0.02s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b39739123b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 17:12:23 +02:00
Sebastiaan van Stijn c44c18e088
docker build: check experimental --platform on pre-run
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a88a1bea23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 17:12:21 +02:00
Anca Iordache 25f04876d1
app-214 Load Client info in getter function
Signed-off-by: Anca Iordache <anca.iordache@docker.com>

Possible approach for client info

- split ClientInfo() into ClientInfo() and loadClientInfo()
- split ConfigFile() into ConfigFile() and loadConfigFile()
- ConfigFile() and ClientInfo() call their corresponding loadXX function
  if it has not yet been loaded; this allows them to be used before
  Initialize() was called.
- Initialize() *always* (re-)loads the configuration; this makes sure
  that the correct configuration is used when actually calling commands.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 22a5dad847)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 17:12:18 +02:00
Sebastiaan van Stijn e470eef36f
Merge pull request #2469 from thaJeztah/19.03_backport_docs
[19.03 backport] assorted docs fixes
2020-04-28 12:02:54 +02:00
Sebastiaan van Stijn 4ad65fc358
fix panic on single-character volumes
Before this change, this would cause a panic:

    docker run -it --rm -v 1:/1 alpine
    panic: runtime error: index out of range

    goroutine 1 [running]:
    github.com/docker/cli/cli/compose/loader.isFilePath(0xc42027e058, 0x1, 0x557dcb978c20)
    ...

After this change, a correct error is returned:

    docker run -it --rm -v 1:/1 alpine
    docker: Error response from daemon: create 1: volume name is too short, names should be at least two alphanumeric characters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 11869fa42a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 11:58:25 +02:00
Sebastiaan van Stijn 83d4cb9000
vendor: bump gopkg.in/yaml.v2 v2.2.8
full diff: https://github.com/go-yaml/yaml/compare/v2.2.3...v2.2.8

includes:

- go-yaml/yaml 515 Improve heuristics preventing CPU/memory abuse
- go-yaml/yaml@f90ceb4f40 Fix check for non-map alias merging in v2
    - fix for "yaml.Unmarshal crashes on "assignment to entry in nil map""
- go-yaml/yaml 543 Port stale simple_keys fix to v2
- go-yaml/yaml@1f64d6156d Fix issue in simple_keys improvements
    - fixes "Invalid simple_keys now cause panics later in decode"
- go-yaml/yaml 555 Optimize cases with long potential simple_keys

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3dfcfbb2bf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 11:55:26 +02:00
Sebastiaan van Stijn 0cfe29431c
service update: fix service create example
Service create expects the name to be passed using the
`--name` flag, not as a positional parameter

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0cd7c6aa02)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 11:47:37 +02:00
Dominik Braun 2dc593f67f
Add container_iface_prefix option to documentation
Signed-off-by: dominikbraun <braun@sternentstehung.de>
(cherry picked from commit 84a07a9977)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 11:47:16 +02:00
Silvin Lubecki d25e657341
Merge pull request #2445 from thaJeztah/19.03_backport_network_prune_improve_message
[19.03 backport] improve "network prune" output to mention custom networks only
2020-04-21 17:23:18 +02:00
Silvin Lubecki 8986e31201
Merge pull request #2456 from thaJeztah/19.03_backport_gotest_v3
[19.03 backport] bump gotest.tools v3.0.1 for compatibility with Go 1.14
2020-04-21 17:06:56 +02:00
Sebastiaan van Stijn 4fe6b837b7
bump gotest.tools v3.0.1 for compatibility with Go 1.14
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2c0e93063b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-21 16:43:18 +02:00
Sebastiaan van Stijn a8454a4d92
update vndr v0.1.1
full diff: https://github.com/LK4D4/vndr/compare/v0.1.0...v0.1.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7c54406951)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-20 22:51:22 +02:00
Sebastiaan van Stijn 950dcedd97
bump vndr v0.1.0 to support versioned import paths
With this change, go packages/modules that use versioned
import paths (github.com/foo/bar/v2), but don't use a directory
in the repository, can now be supported.

For example:

```
github.com/coreos/go-systemd/v22 v22.0.0
```

will vendor the github.com/coreos/go-systemd repository
into `vendor/github.com/coreos/go-systemd/v22`.

full diff: b177b583eb...v0.1.0

- LK4D4/vndr#79 Add more clear messages around clone failures
- LK4D4/vndr#80 add riscv64 support
- LK4D4/vndr#83 migrate bitbucket to api 2.0
    - fixes LK4D4/vndr#82 https://api.bitbucket.org/1.0/repositories/ww/goautoneg: 410 Gone
- LK4D4/vndr#86 Replace sort.Sort with sort.Strings
- LK4D4/vndr#87 support `github.com/coreos/go-systemd/v22`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7904c23df8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-20 22:51:20 +02:00
Silvin Lubecki 05ad944d13
Merge pull request #2453 from thaJeztah/19.03_backport_fixup_markdown_and_links
[19.03 backport] documentation changes
2020-04-20 14:01:29 +02:00
Sebastiaan van Stijn 0d26cbf5b7
yamldocs: add description to base command
Currently the documentation uses a special case for this command,
so adding a description to the YAML in order to remove that
special case.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c4798a9daa)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-19 19:53:33 +02:00
Sebastiaan van Stijn d4e4fa3b46
experimental/vlan-networks: markdown touch-ups
- wrap to 80-chars
- reformat notes
- add code-hints to help highlighting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 86257b0fc7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-19 19:43:09 +02:00