Silvin Lubecki
2441946ce7
cli/compose/convert/service_test.go:274:72: unnecessary conversion (unconvert)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit c237379167
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:42 +01:00
Silvin Lubecki
03dbef8931
cli/command/trust/sign_test.go:119:70: unnecessary conversion (unconvert)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 0153624a56
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:41 +01:00
Silvin Lubecki
315715e145
Disable unparam linter: e2e/image/push_test.go:299:27: `withNotaryPassphrase` - `pwd` always receives `"foo"` (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit f123e43c1f
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:41 +01:00
Silvin Lubecki
c749704b83
Disable unparam linter: cli/required.go:102:16: `pluralize` - `word` always receives `"argument"` (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 7d823438bb
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:40 +01:00
Sebastiaan van Stijn
b49a07b63d
compose/loader: define type for transformer-functions
...
Also explicitly type transformer-functions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9118b2b2b8
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:40 +01:00
Silvin Lubecki
c77f5255a4
disable unparam linter on these functions, as we need an error in these function signatures
...
cli/compose/loader/loader.go:756:66: transformServiceNetworkMap - result 1 (error) is always nil (unparam)
cli/compose/loader/loader.go:767:67: transformStringOrNumberList - result 1 (error) is always nil (unparam)
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6eb0c9c613
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:39 +01:00
Silvin Lubecki
67a7fe0b3b
cli/compose/convert: result 1 (error) is always nil (unparam)
...
cli/compose/convert/service.go:592:76: convertDNSConfig - result 1 (error) is always nil (unparam)
cli/compose/convert/service.go:538:110: convertEndpointSpec - result 1 (error) is always nil (unparam)
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d640f44df3
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:38 +01:00
Silvin Lubecki
9ac043bc9d
cli/command/system/info.go:116:68: prettyPrintClientInfo - result 0 (error) is always nil (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 47741f81d1
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:38 +01:00
Silvin Lubecki
7db8c83e3a
cli/command/stack/kubernetes/deploy_test.go:65:68: `checkOwnerReferences` - `stackName` always receives `"test"` (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit a3c7cb4f12
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:37 +01:00
Silvin Lubecki
a1f67cc029
cli/command/plugin/list_test.go:61:31: `TestList$1` - `filter` is unused (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit ab1aeedb27
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:37 +01:00
Silvin Lubecki
a3912a4713
cli/command/image/build_session.go:133:45: getBuildSharedKey - result 1 (error) is always nil (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 75c60c1af7
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:36 +01:00
Silvin Lubecki
20ae2a6c4e
cli/command/image/build_buildkit.go:450:56: parseSSH - result 1 (error) is always nil (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 28ac2f82c6
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:36 +01:00
Silvin Lubecki
9c7b701de5
cli/command/image/build/context_test.go:252:71: `createTestTempFile` - `perm` always receives `0777` (`511`) (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 0ce2eae5a2
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:35 +01:00
Silvin Lubecki
6f91e46b7b
cli/command/image/build/context_test.go:244:38: `createTestTempDir` - `dir` always receives `""` (unparam)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 70bd64d037
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:35 +01:00
Silvin Lubecki
1f3468bb77
unchecked errors
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit e1c0c7979e
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:34 +01:00
Silvin Lubecki
c8c14206aa
cli/command/container/attach.go:141:15: nilness: impossible condition: nil != nil (govet)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 584da37756
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:33 +01:00
Silvin Lubecki
7d9b95d7ec
opts/ulimit_test.go:11:13: composites: `*github.com/docker/cli/vendor/github.com/docker/go-units.Ulimit` composite literal uses unkeyed fields (govet)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit b3d4c6aac7
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:33 +01:00
Silvin Lubecki
0f72909216
cli/compose/types/types.go:106:2: structtag: struct field tag `yaml:",inline", json:"-"` not compatible with reflect.StructTag.Get: key:"value" pairs not separated by spaces (govet)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 1bfe81318d
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:32 +01:00
Silvin Lubecki
66b760d2b1
cli/registry/client/fetcher.go:106:9: nilness: impossible condition: nil != nil (govet)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 5ceed3059f
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:31 +01:00
Silvin Lubecki
c83334119c
cli/command/container/start.go:157:20: nilness: nil dereference in type assertion (govet)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 9afeb6f432
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:31 +01:00
Silvin Lubecki
cdc9d1095b
cli/command/stack/kubernetes/list.go:32:47: nilness: tautological condition: non-nil != nil (govet)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 85cfd4e518
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:30 +01:00
Silvin Lubecki
fe1a85f1e9
cli/command/trust/key_generate.go:112:9: nilness: impossible condition: nil != nil (govet)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit f5e8387067
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:29 +01:00
Silvin Lubecki
60aa890a06
SA1019: httputil.ErrPersistEOF is deprecated: No longer used. (staticcheck)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 3a428202bf
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:29 +01:00
Silvin Lubecki
49ff9c82db
cli/command/container/stats.go:211:21: SA1015: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (staticcheck)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 7da9360477
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:28 +01:00
Silvin Lubecki
1ed4e67b34
cli/command/trust/inspect_pretty_test.go:399:24: SA4010: this result of append is never used, except maybe in other appends (staticcheck)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 8018a850cb
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:27 +01:00
Silvin Lubecki
ad7bd8235f
opts/throttledevice.go:51:5: SA4003: unsigned values are never < 0 (staticcheck)
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 296297190c
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:26 +01:00
Sebastiaan van Stijn
b71d5e32cd
compose/loader: fix TestIsAbs not testing all combinations
...
This test was intending to run all tests, but didn't, which was
caught by golangci-lint;
cli/compose/loader/windows_path_test.go:46:17: SA4010: this result of append is never used, except maybe in other appends (staticcheck)
tests := append(isabstests, winisabstests...)
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0a21de05d2
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:16:21 +01:00
Sebastiaan van Stijn
3bc713c157
Gometalinter: raise deadline to 3 minutes
...
Looks like we're just on the edge of the deadline, and it's sometimes
failing;
```
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)
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)
WARNING: deadline exceeded by linter interfacer (try increasing --deadline)
Exited with code 3
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3e78cbc021
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:12:59 +01:00
Sebastiaan van Stijn
d85a3b265c
gometalinter: fix configuration
...
The configuration abused "Exclude" to exclude file-paths by filtering
on the output, however, the `Skip` option was designed for that, whereas
`Exclude` is for matching warnings.
An explicit "Skip" was added for "vendor", because even though the vendor
directory should already be ignored by the linter, in some situations,
it still seemed to warn on issues, so let's explicitly ignore it.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 71e525f74f
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:12:45 +01:00
Silvin Lubecki
08b5f63b0e
Merge pull request #2222 from thaJeztah/19.03_backport_fix_docker_cp_npe
...
[19.03 backport] docker cp: prevent NPE when failing to stat destination
2019-12-10 10:53:34 +01:00
Sebastiaan van Stijn
c2d4bd4ec2
docker cp: prevent NPE when failing to stat destination
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 585ec4da97
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-10 09:36:13 +01:00
Tibor Vass
2fa69baf8d
cp: allow trailing slash in non-existant destination
...
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 26dbc3226c
)
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-11-12 17:26:32 +00:00
Djordje Lukic
e3657b0a8c
Add interpolation type cast for max_replicas_per_node
...
Fixes https://github.com/docker/app/issues/688
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
(cherry picked from commit cb29ef6c6d
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-11-05 13:15:57 -08:00
Andrew Hsu
99c5edceb4
Merge pull request #2177 from thaJeztah/19.03_backport_fix_sig_proxy
...
[19.03 backport] Do not disable sig-proxy when using a TTY
2019-11-04 16:55:15 -08:00
Andrew Hsu
ad6c667034
Merge pull request #2178 from thaJeztah/19.03_backport_docs_updates
...
[19.03 backport] docs updates
2019-10-29 16:36:30 -07:00
Andrew Hsu
5cef8fc8e5
Merge pull request #2176 from thaJeztah/19.03_backport_completion
...
[19.03 backport] completion script updates and fixes
2019-10-29 16:36:23 -07:00
Daniel Helfand
9597e681cb
update Jenkins Build Status urls for README
...
Signed-off-by: danielhelfand <helfand.4@gmail.com>
(cherry picked from commit 46f3f9ac04
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:27:54 +01:00
Brandon Mitchell
c050ae7fb1
Adjusting glossary reference and clarrifying the start of a Dockerfile
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
(cherry picked from commit 937ce69b42
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:27:42 +01:00
Adrian Plata
aa45ea366c
Minor formatting changes and a typo fix.
...
Signed-off-by: Adrian Plata <adrian.plata@docker.com>
(cherry picked from commit ba7ec36de2
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:27:28 +01:00
Daniel Artine
df5c7130df
Updating deprecated command example in search.md
...
--stars example is deprecated. Changing to --filter=stars=5
Signed-off-by: danielartine <daniel.artine@ufrj.br>
(cherry picked from commit bba0a4d5ac
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:26:32 +01:00
Odin Ugedal
a90e5598a4
Fix phrasing when referring to the freezer cgroup
...
Signed-off-by: Odin Ugedal <odin@ugedal.com>
(cherry picked from commit a0dd6e025d
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:26:20 +01:00
Daniel Cassidy
66f8d279c1
builder.md: Correct copy/paste error
...
Signed-off-by: Daniel Cassidy <mail@danielcassidy.me.uk>
(cherry picked from commit e9ada56a88
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:26:09 +01:00
Forest Johnson
c4e5fd7e53
Explain -s flag on docker ps
...
https://github.com/docker/docker.github.io/issues/1520#issuecomment-467971886
Signed-off-by: Forest Johnson <fjohnson@peoplenetonline.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f7ab2987c3
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:25:56 +01:00
Kir Kolyshkin
149f69ca06
TestSigProxyWithTTY: fix
...
exec.CombinedOutput should not be used here because:
- it redirects cmd Stdout and Stderr and we want it to be the tty
- it calls cmd.Run which we already did
While at it
- use pty.Start() as it is cleaner
- make sure we don't leave a zombie running, by calling Wait() in defer
- use test.Name() for containerName
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit bc4ed69a23
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:20:53 +01:00
Sebastiaan van Stijn
79f5dbcd55
Add test for --sig-proxy with a TTY
...
Add a test to verify that killing the docker CLI forwards
the signal to the container. Test-case for moby/moby 28872
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7cf1a8d4c9
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:19:30 +01:00
Sebastiaan van Stijn
137b3cc89e
Do not disable sig-proxy when using a TTY
...
This partially reverts e0b59ab52b
,
and does not automatically disable proxying signals in TTY-mode
Before this change:
------------------------------------
Start a container with a TTY in one shell:
```
docker run -it --init --name repro-28872 busybox sleep 30
```
then, in another shell, kill the docker cli:
```
kill `pgrep -f repro-28872`
```
Notice that the CLI was killed, but the signal not forwarded to the container;
the container continues running
```
docker container inspect --format '{{ .State.Status }}' repro-28872
running
docker container rm -f repro-28872
```
After this change:
------------------------------------
Start a container with a TTY in one shell:
```
docker run -it --init --name repro-28872 busybox sleep 30
```
then, in another shell, kill the docker cli:
```
kill `pgrep -f repro-28872`
```
Verify that the signal was forwarded to the container, and the container exited
```
docker container inspect --format '{{ .State.Status }}' repro-28872
exited
docker container rm -f repro-28872
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ee29504923
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:19:21 +01:00
Harald Albers
57332bcea3
Add bash completion for `builder build` options
...
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit cd9b39fc52
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:11:42 +01:00
Trapier Marshall
2fe281d170
Add bash completion for `builder build`
...
Signed-off-by: Trapier Marshall <trapier.marshall@docker.com>
(cherry picked from commit 86ae871e0a
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:11:28 +01:00
Morten Hekkvang
69f0132397
Fix erroneous space indentation of shell script
...
Signed-off-by: Morten Hekkvang <morten.hekkvang@sbab.se>
(cherry picked from commit fc19fb6d95
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:11:15 +01:00
Morten Hekkvang
9447d7431b
Move filtering to __docker_complete_services, as suggested by @albers
...
Signed-off-by: Morten Hekkvang <morten.hekkvang@sbab.se>
(cherry picked from commit 6ebcc211a7
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:11:13 +01:00