Paweł Gronowski
a93298d4db
c8d/prune: Exclude dangling tag of the images used by containers
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:56 +02:00
Paweł Gronowski
a6d5db3f9b
c8d/softDelete: Deep copy Labels
...
So we don't override the original Labels in the passed image object.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:50 +02:00
Paweł Gronowski
2b0655a71a
c8d/softDelete: Extract ensureDanglingImage
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:47 +02:00
Paweł Gronowski
a96e6044cc
testutil/environment: Add GetTestDanglingImageId
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:45 +02:00
Sebastiaan van Stijn
647ed1d205
Merge pull request #45855 from thaJeztah/remove_overlay_cfg
...
libnetwork/drivers: remove unused "config" parameters and fields
2023-06-30 17:30:48 +02:00
Sebastiaan van Stijn
13472c6cf1
daemon/config: remove unused CommonConfig.Context
...
This field was added in f0e6e135a8
, and
from that change I suspect it was intended to store the default SELinux
mount-labels to be set on containers.
However, it was never used, so let's remove it.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 16:44:53 +02:00
Sebastiaan van Stijn
b6ad25bf5e
Merge pull request #45848 from thaJeztah/improve_fd_count
...
pkg/fileutils: GetTotalUsedFds: reduce allocations
2023-06-30 14:54:57 +02:00
Sebastiaan van Stijn
40908c5fcd
libnetwork/drivers: inline capabilities options
...
Remove the intermediate variable, and move the option closer
to where it's used, as in some cases we created the variable,
but could return with an error before it was used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 14:36:01 +02:00
Sebastiaan van Stijn
97285711f3
libnetwork/drivers/overlay: Register does not require DriverCallback
...
This function was not using the DriverCallback interface, and only
required the Registerer interface.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 14:29:30 +02:00
Sebastiaan van Stijn
a718ccd0c5
libnetwork/drivers: remove unused "config" parameters and fields
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 14:26:32 +02:00
Sebastiaan van Stijn
d547477bc2
Merge pull request #45851 from thaJeztah/gha_fix_missing_daemonjson
...
gha: don't fail if no daemon.json is present
2023-06-30 11:01:59 +02:00
Sebastiaan van Stijn
264dbad43a
gha: don't fail if no daemon.json is present
...
CI failed sometimes if no daemon.json was present:
Run sudo rm /etc/docker/daemon.json
sudo rm /etc/docker/daemon.json
sudo service docker restart
docker version
docker info
shell: /usr/bin/bash -e {0}
env:
DESTDIR: ./build
BUILDKIT_REPO: moby/buildkit
BUILDKIT_TEST_DISABLE_FEATURES: cache_backend_azblob,cache_backend_s3,merge_diff
BUILDKIT_REF: 798ad6b0ce9f2fe86dfb2b0277e6770d0b545871
rm: cannot remove '/etc/docker/daemon.json': No such file or directory
Error: Process completed with exit code 1.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:50:42 +02:00
Sebastiaan van Stijn
ec79d0fc05
pkg/fileutils: GetTotalUsedFds(): use fast-path for Kernel 6.2 and up
...
Linux 6.2 and up (commit [f1f1f2569901ec5b9d425f2e91c09a0e320768f3][1])
provides a fast path for the number of open files for the process.
From the [Linux docs][2]:
> The number of open files for the process is stored in 'size' member of
> `stat()` output for /proc/<pid>/fd for fast access.
[1]: f1f1f25699
[2]: https://docs.kernel.org/filesystems/proc.html#proc-pid-fd-list-of-symlinks-to-open-files
This patch adds a fast-path for Kernels that support this, and falls back
to the slow path if the Size fields is zero.
Comparing on a Fedora 38 (kernel 6.2.9-300.fc38.x86_64):
Before/After:
go test -bench ^BenchmarkGetTotalUsedFds$ -run ^$ ./pkg/fileutils/
BenchmarkGetTotalUsedFds 57264 18595 ns/op 408 B/op 10 allocs/op
BenchmarkGetTotalUsedFds 370392 3271 ns/op 40 B/op 3 allocs/op
Note that the slow path has 1 more file-descriptor, due to the open
file-handle for /proc/<pid>/fd during the calculation.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:58 +02:00
Sebastiaan van Stijn
eaa9494b71
pkg/fileutils: GetTotalUsedFds: reduce allocations
...
Use File.Readdirnames instead of os.ReadDir, as we're only interested in
the number of files, and results don't have to be sorted.
Before:
BenchmarkGetTotalUsedFds-5 149272 7896 ns/op 945 B/op 20 allocs/op
After:
BenchmarkGetTotalUsedFds-5 153517 7644 ns/op 408 B/op 10 allocs/op
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:58 +02:00
Sebastiaan van Stijn
03390be5fa
pkg/fileutils: add BenchmarkGetTotalUsedFds
...
go test -bench ^BenchmarkGetTotalUsedFds$ -run ^$ ./pkg/fileutils/
goos: linux
goarch: arm64
pkg: github.com/docker/docker/pkg/fileutils
BenchmarkGetTotalUsedFds-5 149272 7896 ns/op 945 B/op 20 allocs/op
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:57 +02:00
Sebastiaan van Stijn
252e94f499
pkg/fileutils: GetTotalUsedFds(): don't pretend to support FreeBSD
...
Commit 8d56108ffb
moved this function from
the generic (no build-tags) fileutils.go to a unix file, adding "freebsd"
to the build-tags.
This likely was a wrong assumption (as other files had freebsd build-tags).
FreeBSD's procfs does not mention `/proc/<pid>/fd` in the manpage, and
we don't test FreeBSD in CI, so let's drop it, and make this a Linux-only
file.
While updating also dropping the import-tag, as we're planning to move
this file internal to the daemon.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:51 +02:00
Sebastiaan van Stijn
3229517b2c
Merge pull request #45816 from laurazard/fix-non-default-platform-images
...
c8d/images: handle images without manifests for default platform
2023-06-29 20:54:06 +02:00
Sebastiaan van Stijn
b8ac06d9d1
Merge pull request #45844 from moby/maintainers_email
...
MAINTAINERS: update my email; AUTHORS,.mailmap: update with recent contributors
2023-06-29 18:05:26 +02:00
Bjorn Neergaard
7747327561
AUTHORS,.mailmap: update with recent contributors
...
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-06-29 08:22:14 -06:00
Bjorn Neergaard
60d2eeaa5b
MAINTAINERS: update my email
...
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-06-29 08:13:41 -06:00
Brian Goff
14de8ba4ea
Merge pull request #44741 from crazy-max/rm-apt-mirror
2023-06-29 07:11:41 -07:00
Bjorn Neergaard
46cf8cecc8
Merge pull request #43169 from thaJeztah/use_gofumpt
...
Format code with gofumpt
2023-06-29 06:23:52 -06:00
Akihiro Suda
fc7a3befda
Merge pull request #45823 from thaJeztah/bump_swarmkit
...
vendor: github.com/moby/swarmkit/v2 v2.0.0-20230627115642-ad0f3ae162fa
2023-06-29 08:33:29 +09:00
Sebastiaan van Stijn
a2154e1249
Merge pull request #45836 from neersighted/ctn-build-extra
...
docs: document more buildx targets
2023-06-29 00:38:59 +02:00
Sebastiaan van Stijn
a764cd5a40
pkg/chrootarchive: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:33:03 +02:00
Sebastiaan van Stijn
210932b3bf
daemon: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:33:03 +02:00
Sebastiaan van Stijn
e236994b76
daemon/snapshotter: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:32:38 +02:00
Sebastiaan van Stijn
9213e35011
daemon/containerd: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:54 +02:00
Sebastiaan van Stijn
4b3900a257
daemon/logger: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:53 +02:00
Sebastiaan van Stijn
050de1e4f6
daemon/logger/journald: format code with gofumpt
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:53 +02:00
Sebastiaan van Stijn
a083677af2
daemon/logger/local: format code with gofumpt
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:53 +02:00
Sebastiaan van Stijn
74db0e9339
daemon/logger/loggertest: format code with gofumpt
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:53 +02:00
Sebastiaan van Stijn
48124bac18
daemon/logger/loggerutils: format code with gofumpt
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:53 +02:00
Sebastiaan van Stijn
011a32a4ad
daemon/logger/gelf: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:52 +02:00
Sebastiaan van Stijn
7ed5a30b5c
daemon/logger/splunk: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:52 +02:00
Sebastiaan van Stijn
bb5a1eb99d
daemon/logger/jsonfilelog: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:52 +02:00
Sebastiaan van Stijn
1437037ed2
daemon/logger/awslogs: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:52 +02:00
Sebastiaan van Stijn
f930559076
pkg/stdcopy: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:52 +02:00
Sebastiaan van Stijn
1216328c2d
pkg/plugins: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:52 +02:00
Sebastiaan van Stijn
651086d1d9
pkg/jsonmessage: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:51 +02:00
Sebastiaan van Stijn
1291bbfa50
pkg/capabilities: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:51 +02:00
Sebastiaan van Stijn
79af23e1ea
pkg/ioutils: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:51 +02:00
Sebastiaan van Stijn
ac1514abf4
reference: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:51 +02:00
Sebastiaan van Stijn
99968eec3f
restartmanager: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:51 +02:00
Sebastiaan van Stijn
f18ac2d0bc
quota: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:50 +02:00
Sebastiaan van Stijn
b2663a0f73
layer: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:50 +02:00
Sebastiaan van Stijn
83b2daca6a
plugin: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:50 +02:00
Sebastiaan van Stijn
169fab5146
profiles/seccomp: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:50 +02:00
Sebastiaan van Stijn
4175a550fd
libcontainerd: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:50 +02:00
Sebastiaan van Stijn
091991606a
opts: format code with gofumpt
...
Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:49 +02:00