Commit Graph

8151 Commits

Author SHA1 Message Date
Sebastiaan van Stijn a4ffbcd958
update AUTHORS and mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-03 12:18:51 +02:00
Sebastiaan van Stijn 9cda6ce011
Merge pull request #3641 from photra/3636-deflake-testvolumecreateclusteropts
Deflake TestVolumeCreateClusterOpts
2022-06-03 12:08:47 +02:00
Phong Tran 1d85b4d0ec
Deflake TestVolumeCreateClusterOpts
Add Secret sorting prior to request to prevent flakiness in CI

Signed-off-by: Phong Tran <tran.pho@northeastern.edu>

Co-authored-by: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>
Signed-off-by: Phong Tran <tran.pho@northeastern.edu>
2022-06-03 11:52:51 +02:00
Sebastiaan van Stijn 2119f425b6
docs: reference: version: add info about API version negotiation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-02 22:53:23 +02:00
Sebastiaan van Stijn 99bb525f98
docs: reference: version: improve description
Move the "default output" section into the description, and
describe the section that can be found in the output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-02 22:50:39 +02:00
Nicolas De loof df3c2f171d
Merge pull request #3646 from thaJeztah/update_golang_1.18.3 2022-06-02 11:45:19 +02:00
Sebastiaan van Stijn aa720f154a
update golang to 1.18.3
go1.18.3 (released 2022-06-01) includes security fixes to the crypto/rand,
crypto/tls, os/exec, and path/filepath packages, as well as bug fixes to the
compiler, and the crypto/tls and text/template/parse packages. See the Go
1.18.3 milestone on our issue tracker for details:

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

Hello gophers,

We have just released Go versions 1.18.3 and 1.17.11, minor point releases.

These minor releases include 4 security fixes following the security policy:

- crypto/rand: rand.Read hangs with extremely large buffers
  On Windows, rand.Read will hang indefinitely if passed a buffer larger than
  1 << 32 - 1 bytes.

  Thanks to Davis Goodin and Quim Muntal, working at Microsoft on the Go toolset,
  for reporting this issue.

  This is [CVE-2022-30634][CVE-2022-30634] and Go issue https://go.dev/issue/52561.
- crypto/tls: session tickets lack random ticket_age_add
  Session tickets generated by crypto/tls did not contain a randomly generated
  ticket_age_add. This allows an attacker that can observe TLS handshakes to
  correlate successive connections by comparing ticket ages during session
  resumption.

  Thanks to GitHub user nervuri for reporting this.

  This is [CVE-2022-30629][CVE-2022-30629] and Go issue https://go.dev/issue/52814.
- `os/exec`: empty `Cmd.Path` can result in running unintended binary on Windows

  If, on Windows, `Cmd.Run`, `cmd.Start`, `cmd.Output`, or `cmd.CombinedOutput`
  are executed when Cmd.Path is unset and, in the working directory, there are
  binaries named either "..com" or "..exe", they will be executed.

  Thanks to Chris Darroch, brian m. carlson, and Mikhail Shcherbakov for reporting
  this.

  This is [CVE-2022-30580][CVE-2022-30580] and Go issue https://go.dev/issue/52574.
- `path/filepath`: Clean(`.\c:`) returns `c:` on Windows

  On Windows, the `filepath.Clean` function could convert an invalid path to a
  valid, absolute path. For example, Clean(`.\c:`) returned `c:`.

  Thanks to Unrud for reporting this issue.

  This is [CVE-2022-29804][CVE-2022-29804] and Go issue https://go.dev/issue/52476.

[CVE-2022-30634]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30634
[CVE-2022-30629]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30629
[CVE-2022-30580]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30580
[CVE-2022-29804]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29804

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-02 09:22:18 +02:00
Sebastiaan van Stijn d86fce7b05
Merge pull request #3645 from thaJeztah/update_engine
info: update plugin section to show installed path
2022-06-01 16:24:01 +02:00
Sebastiaan van Stijn b9e2659a05
info: update plugin section to show installed path
This updates the pretty-print format of docker info to provide more
details on installed plugins, to help users find where a specific
plugin is installed (e.g. to update it, or to uninstall it).

