Commit Graph

3977 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
f39409f80d Merge pull request #48078 from vvoland/c8d-buildkit-tag-event
c8d/build: Log `image tag` event when image was built with Buildkit
2024-07-18 21:46:49 +02:00
Paweł Gronowski
7f04a603f6 docs/api: Add missing `
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-07-11 14:24:25 +02:00
Akihiro Suda
1205a90733 Merge pull request #47142 from thaJeztah/migrate_to_platforms_module
vendor: github.com/containerd/containerd v1.7.19, migrate to github.com/containerd/platforms module
2024-07-04 10:59:16 +09:00
Sebastiaan van Stijn
fb18966aa5 api/types/container: InspectResponse: keep old name for embedded type
This is a follow-up to 1abc8f6158, which
moved the ContainerJSONBase to api/types/container, but also renamed it
to container.InspectBase. This field is embedded into the InspectResponse
type, which meant that renaming the type also implicitly renamed the
field when creating this type from a struct-literal.

While we're planning to merge these types (which would be a breaking
change for users constructing it through struct-literals), let's keep
it backward-compatible for now (other than deprecating the old names).

We can continue the other changes separately.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-03 17:14:03 +02:00
Paweł Gronowski
4d1d7c3ebe update to go1.21.12
- https://github.com/golang/go/issues?q=milestone%3AGo1.21.12+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.11...go1.21.12

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

net/http: denial of service due to improper 100-continue handling

The net/http HTTP/1.1 client mishandled the case where a server responds to a request with an "Expect: 100-continue" header with a non-informational (200 or higher) status. This mishandling could leave a client connection in an invalid state, where the next request sent on the connection will fail.

An attacker sending a request to a net/http/httputil.ReverseProxy proxy can exploit this mishandling to cause a denial of service by sending "Expect: 100-continue" requests which elicit a non-informational response from the backend. Each such request leaves the proxy with an invalid connection, and causes one subsequent request using that connection to fail.

Thanks to Geoff Franks for reporting this issue.

This is CVE-2024-24791 and Go issue https://go.dev/issue/67555.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.21.12

**- Description for the changelog**

```markdown changelog
Update Go runtime to 1.21.12
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-07-03 10:28:59 +02:00
Sebastiaan van Stijn
d0aa3eaccf Migrate to github.com/containerd/platforms module
Switch to use github.com/containerd/platforms module, because containerd's
platforms package has moved to a separate module. This allows updating the
platforms parsing independent of the containerd module itself.

The package in containerd is deprecated, but kept as an alias to provide
compatibility between codebases.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 21:20:29 +02:00
Sebastiaan van Stijn
ef356c53ba api/types: remove deprecated ContainerNode, ContainerJSONBase.Node
It was moved and deprecated in 1fc9236119
(4587688258 for v27.0). This patch removes the
temporary alias and removes the relocated  api/types/container.ContainerNode
as well as the Node field on the api/types/container.Base struct.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:20:38 +02:00
Sebastiaan van Stijn
5b9ed8081b api/types: remove deprecated ImageLoadResponse
It moved to api/types/image.LoadResponse in 6c2934f373.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:56 +02:00
Sebastiaan van Stijn
d3defe9140 api/types: remove deprecated ImageImportSource
It moved to api/types/image.ImportSource in eb675cce71.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
6cdb123b6f api/types: remove deprecated ImageSearchOptions
It moved to api/types/registry.SearchOptions in f6cc76ceb9.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
67b7b15674 api/types: remove deprecated EventsOptions
It moved to api/types/events.ListOptions in b5f15bc0aa.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
3cbc166d2e api/types: remove deprecated container stats types
These types were moved to api/types/container in 0a4277abf4.

This removes the temporary aliases for:

