Commit Graph

6780 Commits

Author SHA1 Message Date
Sebastiaan van Stijn c4798a9daa
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>
2020-04-19 19:51:12 +02:00
Silvin Lubecki ae66898200
Merge pull request #2424 from thaJeztah/lazy_feature_detection
cli: perform feature detection lazily
2020-04-15 16:42:26 +02:00
Silvin Lubecki a2ce18b64d
Merge pull request #2443 from thaJeztah/add_host_gateway_to_tests
Add "host-gateway" to tests for extra_hosts / --add-host
2020-04-15 10:17:22 +02:00
Sebastiaan van Stijn f88ae74135
Add "host-gateway" to tests for extra_hosts / --add-host
67ebcd6dcf added an exception for
the "host-gateway" magic value to the validation rules, but didn't
add thise value to any of the tests.

This patch adds the magic value to tests, to verify the validation
is skipped for this magic value.

Note that validation on the client side is "optional" and mostly
done to provide a more user-friendly error message for regular
values (IP-addresses).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-15 09:52:55 +02:00
Silvin Lubecki 42f5b8a3e1
Merge pull request #2434 from thaJeztah/opts_consts
opts: use constants instead of vars for defaults and un-export them
2020-04-14 17:40:50 +02:00
Tibor Vass 5a600477c9
Merge pull request #2418 from thaJeztah/update_go_events
vendor: update go-events to fix alignment for 32bit systems
2020-04-10 17:05:00 -07:00
Sebastiaan van Stijn 96e1d1d642
Merge pull request #2415 from AkihiroSuda/stats-memory-cache
calculateMemUsageUnixNoCache: subtract total_inactive_file, not cache
2020-04-11 01:47:03 +02:00
Akihiro Suda a4a07c6430 calculateMemUsageUnixNoCache: subtract total_inactive_file, not cache
The new stat definition corresponds to containerd/CRI and cadvisor.

c1115d4e57/pkg/server/container_stats_list_unix.go (L106-L129)
307d1b1cb3

Fix https://github.com/moby/moby/issues/40727

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-04-11 08:13:21 +09:00
Sebastiaan van Stijn 84c23a6ddf
Merge pull request #2430 from thaJeztah/bump_golang_1.13.10
Bump Golang 1.13.10
2020-04-10 17:56:22 +02:00
Sebastiaan van Stijn 5661cc0de5
vendor: update go-events to fix alignment for 32bit systems
- relates to moby/buildkit 1111
- relates to moby/buildkit 1079
- relates to docker/buildx 129

full diff: 9461782956...e31b211e4f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-10 16:39:37 +02:00
Sebastiaan van Stijn b39739123b
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>
2020-04-10 16:33:21 +02:00
Sebastiaan van Stijn a88a1bea23
docker build: check experimental --platform on pre-run
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-10 16:33:15 +02:00
Sebastiaan van Stijn fa11032a33
opts: use constants instead of vars for defaults and un-export them
These options should never be changed, so using a const for them
instead of a var. Given that these are only used in the opt
package itself, they can be un-exported.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-10 16:22:21 +02:00
Sebastiaan van Stijn 6875390131
Bump Golang 1.13.10
go1.13.10 (released 2020/04/08) includes fixes to the go command, the runtime,
os/exec, and time packages. See the Go 1.13.10 milestone on the issue tracker
for details:

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

full diff: https://github.com/golang/go/compare/go1.13.9...go1.13.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-09 22:25:39 +02:00
Silvin Lubecki ad256ba023
Merge pull request #2426 from thaJeztah/fix_test_env
test: make sure environment vars are reset after tests
2020-04-09 17:39:24 +02:00
Silvin Lubecki 5d6281b876
Merge pull request #2427 from thaJeztah/skip_TestHistoryContext_CreatedSince
TestHistoryContext_CreatedSince: skip on non-UTC environments
2020-04-09 17:38:26 +02:00
Silvin Lubecki ab7a18147f
Merge pull request #2428 from thaJeztah/fix_da_fixtures
CI: update notary test certificates
2020-04-09 17:37:17 +02:00
Sebastiaan van Stijn 6bd09229a5
CI: update notary test certificates
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-09 17:09:12 +02:00
Sebastiaan van Stijn 19bcebd122
test: make sure environment vars are reset after tests
The trust tests were not resetting the environment after they
ran, which could result in tests following those tests to fail.