Before this patch:

```bash
Client:
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.8.2)
  compose: Docker Compose (Docker Inc., v2.4.1)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
...
```

With this patch applied:

```bash
docker info

Client:
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.8.2
    Path:     /usr/local/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.4.1
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.17.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-scan

Server:
...
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-01 12:46:07 +02:00
Sebastiaan van Stijn 822b62073d
Merge pull request #3644 from thaJeztah/update_engine
vendor: github.com/docker/docker 3e32104e0e39af9019a3ea9aa7093bb7c97fcf05
2022-06-01 11:40:09 +02:00
Sebastiaan van Stijn 86a7a7aa73
vendor: github.com/docker/docker 3e32104e0e39af9019a3ea9aa7093bb7c97fcf05
syncing with latest master

full diff: cb01202de8...3e32104e0e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-01 11:15:00 +02:00
Sebastiaan van Stijn 84b86e23b7
Merge pull request #3635 from thaJeztah/update_engine
vendor: github.com/docker/docker cb01202de88e20d5699c76efe948dfb065da873f
2022-05-29 00:08:07 +02:00
Sebastiaan van Stijn 73c6231b4b
vendor: github.com/docker/docker cb01202de88e20d5699c76efe948dfb065da873f
no changes in vendored code other than a typo-fix, just aligning with latest master

8abb84c734...cb01202de8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-28 23:37:46 +02:00
Sebastiaan van Stijn 14962747e4
Merge pull request #3629 from thaJeztah/update_engine
vendor: github.com/docker/docker 8abb84c7342a19009d777ef3d871c0b2a5c032a5
2022-05-20 18:36:59 +02:00
Sebastiaan van Stijn baafc8f286
vendor: github.com/docker/docker 8abb84c7342a19009d777ef3d871c0b2a5c032a5
no changes in vendored code, just aligning to latest master

full diff: d633169483...8abb84c734

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-20 18:10:05 +02:00
Sebastiaan van Stijn 098a5d08a0
Merge pull request #3625 from thaJeztah/update_engine
vendor: github.com/docker/docker d633169483bbe22b92b8310c47e827451b594364
2022-05-19 23:48:18 +02:00
Sebastiaan van Stijn d945856e68
vendor: github.com/docker/docker d633169483bbe22b92b8310c47e827451b594364
Notable changes:

- introduce CreateMountpoint for parity between binds and mounts

full diff: c9d04033d4...d633169483

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-19 23:12:08 +02:00
Nicolas De loof 0e4dde2487
Merge pull request #3623 from thaJeztah/update_engine 2022-05-19 12:24:30 +02:00
Sebastiaan van Stijn 8378b4277d
vendor: github.com/docker/docker c9d04033d443e359e73e5da58a6b46ec1b8f2373
Updating to latest master

full diff: f1dd6bf84e...c9d04033d4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-19 11:56:35 +02:00
Sebastiaan van Stijn 557e6a6793
Merge pull request #3619 from vvoland/3554-initial-console-size
cli/container: Fill ConsoleSize in create
2022-05-18 13:28:18 +02:00
Paweł Gronowski 6d3bda1e7c cli/container: Move filling ConsoleSize to create
This makes the containers have an expected console size not only for
`run` but also for `create`.  Also remove the comment, as this is no
longer ignored on Linux daemon since e994efcf64c133de799f16f5cd6feb1fc41fade4

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2022-05-18 12:56:32 +02:00
Sebastiaan van Stijn b6aa28b6c7
Merge pull request #2907 from ollypom/stack-deploy-swarm-jobs
Added Swarm Job support to Stack Deploy
2022-05-17 22:58:25 +02:00
ollypom 3997f3431f
Added Swarm Job support to Stack Deploy
Added the support for both `global-job` and `replicated-job` to Docker
stack deploy.

Signed-off-by: ollypom <oppomeroy@gmail.com>
2022-05-17 22:30:22 +02:00
Sebastiaan van Stijn 7f073ab823
Merge pull request #3606 from thaJeztah/carry_csi_volumes
Proposed Cluster (CSI) Volume Command (rebase)
2022-05-17 18:43:16 +02:00
Sebastiaan van Stijn b655203b06
Merge pull request #3614 from thaJeztah/signal_options
add --signal option to stop and restart
2022-05-17 14:31:26 +02:00
Sebastiaan van Stijn e55151fb7c
Merge pull request #3612 from thaJeztah/daemon_cluster_opts
remove documentation and completion for deprecated legacy overlay networks
2022-05-17 14:30:49 +02:00
Nicolas De loof 2c9626096d
Merge pull request #3615 from thaJeztah/update_version 2022-05-17 12:17:00 +02:00
Sebastiaan van Stijn 77e8c6f682
Update version to 22.06.0-dev
We should consider removing this file, but it's still used in some
scripts, so let's keep that one for later.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 11:41:40 +02:00
Sebastiaan van Stijn a1c4af7648
docs/deprecated: update version to 22.06
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 11:41:21 +02:00
Sebastiaan van Stijn 86c30e6a0d
add --signal option to stop and restart
Wording and documentation still need to be updated, but will do
so in a follow-up.

Also removing the default "10 seconds" from the timeout flags, as
this default is not actually used, and may not match the actual
default (which is defined on the daemon side).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 11:35:16 +02:00
Sebastiaan van Stijn 5eb24bfd11
completion: remove options related to deprecated cluster-store
This removes completion for flags related to legacy overlay networks using
an external k/v store.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 11:03:25 +02:00
Sebastiaan van Stijn 1fafae3efc
info: remove cluster store from docker info output
This removes the cluster store information from the output of "docker info".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 11:01:49 +02:00
Sebastiaan van Stijn 28e2b92b58
docs: remove documentation about deprecated cluster-store
This removes documentation related to legacy overlay networks using
an external k/v store.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 11:00:51 +02:00
Sebastiaan van Stijn 7236f78242
man: use "console" hints in markdown
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 10:45:43 +02:00
Sebastiaan van Stijn 53f8ed4bec
Merge pull request #3608 from thaJeztah/formatstats_optimize
Small performance optimizations for formatting stats
2022-05-17 10:10:14 +02:00
Sebastiaan van Stijn e1556de337
Merge pull request #3607 from thaJeztah/remove_redundant_nolints
lint: update some nolint comments:
2022-05-17 10:09:36 +02:00
Brian Goff 2c92c535f8
Merge pull request #3609 from thaJeztah/no_more_chickens
remove unused poule.yml
2022-05-14 08:05:50 -07:00
Sebastiaan van Stijn a7c8cb514a
remove unused poule.yml
this bot is no longer running

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 22:01:51 +02:00
Sebastiaan van Stijn a2e9ed3b87
cli/command/container: use RWMutex for stats to allow concurrent reads
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 21:39:03 +02:00
Sebastiaan van Stijn 34dd43bf1b
cli/command/container: some small performance optimizations for formatting stats
Formatting stats runs in a loop to refresh the stats for each container. This
patch makes some small performance improvments by reducing the use of Sprintf
in favor of concatenating strings, and using strconv directly where possible.

Benchmark can be run with:

    GO111MODULE=off go test -test.v -test.bench '^BenchmarkStatsFormat' -test.run '^$' ./cli/command/container/

Before/after:

    BenchmarkStatsFormatOld-8 	    2655	    428064 ns/op	   62432 B/op	    5600 allocs/op
    BenchmarkStatsFormat-8   	    3338	    335822 ns/op	   52832 B/op	    4700 allocs/op

Average of 5 runs;

    benchstat old.txt new.txt
    name           old time/op    new time/op    delta
    StatsFormat-8     432µs ± 1%     344µs ± 5%  -20.42%  (p=0.008 n=5+5)

    name           old alloc/op   new alloc/op   delta
    StatsFormat-8    62.4kB ± 0%    52.8kB ± 0%  -15.38%  (p=0.000 n=5+4)

    name           old allocs/op  new allocs/op  delta
    StatsFormat-8     5.60k ± 0%     4.70k ± 0%  -16.07%  (p=0.008 n=5+5)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 21:38:06 +02:00
Sebastiaan van Stijn 7bcc03d972
cli/command/container: add BenchmarkStatsFormat()
To test:

    GO111MODULE=off go test -test.v -test.bench '^BenchmarkStatsFormat' -test.run '^$' ./cli/command/container/
    goos: darwin
    goarch: amd64
    pkg: github.com/docker/cli/cli/command/container
    cpu: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
    BenchmarkStatsFormat
    BenchmarkStatsFormat-8   	    2482	    522721 ns/op	   62439 B/op	    5600 allocs/op
    PASS
    ok  	github.com/docker/cli/cli/command/container	1.369s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 21:26:38 +02:00
Sebastiaan van Stijn 868adb13c6
lint: update some nolint comments:
```
cli/command/container/hijack.go:188:1⚠️ nolint directive did not match any issue (nolint)
cli/command/image/trust.go:346:1⚠️ nolint directive did not match any issue (nolint)
cli/command/manifest/push.go:211:1⚠️ nolint directive did not match any issue (nolint)
cli/command/trust/signer_remove.go:79:1⚠️ nolint directive did not match any issue (nolint)
internal/pkg/containerized/snapshot.go:95:1⚠️ nolint directive did not match any issue (nolint)
internal/pkg/containerized/snapshot.go:138:1⚠️ nolint directive did not match any issue (nolint)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 20:50:19 +02:00
Sebastiaan van Stijn 0fab8ecf36
volume: annotate cluster-volumes flags for API version and swarm
This hides the flags when connecting to an older engine, or if
swarm is not enabled, and is also used to add badges in the
documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 20:22:38 +02:00
Drew Erny 3455580ebc
Add cluster volume support
- Write test for cluster volumes
- Add inspect test, add update command
- Add cluster volume opts to create
- Add requisite and preferred topology flags
- volume: move cluster bool in opts