- ThrottlingData
- CPUUsage
- CPUStats
- MemoryStats
- BlkioStatEntry
- BlkioStats
- StorageStats
- NetworkStats
- PidsStats
- Stats
- StatsJSON (moved/renamed to api/types/container.StatsResponse)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
ec5cede0a2 api/types: remove deprecated ContainerStats
It moved to api/types/container.StatsResponseReader in 17c3269a37.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:55 +02:00
Sebastiaan van Stijn
4ffe497ba4 api/types: remove deprecated CopyToContainerOptions
It moved to api/types/container.CopyToContainerOptions in fd1d8f323b.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
345e31ab96 api/types: remove deprecated ContainerPathStat
It moved to api/types/container.PathStat in 47d7c9e31d.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
2bceb34717 api/types: remove deprecated ContainersPruneReport
It moved to api/types/container.PruneReport in db2f1acd5d.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
0e64c9e93b api/types: remove deprecated ContainerExecInspect
It moved to api/types/container.ExecInspect in 5b27e71521.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
6f0caec226 api/types: remove deprecated ExecStartCheck
It's replaced by api/types/container.ExecStartOptions and ExecAttachOptions
in cd76e3e7f8. This patch removes the temporary
alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:54 +02:00
Sebastiaan van Stijn
13fbd394ee api/types: remove deprecated ExecConfig
It moved to api/types/container.ExecOptions in cd76e3e7f8.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
665eef54db api/types: remove deprecated NetworksPruneReport
It moved to api/types/network.PruneReport in e5f9484ab6.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
d2256faa0e api/types: remove deprecated NetworkResource
It's replaced by api/types/network.Inspect and api/types/network.Summary in
68bf0e7625. This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
ffdd2de674 api/types: remove deprecated EndpointResource
It moved to api/types/network.EndpointResource in 68bf0e7625.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
f0f2b8f7cb api/types: remove deprecated NetworkDisconnect
It moved to api/types/network.DisconnectOptions in 245d12175f.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:53 +02:00
Sebastiaan van Stijn
cf9d9ff50d api/types: remove deprecated NetworkConnect
It moved to api/types/network.ConnectOptions in 245d12175f.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
39c7b5f3e3 api/types: remove deprecated NetworkInspectOptions
It moved to api/types/network.InspectOptions in 5bea0c38bc.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
64583771f0 api/types: remove deprecated NetworkCreateResponse
It moved to api/types/network.CreateResponse in 89624e09e6.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
c99e0bc8ae api/types: remove deprecated NetworkListOptions
It moved to api/types/network.ListOptions in f78dac35e5.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
48f147e8d3 api/types: remove deprecated NetworkCreate
It moved to api/types/network.CreateOptions in 162ef4f8d1.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:52 +02:00
Sebastiaan van Stijn
ff1f1c58d5 api/types: remove deprecated NetworkCreateRequest
It moved to api/types/network.CreateRequest in 162ef4f8d1.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:51 +02:00
Sebastiaan van Stijn
4117a9308d api/types: remove deprecated VolumesPruneReport
It moved to api/types/volume in 162ef4f8d1.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:51 +02:00
Sebastiaan van Stijn
e0156f0f16 api/types: remove deprecated ImagesPruneReport
It moved to api/types/image in ecb24afaaf.
This patch removes the temporary alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 14:19:51 +02:00
Sebastiaan van Stijn
1abc8f6158 api/types: move container-inspect types to api/types/container
This moves the `ContainerJSONBase`, `ContainerJSON` and `ContainerNode`
types to the api/types/container package and deprecates the old location.