While at it, I also updated some other tests to use gotest.tools

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-09 13:40:45 +02:00
Sebastiaan van Stijn 650c717580
TestHistoryContext_CreatedSince: skip on non-UTC environments
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-09 13:38:52 +02:00
Silvin Lubecki 2f494e1181
Merge pull request #2417 from thaJeztah/bump_golang_1.13.9
Bump Golang 1.13.9
2020-04-06 15:39:33 +02:00
Sebastiaan van Stijn d063b835b3
Bump Golang 1.13.9
go1.13.9 (released 2020/03/19) includes fixes to the go command, tools, the
runtime, the toolchain, and the crypto/cypher package. See the Go 1.13.9
milestone on the issue tracker for details:

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

full diff: https://github.com/golang/go/compare/go1.13.8...go1.13.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-04 02:23:13 +02:00
Sebastiaan van Stijn 6e98ebc89a
Merge pull request #2410 from qckzr/patch-1
Adding missing title in builder.md
2020-03-31 20:29:46 +02:00
Hector S 7557c138d7
Adding missing title in builder.md
addresses https://github.com/docker/docker.github.io/issues/9691

Signed-off-by: hsam <hfsam88@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-31 16:14:35 +02:00
Sebastiaan van Stijn 22acbbcc4b
Merge pull request #2402 from thaJeztah/update_deprecation_policy
Update deprecation policy to 1 stable release
2020-03-20 13:06:34 +01:00
Sebastiaan van Stijn 94f513e48e
Update deprecation policy to 1 stable release
The deprecation policy was written when we had monthly releases
(edge+stable), and stable releases were released every 3 months.

The release cadence has changed to be longer than 3 months for
stable releases, so adjusting the policy accordingly.

Note that the policy continues to be "at least x releases", so
even though we _can_ remove a feature after one release, it does
not mean we _must_ remove it: announcing deprecations early helps
users migrate away from features we do not intent to support in
future.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-20 11:52:06 +01:00
Silvin Lubecki 5ec88e1107
Merge pull request #2400 from thaJeztah/deprecation_policy
Include deprecation policy on deprecated features page
2020-03-20 11:50:10 +01:00
Sebastiaan van Stijn 99443274b1
Include deprecation policy on deprecated features page
This section was included on a page on docs.docker.com, but not linked
in the navigation. Putting the section on the deprecated features page
to be sure they can be found together.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-20 11:04:02 +01:00
Silvin Lubecki 067cf509e6
Merge pull request #2397 from thaJeztah/fix_contributing_link
Fix broken link in CONTRIBUTING
2020-03-19 15:28:52 +01:00
Sebastiaan van Stijn 491470af6c
Merge pull request #2398 from thaJeztah/remove_comments
remove unneeded comment from reference files
2020-03-19 15:25:33 +01:00
Sebastiaan van Stijn f30bde6adb
remove unneeded comment from reference files
these markdown files are not consumed directly in the docs,
but only their content is included through the YAML does,
so there's no need to have these comments in them

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-19 15:15:23 +01:00
Sebastiaan van Stijn 7c87175d88
Fix broken link in CONTRIBUTING
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-19 15:03:59 +01:00
Silvin Lubecki 17a1186c2a
Merge pull request #2392 from thaJeztah/codehints_compatibility
docs: update code-hints for compatibility with "rouge"
2020-03-17 16:52:15 +01:00
Silvin Lubecki 8e1030c2f8
Merge pull request #2390 from thaJeztah/fix_yamldocs
Fix yamldocs generator to accomodate nested subcommands
2020-03-17 16:49:23 +01:00
Sebastiaan van Stijn 824a9ce64b
docs: update code-hints for compatibility with "rouge"
Unlike GitHub's web-UI, the "rouge" hightlighter used in our
online documentation is case-sensitive. As a result, code-blocks
having the Dockerfile (uppercase) code-hint were not highlighted.