Signed-off-by: Drew Erny <derny@mirantis.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 20:06:11 +02:00
Sebastiaan van Stijn d0df532a25
Merge pull request #3605 from thaJeztah/update_engine
vendor: github.com/docker/docker f1dd6bf84e28930e1ccd903361f9284fb22d3b8a
2022-05-13 16:41:25 +02:00
Sebastiaan van Stijn 9bf28fc003
vendor: github.com/docker/docker f1dd6bf84e28930e1ccd903361f9284fb22d3b8a
full diff: 7c69b6dc08...f1dd6bf84e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 14:44:41 +02:00
Sebastiaan van Stijn ec37bfb245
Merge pull request #3583 from thaJeztah/update_tests
TestSaveFileToDirs: use filepath.Join()
2022-05-13 11:46:06 +02:00
Sebastiaan van Stijn 55de347230
Merge pull request #3271 from thaJeztah/kill_canonical_signal_name
docker kill: don't set default signal on the client side
2022-05-13 11:06:23 +02:00
Sebastiaan van Stijn 20138a81bc
docker kill: don't set default signal on the client side
The default signal is already determined by the daemon, so the
CLI should not send a signal.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 10:10:17 +02:00
Sebastiaan van Stijn 1b922a47c1
Merge pull request #3603 from thaJeztah/completion_follow_ups
completion v2: some small follow-ups
2022-05-12 18:19:37 +02:00