Commit Graph

49708 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
dfe36fa226 touch-up security policy
Slightly touch-up the security policy in this repository to describe
the process in more details.

- Describe process around reporting, triage, and review.
- Describe timelines for acknowledging reports.
- Refer to supported versions / branches.

Some of this wording was adopted from containerd's policy, adjusting
where needed (e.g. the project currently does not have an embargoed
security announce list, and no formal definition of security advisors).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-02 10:01:48 +02:00
Sebastiaan van Stijn
ddea6b0fa8 Merge pull request #48278 from robmry/v6only/not_windows_or_swarm
IPv6 only: IPv4 is required for Windows and Swarm networks
2024-08-01 16:59:00 +02:00
Rob Murray
034a5a8986 Reject swarm n/w creation with IPv4 disabled.
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-08-01 14:20:27 +01:00
Rob Murray
c91dc7e6dc Reject Windows network creation with IPv4 disabled.
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-08-01 14:20:27 +01:00
Sebastiaan van Stijn
dc39e47483 Merge pull request #48283 from thaJeztah/bump_hcsshim_deps
vendor: golang.org/x/time v0.5.0, google.golang.org/grpc v1.62.0
2024-08-01 14:09:14 +02:00
Sebastiaan van Stijn
d44f869a2d vendor: google.golang.org/grpc v1.62.0
diffs:

- https://github.com/grpc/grpc-go/compare/v1.59.0...v1.62.0
- 83a465c022...ef4313101c
- https://github.com/googleapis/google-api-go-client/compare/v0.149.0...v0.155.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-01 11:12:06 +02:00
Sebastiaan van Stijn
716ec490db vendor: golang.org/x/time v0.5.0
full diff: https://github.com/golang/time/compare/v0.3.0...v0.5.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-01 11:05:22 +02:00
Sebastiaan van Stijn
bd1d35d721 Merge pull request #48279 from thaJeztah/typo_fixes
plugin, api/types: fix typos and GoDoc
2024-08-01 00:32:08 +02:00
Sebastiaan van Stijn
ac145a82fd api/types: NewHijackedResponse: fix typo in GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-31 22:42:55 +02:00
Sebastiaan van Stijn
80822715cd plugin: fix typos in GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-31 22:42:52 +02:00
Rob Murray
a43ed47441 Merge pull request #48271 from robmry/v6only/add_option_enable_ipv4
IPv6 only: add API option enable/disable IPv4
2024-07-31 19:21:42 +01:00
Rob Murray
1f542d5d6c Set EnableIPv4 for predefined networks
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-31 18:38:43 +01:00
Rob Murray
903daa4dc4 Add flag 'enableIPv4' to libnetwork.Network
Similar to EnableIPv6:
- Set it if EnableIPv4 is specified in a create request.
- Otherwise, set it if included in `default-network-opts`.
  - Apart from in a config-from network, so that it doesn't look
    like the API request set the field.