This changes those to use lowercase, which is supported by both.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-17 15:01:52 +01:00
Sebastiaan van Stijn f912deeec7
Fix whitespace that caused short-format in generated YAML
If the markdown contains trailing spaces, or has tabs included,
the YAML generator uses a compact format for the text (using `\n`
and `\t`, instead of plain newlines).

The compact format makes it difficult to review changes in the
yaml docs when vendoring in the documentation repository.

This patch:

- removes trailing whitespace
- replaces tabs for spaces
- fixes some minor formatting and markdown issues

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-15 15:37:23 +01:00
Sebastiaan van Stijn e1b362847f
Fix yamldocs generator to accomodate nested subcommands
The script was written to only take subcommands at the first and second level
into account, but failed to find the Markdown files for extended descriptions of
subcommands at the third level, such as `docker trust key generate`, and
`docker trust key load`:

    WARN: /go/src/github.com/docker/cli/docs/reference/commandline/key_generate.md does not exist, skipping
    WARN: /go/src/github.com/docker/cli/docs/reference/commandline/key_load.md does not exist, skipping
    WARN: /go/src/github.com/docker/cli/docs/reference/commandline/signer_add.md does not exist, skipping
    WARN: /go/src/github.com/docker/cli/docs/reference/commandline/signer_remove.md does not exist, skipping

This patch updates the script to accomodate subcommands that are more deeply
nested. While at it, some minor cleaning and linting issues were also addressed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-15 14:30:16 +01:00
Sebastiaan van Stijn 5115bfa041
Fix naming of reference docs files
These files were intended to document the `swarm join-token` and
`swarm unlock-key` subcommands, but were incorrectly using an underscore
instead of a hyphen (`-`). As a result, the examples were not picked up
by the yamldocs generator.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-15 12:58:58 +01:00
Silvin Lubecki ef2f64abbd
Merge pull request #2387 from thaJeztah/update_shellcheck
update shellcheck v0.7.0
2020-03-12 15:15:09 +01:00
Sebastiaan van Stijn f64c1ff3cf
update shellcheck v0.7.0
full diff: https://github.com/koalaman/shellcheck/compare/v0.6.0...v0.7.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 20:59:46 +01:00
Sebastiaan van Stijn 7d407207c3
Merge pull request #2362 from silvin-lubecki/fix-windows-exentension
Add an exe extension to windows binary during cross build.
2020-03-03 17:22:55 +01:00
Brian Goff 2a2b679eb8
Merge pull request #2367 from StefanScherer/new-icon
Update Windows ico
2020-03-02 16:15:03 -08:00
Silvin Lubecki 755074e970
Merge pull request #2366 from dominikbraun/2363-remove-numeric-from-quiet-flag
Remove 'numeric' from --quiet flag description
2020-03-02 18:16:41 +01:00
Stefan Scherer b1fd38fa77
Update Windows ico
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2020-03-02 13:02:29 +01:00
Dominik Braun 9d9568263f Replace 'numeric' with object in -q description
Signed-off-by: Dominik Braun <Dominik.Braun@nbsp.de>
2020-03-02 10:28:52 +01:00
Silvin Lubecki 2298e6a3fe
Merge pull request #2337 from thaJeztah/carry_2293_add_host_gateway_dns_entry
Skip IPAddr validation for "host-gateway" string
2020-02-27 17:58:22 +01:00
Arko Dasgupta 67ebcd6dcf
Skip IPAddr validation for "host-gateway" string
Relates to - moby/moby 40007
The above PR added support in moby, that detects if
a special string "host-gateway" is added to the IP
section of --add-host, and if true, replaces it with
a special IP value (value of --host-gateway-ip Daemon flag
which defaults to the IP of the default bridge).

This PR is needed to skip the validation for the above
feature

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-27 16:21:33 +01:00
Silvin Lubecki 40aa020534 Add an exe extension to windows binary during cross build.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-02-27 15:34:23 +01:00
Silvin Lubecki c3b48c5c9c
Merge pull request #2343 from thaJeztah/fix_prune_flag_description
Fix builder prune -a/--all flag description
2020-02-26 16:22:29 +01:00
Silvin Lubecki 2e4dcacddb
Merge pull request #2360 from thaJeztah/bump_golang_1.13
Update Golang 1.13.8
2020-02-26 15:33:27 +01:00