- `ContainerJSONBase` was renamed to `InspectBase`
- `ContainerJSON` was rnamed to `InspectResponse`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:50:24 +02:00
Sebastiaan van Stijn
05b0e653dd api/types: move Container to api/types/container
This moves the `Container` type to the containere package, rename
it to `Summary`, and deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:48 +02:00
Sebastiaan van Stijn
84ffc644ef api/types: move ContainerState to api/types/image
This moves the `ContainerState` type to the container package,
renames it to `State`, and deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:48 +02:00
Sebastiaan van Stijn
7053007f71 api/types: move ImageInspect and RootFS to api/types/image
This moves the `ImageInspect` and `RootFS` types to the image package,
and deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:48 +02:00
Sebastiaan van Stijn
da039ca918 api/types: move GraphDriverData to api/types/storage
The `GraphDriverData` type is shared between images and containers, and
putting it in either package would result in a circular import, so adding
a new package for this type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
e12b7493b9 api/types: move Port to api/types/container
This moves the `Port` type to the container package, and
deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
5517322cf9 api/types: move MountPoint to api/types/container
This moves the `MountPoint` type to the container package, and
deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
c130ce1f5d api/types: move container Health types to api/types/container
This moves the `Health` and `HealthcheckResult` types to the container package,
as well as the related `NoHealthcheck`, `Starting`, `Healthy`, and `Unhealthy`
consts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:47 +02:00
Sebastiaan van Stijn
df22a511cb api/types: move container-networksettings types to api/types/container
This moves the NetworkSettings, NetworkSettingsBase, DefaultNetworkSettings,
and SummaryNetworkSettings types to the api/types/container package, and
deprecates the old location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 12:46:45 +02:00
Paweł Gronowski
1506bbcfe8 builder-next: Add ImageNamedByBuildkit callback
When image is built with buildkit with containerd integration the image
service has no way of knowing that the image was tagged because buildkit
creates the image directly in containerd image store.

Add a callback that is called by the exporter wrapper.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-07-02 12:34:52 +02:00
Sebastiaan van Stijn
e4d792a06d api/types/system: remove Info.ExecutionDriver
The execution-driver was replaced with containerd since docker 1.11 (API
v1.23) in 9c4570a958, after which the value
was no longer set. The field was left in the type definition.
Commit 1fb1136fec removed its use from the
CLI and [docker/engine-api@39c7d7e] removed it from the API type, followed
by an update to the API docs in 3c6ef4c29d.

Changes to the API types were not pulled into the engine until v1.13, and
probably because of that gated it on API version < 1.25 instead of < 1.24
(see 6d98e344c7); setting a "not supported"
value for older versions.

Based on the above; this field was deprecated in API v1.23, and empty
since then. Given that the minimum API version supported by the engine
is not v1.24, we can safely remove it.

[docker/engine-api@39c7d7e]: 39c7d7ec19

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 01:29:36 +02:00
Sebastiaan van Stijn
c0dd5c18f6 Merge pull request #48081 from thaJeztah/gofumpt
do another run of gofumpt
2024-07-01 16:17:54 +02:00
Sebastiaan van Stijn
8768145519 api/types: gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 23:18:46 +02:00
Sebastiaan van Stijn
92346bcec6 api/server: gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 23:18:46 +02:00
Sebastiaan van Stijn
6ada1cff02 fix some gofmt issues reported by goreportcard
https://goreportcard.com/report/github.com/docker/docker

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 23:02:00 +02:00
Sebastiaan van Stijn
1fc9236119 api/types: deprecate ContainerJSONBase.Node, ContainerNode
The `Node` field and related `ContainerNode` type were used by the classic
(standalone) Swarm API. API documentation for this field was already removed
in 234d5a78fe (API 1.41 / docker 20.10), and
as the Docker Engine didn't implement these fields for the Swarm API, it
would always have been unset / nil.

Let's do a quick deprecation, and remove it on the next release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-25 18:47:59 +02:00
Sebastiaan van Stijn
ce5571f343 api: swagger: fix definition of TmpFsOptions (API v1.46)
Since it's a [][]string, there should only be two levels of array
in the OpenAPI spec. Also, the outermost level array shouldn't have
properties: (it should have items: instead).

Co-authored-by: Mark Yen <mark.yen@suse.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-21 09:17:57 +02:00
Sebastiaan van Stijn
202de333a4 Merge pull request #48040 from thaJeztah/move_stats
api/types: move stats-types to api/types/container
2024-06-20 11:30:31 +02:00
Sebastiaan van Stijn
b5d3c47a37 Merge pull request #48033 from thaJeztah/api_update_examples
docs/api: update some example values to be more accurate (API v1.46)
2024-06-20 10:26:52 +02:00