- Include the new field in  Network marshalling/unmarshalling test.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-31 18:38:43 +01:00
Rob Murray
d4d8611164 Added API create/inspect option EnableIPv4
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-31 18:38:43 +01:00
Sebastiaan van Stijn
376a699830 Merge pull request #48157 from thaJeztah/libnetwork_immutable_radix_v2
libnetwork/networkdb: switch to go-immutable-radix v2
2024-07-31 15:33:16 +02:00
Akihiro Suda
fe875a9449 Merge pull request #48272 from kolyshkin/not-mounted
hack/make: suppress "not mounted" message
2024-07-31 07:34:56 +09:00
Kir Kolyshkin
3279b4f8f4 hack/make: suppress "not mounted" message
The "not mounted" error from .integration-daemon-stop is not an error,
so let's suppress that one (this is the only effect of -q option, at
least according to its man page).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-07-30 13:39:23 -07:00
Rob Murray
a23dcf4798 Bump API version to 1.47
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-30 14:30:26 +01:00
Paweł Gronowski
89bca301be Merge pull request #46772 from neersighted/project_docs
Improve documentation around maintenance, building, and packaging
2024-07-30 10:28:20 +02:00
Sebastiaan van Stijn
0c513d2849 Merge pull request #48244 from thaJeztah/cleanup_cleanups
daemon: assorted cleanups and minor improvements
2024-07-29 19:50:28 +02:00
Sebastiaan van Stijn
4742c060a3 Merge pull request #48252 from thaJeztah/remove_oom_leftovers
libcontainerd/supervisor: remove remnants of adjusting oom-score
2024-07-29 19:08:57 +02:00
Paweł Gronowski
403f9dbc42 project: update supported release branches
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-07-29 18:10:55 +02:00
Sebastiaan van Stijn
32c33dbfd5 Merge pull request #48248 from robmry/ipv6_related_refactoring
IPv6 related refactoring
2024-07-29 17:00:31 +02:00
Sebastiaan van Stijn
47a0193470 Merge pull request #48262 from thaJeztah/gha_permissions
gha: set permissions to read-only by default
2024-07-29 16:49:18 +02:00
Albin Kerouanton
078c9afc2f Merge pull request #48247 from robmry/split_bridge_and_nat_tests
Split Linux/bridge and Windows/nat integration tests
2024-07-29 16:37:20 +02:00
Sebastiaan van Stijn
96762a28c7 libcontainerd/supervisor: remove remnants of adjusting oom-score
In docker versions before v24.0, the dockerd daemon allowed adjusting
its own oom-score; in that case we would forward the configuration to
containerd (when running as child process) for it to do the same.

This feature was deprecated in 5a922dc162,
and removed in fb96b94ed0, but some fields
were left behind in the supervisor package.

This patch removes the oomScore field and adjustOOMScore method from
the remove type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-29 16:34:16 +02:00
Sebastiaan van Stijn
6e32c2e50c Merge pull request #48263 from thaJeztah/daemon_fix_import
daemon: remove unused import
2024-07-29 16:32:02 +02:00
Sebastiaan van Stijn
2a71815b83 daemon: remove unused import
This probably broke because 2ce811e632
and 6d0b508699 were merged out of order.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-29 16:19:01 +02:00
Paweł Gronowski
92e10e8274 Merge pull request #48251 from thaJeztah/daemon_reduce_c8d_imports
daemon: isPermissibleC8dRuntimeName: use local utility to reduce c8d deps
2024-07-29 15:58:13 +02:00
Sebastiaan van Stijn
c1b7972d02 Merge pull request #48210 from thaJeztah/remove_setMayDetachMounts
daemon: remove setMayDetachMounts (set may_detach_mounts=1 on startup)
2024-07-29 15:02:42 +02:00
Sebastiaan van Stijn
9716e06845 Merge pull request #48240 from vvoland/imageservice-imageinspect
images: Extract ImageInspect from GetImage
2024-07-29 15:00:33 +02:00
Sebastiaan van Stijn
2b5ffa0b63 gha: set permissions to read-only by default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-29 14:53:38 +02:00
Sebastiaan van Stijn
7a92f21445 daemon: isPermissibleC8dRuntimeName: use local utility to reduce c8d deps
The `shim.BinaryName()` function used from containerd is part of the
"github.com/containerd/containerd/runtime/v2/shim" packaqge, which comes
with a large number of dependencies.

This patch implements a local variant of the check so that we can remove
the dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-27 00:05:57 +02:00
Sebastiaan van Stijn
2847c4b7fe libnetwork/networkdb: switch to go-immutable-radix v2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 23:11:53 +02:00
Rob Murray
fca57ac32f Split Linux/bridge and Windows/nat integration tests
Most tests in integration/networking/bridge_test.go are
skipped on Windows - and I want to add a test that uses
helpers that aren't implemented on Windows.

So, move it to bridge_linux_test.go, remove the skips
and put the couple of Windows/nat tests in their own file.
(TestPortMappedHairpin was the only dual-platform test,
it's now got two versions.)

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-26 19:06:12 +01:00
Rob Murray
ef8e2fe282 Use retErr in Endpoint.sbJoin
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-26 16:26:34 +01:00
Rob Murray
58808e7748 Remove code to update Network.enableIPv6 if false
Commit 4b9dc647 (from 2016) added this in response to a
review comment, but I don't think it can ever have worked
because n.enableIPv6 = netMap["enableIPv6"].(bool), added
in 2015, would already have panic'd if the field wasn't
stored.

In any case, it's no longer needed.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-26 16:26:34 +01:00
Rob Murray
8f1989556a Trivial tidy-up of Endpoint.assignAddress()
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-26 16:26:34 +01:00
Rob Murray
6fe26e0629 Add IPv6 to the null IPAM driver
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-26 16:26:34 +01:00
Sebastiaan van Stijn
dcf922e266 daemon: openContainerFS: log cleanup errors
These errors were unhandled; log them (at debug level for now).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 13:50:46 +02:00
Sebastiaan van Stijn
aa60f7891b daemon: openContainerFS: rename output var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 13:50:46 +02:00
Sebastiaan van Stijn
3539fef440 daemon: setupMounts: rename var that shadowed import
The cleanups var collided with the cleanups import; rename it to use
the same name as is used in the Windows implementation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 13:50:45 +02:00
Sebastiaan van Stijn
a19c2ccc7b daemon: rename "mounts" type to reduce shadowing
Use a more distinct name, so that local variables can use it. While
at it, also added GoDoc to describe its functionality.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 13:50:39 +02:00
Sebastiaan van Stijn
39c79e08e4 daemon: move sortMounts to a platform-agnostic file
The same code was used both on Linux and Windows; move it to a platform-
agnostic file so that both can use this function, which contains GoDoc
describing the functionality.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 13:50:13 +02:00
Sebastiaan van Stijn
50c3d19179 Merge pull request #48242 from thaJeztah/buildkit_fix_grpc_control_api_sizes
api/server/router/grpc: NewRouter: set correct MaxRecvMsgSize, MaxSendMsgSize
2024-07-26 13:34:44 +02:00
Sebastiaan van Stijn
08d7b56169 Merge pull request #48209 from thaJeztah/remove_deprecated_cors_headers
remove support for setting CORS headers (deprecated)
2024-07-26 12:11:20 +02:00
Sebastiaan van Stijn
cdbfae1d3e api/server/router/grpc: NewRouter: set correct MaxRecvMsgSize, MaxSendMsgSize
[buildkit@29b4b1a537][1] applied changes to `buildkitd` to set the correct
defaults, which should be 16MB, but used the library defaults. Without that
change, builds using large Dockerfiles would fail with a `ResourceExhausted`
error;

    => [internal] load build definition from Dockerfile
     => => transferring dockerfile: 896.44kB
    ERROR: failed to receive status: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (44865299 vs. 16777216)

However those changes were applied to the `buildkitd` code, which is the
daemon when running BuildKit standalone (or in a container through the
`container` driver). When running a build with the BuildKit builder compiled
into the Docker Engine, that code is not used, so the BuildKit changes did
not fix the issue.

This patch applies the same changes as were made in [buildkit@29b4b1a537][1]
to the gRPC endpoint provided by the dockerd daemon.

[1]: 29b4b1a537

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 11:15:46 +02:00
Paweł Gronowski
cd11843df8 images: Extract ImageInspect from GetImage
Remove a special `Details` parameter from the `GetImage` options and
extract its behavior to a `ImageInspect` method as it was only used by
the `/images/{name}/json` endpoint (`docker image inspect`).

This makes it easier for the containerd image service to output an image
inspect output without having to use the same data structures as the
graphdrivers.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-07-25 20:13:41 +02:00
Paweł Gronowski
951a04cc01 Merge pull request #48239 from crazy-max/update-buildkit
vendor: update buildkit to v0.15.1
2024-07-25 18:42:52 +02:00
CrazyMax
1baf8f9e60 vendor: update buildkit to v0.15.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-25 17:18:15 +02:00