Commit Graph

7385 Commits

Author SHA1 Message Date
Serhan Tutar
9cae3fb167 docs/contributing: remove GIT_BRANCH image tag references
When creating development containers currently, `Makefile` doesn't use
the GIT_BRANCH variable to tag `docker-dev` image. But in some
documentation files for contributing, references remain for image tags
with the `git branch` name.

This commit simply removes those references. Correct image tag names are
important for newcomers, especially for copy-pasteable commands.

Related PR: 42652

Signed-off-by: Serhan Tutar <randomnoise@users.noreply.github.com>
2025-08-08 02:01:41 +02:00
Serhan Tutar
cad3a5775b docs: fix URI fragment by changing it to the existing subheading
Markdown subheading name was changed in `CONTRIBUTING.md` in the past,
so this commit fixes the link by changing it from `docker` to `moby`.

Signed-off-by: Serhan Tutar <randomnoise@users.noreply.github.com>
2025-08-04 13:46:24 +03:00
Sebastiaan van Stijn
84083b0037 Merge pull request #50496 from thaJeztah/rm_old_doc
docs: remove old rootless placeholder
2025-07-24 03:15:00 +02:00
Sebastiaan van Stijn
0d9304c9e1 docs: remove old rootless placeholder
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-24 00:50:34 +02:00
Sebastiaan van Stijn
4d5a7289a0 api: move docs to api module
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-23 17:44:18 +02:00
Sebastiaan van Stijn
bdcf4e8c85 adjust minimum API-version for multiple platforms on save/load
Follow-up to fcc8209e12, which didn't
make the window for API v1.51, so had to be adjusted for the API
version it requires.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-23 15:54:47 +02:00
Paweł Gronowski
6a8654a808 api: bump to 1.52
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-16 11:10:32 +02:00
Niel Drummond
bfc0c7cff5 docs: api: Tweak type of GwPriority to integer
Signed-off-by: Niel Drummond <niel@drummond.lu>
2025-07-05 14:46:12 +01:00
Paweł Gronowski
ef50844a0b docs: cut api docs for v1.51
Used by the upcoming 28.3.0 release

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-20 18:00:53 +02:00
Paweł Gronowski
cfcbfabb0f api/image/list: Return Containers count
This parameter was already supported for some time in the backend (for
purposes related to docker system prune). It was also already present in
the imagetypes.ListOptions but was never actually handled by the client.

Make it available by default in the response.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-13 11:46:09 +02:00
Sebastiaan van Stijn
84f5e5351c Merge pull request #50145 from vvoland/api-151
api: bump to 1.51
2025-06-12 20:18:50 +02:00
Paweł Gronowski
27f2e0ecc5 api: bump to 1.51
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-05 12:32:48 +02:00
Sebastiaan van Stijn
8ba832cc8f docs/api: swagger: quote maxUint64 example value
More recent versions of go-swagger failed on this, because the value
is interpolated as JSON numberic value, which assumes int64 (signed).

Quote the value to prevent it being handled before validated against
uint64.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-02 14:47:48 +02:00
Paweł Gronowski
588a05a1ce docs/api: Cut docs for API v1.50
Used by the upcoming v28.2.0 release.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-26 19:37:21 +02:00
Sebastiaan van Stijn
a9649e7a5d Merge pull request #49982 from vvoland/c8d-image-remove-platform
c8d/delete: Add support for deleting specific platforms
2025-05-26 18:47:34 +02:00
Paweł Gronowski
30da69d694 c8d/delete: Support deleting specific platforms
This change adds the ability to delete a specific platform from a
multi-platform image.

Previously, image deletion was an all-or-nothing operation - when
deleting a multi-platform image, all platforms would be removed
together. This change allows users to selectively remove individual
platforms from a multi-architecture image while keeping other platforms
intact.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-26 17:43:10 +02:00
Sebastiaan van Stijn
d7cca3f997 docs/api: update deprecation version for erroneous fields
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-26 17:14:44 +02:00
Sebastiaan van Stijn
4dc961d0e9 image-inspect: remove Config fields that are not part of the image
commit af0cdc36c7 marked these fields as
deprecated and to be removed in API v1.47 (which was targeted for v28.0).
We shipped v1.47 with the v27.2 release, but did not yet remove the erroneous
fields, so the version to deprecate was updated to v1.48 through
3df03d8e66

This patch removes fields that are not part of the image by replacing the
type with the Config struct from the docker image-spec.

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.50/images/alpine/json | jq .Config
    {
      "Env": [
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      ],
      "Cmd": [
        "/bin/sh"
      ]
    }

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.49/images/alpine/json | jq .Config
    {
      "Hostname": "",
      "Domainname": "",
      "User": "",
      "AttachStdin": false,
      "AttachStdout": false,
      "AttachStderr": false,
      "Tty": false,
      "OpenStdin": false,
      "StdinOnce": false,
      "Env": [
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      ],
      "Cmd": [
        "/bin/sh"
      ],
      "Image": "",
      "Volumes": null,
      "WorkingDir": "",
      "Entrypoint": null,
      "OnBuild": null,
      "Labels": null
    }

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-26 17:14:37 +02:00
Sebastiaan van Stijn
6505d3877c API: /info: remove BridgeNfIptables, BridgeNfIp6tables fields
The `BridgeNfIptables` and `BridgeNfIp6tables` fields in the
`GET /info` response were deprecated in API v1.48, and are now omitted
in API v1.50.

With this patch, old API version continue to return the field:

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.48/info | jq .BridgeNfIp6tables
    false

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.48/info | jq .BridgeNfIptables
    false

Omitting the field in API v1.50 and above

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.50/info | jq .BridgeNfIp6tables
    null

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.50/info | jq .BridgeNfIptables
    null

This reverts commit eacbbdeec6, and re-applies
a variant of 5d2006256f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-16 19:49:52 +02:00
Paweł Gronowski
9095698a5c daemon: Discover devices and include in system info
Add ability for the device driver to implement a device discovery
mechanism and expose discovered devices in the `docker info` output.

Currently it's only implemented for CDI devices.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-16 17:03:29 +02:00
Kaita Nakamura
b8067d159f docs/api: update image tarball format
Signed-off-by: Kaita Nakamura <kaita.nakamura0830@gmail.com>
2025-04-16 18:02:08 +09:00
Sebastiaan van Stijn
eacbbdeec6 Revert "API: /info: remove BridgeNfIptables, BridgeNfIp6tables fields"
This reverts commit 5d2006256f, which
caused some issues in the docker/cli formatting code that needs some
investigating.

Let's (temporarily) revert this while we look what's wrong.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-11 14:47:10 +02:00
Paweł Gronowski
73520a5ab7 Merge pull request #49793 from vvoland/cut-api
docs/api: add documentation for API v1.49
2025-04-11 11:40:21 +00:00
Paweł Gronowski
adb9e9135a docs/api: add documentation for API v1.49
Copy the swagger / OpenAPI file to the documentation. This is the API
version used by the upcoming v28.1.0 release.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-11 13:01:02 +02:00
Sebastiaan van Stijn
5d2006256f API: /info: remove BridgeNfIptables, BridgeNfIp6tables fields
The `BridgeNfIptables` and `BridgeNfIp6tables` fields in the
`GET /info` response were deprecated in API v1.48, and are now omitted
in API v1.49.

With this patch, old API version continue to return the field:

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.48/info | jq .BridgeNfIp6tables
    false

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.48/info | jq .BridgeNfIptables
    false

Omitting the field in API v1.49 and above

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.49/info | jq .BridgeNfIp6tables
    null

    curl -s --unix-socket /var/run/docker.sock http://localhost/v1.49/info | jq .BridgeNfIptables
    null

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-10 14:26:42 +02:00
Sebastiaan van Stijn
564abf9157 api: info: omit deprecated "Commit.Expected" fields on API >= 1.49
These fields were deprecated in ff191c58f7,
and are now omitted.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-08 15:15:58 +02:00
Sebastiaan van Stijn
7d9c50db2b api: /info: omit non-distributable-artifacts fields for API >= 1.49
- registry.ServiceConfig: add a "ExtraFields" for outputting deprecated
  fields.
- remove uses of AllowNondistributableArtifactsCIDRs and AllowNondistributableArtifactsHostnames

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-07 19:12:09 +02:00
Rob Murray
a0a86d0982 Add Info.FirewallBackend
Report FirewallBackend in "docker info".

It's currently "iptables" or "iptables+firewalld" on Linux, and
omitted on Windows.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-04-07 16:56:49 +01:00
Paweł Gronowski
59169d0f97 image/inspect: Add platform selection
`GET /image/{name}/json` now supports `platform` parameter allowing to
specify which platform variant of a multi-platform image to inspect.

For servers that do not use containerd image store integration, this
option will cause an error if the requested platform doesn't match the
image's actual platform

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-03 13:57:51 +02:00
Kristian Heljas
795461eceb docs: api v1.48: Move ImageGet api docs under Image tag
Signed-off-by: Kristian Heljas <kristian@kristian.ee>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-02 23:25:57 +02:00
Kristian Heljas
e1e58409a1 docs: API v1.48 Add missing platform parameter to ImageGetAll api docs
Signed-off-by: Kristian Heljas <kristian@kristian.ee>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-02 23:25:26 +02:00
Paweł Gronowski
4390ab275a api: bump API version to 1.49
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-31 14:09:39 +02:00
Sebastiaan van Stijn
49c89b0177 docs/api: improve doc for Secret and Config data fields (API v1.31-v1.48)
Document the size constraints as defined by swarm;

- 500KB ([MaxSecretSize]) for secrets
- 1000KB ([MaxConfigSize]) for configs

[MaxSecretSize]: https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize
[MaxConfigSize]: https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-03-09 12:42:23 +01:00
Sebastiaan van Stijn
a3628f3f8e docs/api: add documentation for API v1.48
API version used by the v28.0.0 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-18 13:35:34 +01:00
Jonathan A. Sternberg
927e07e46e API: add Platform (OS and Architecture) to /containers/json
Adds platform information to containers (for `docker ps`).

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-02-13 14:52:21 -06:00
Sebastiaan van Stijn
56a6383883 api: deprecation of "error" and "progress" fields in streaming responses
- error (ErrorMessage) was deprecated in 3043c26419
  which was part of docker v0.6.0 / API v1.4
- progress (ProgressMessage) was deprecated in 597e0e69b4
  which was part of docker v0.7.1 / API v1.8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-11 16:29:10 +01:00
Paweł Gronowski
3d37537f75 c8d/inspect: Add Manifests field
Add `Manifests` field to image inspect (`/images/{name}/json`) response.
This is the same as in `/images/json`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-06 13:30:24 +01:00
Paweł Gronowski
02563f2805 Merge pull request #48798 from LaurentGoderre/implement-30449-image-mount
Implement mount from image
2025-02-05 18:04:22 +00:00
Laurent Goderre
8c58934106 Implement mount from image
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
2025-01-31 10:34:27 -05:00
Jonathan A. Sternberg
8e529682af builder: wire up new gc types for buildkit prune functionality
This wires up the new gc types that buildkit exposes in version 0.17.
The previous flag, `KeepBytes`, was renamed to `ReservedBytes` and two
new options, `MaxUsed` and `MinFree` were added.

`MaxUsed` corresponds to the maximum amount of space that buildkit will
use for the build cache and `MinFree` amount of free disk space for the
system to prevent the cache from using that space. This allows greater
configuration of the cache storage usage when used in situations where
docker is not the only service on the system using disk space.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-01-30 09:54:12 -06:00
Sebastiaan van Stijn
364e4790e1 docs/api: allow for an empty string for Isolation (api v1.25-v1.47)
Backport the changes from 26049febb2
to all versions used in the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-19 17:27:18 +01:00
Sebastiaan van Stijn
fe6acf647e Merge pull request #49122 from XxRoloxX/49033-update-swarmjoin-datapathaddr-examples
docs: Update example section for SwarmJoinRequest
2024-12-19 16:55:13 +01:00
Albin Kerouanton
ca85ba2e82 Merge pull request #49114 from thaJeztah/deprecate_BridgeNfIptables_fields
Deprecate BridgeNfIptables and BridgeNfIp6tables fields
2024-12-18 09:22:36 +01:00
Adam Lamers
1aecca8bbd docs: Update example section for SwarmJoinRequest
- Updated the example section in `swagger.yaml` for the `DataPathAddr` parameter in `SwarmJoinRequest`.
- Updated corresponding example sections in `docs/api/v1.*`

Signed-off-by: Adam Lamers <adam.lamers@wmsdev.pl>
2024-12-17 21:38:03 +01:00
Sebastiaan van Stijn
8991c4e382 Deprecate BridgeNfIptables and BridgeNfIp6tables fields
The netfilter module is now loaded on-demand, and no longer during daemon
startup, making these fields obsolete. These fields are now always `false`
and will be removed in the next relase.

This patch deprecates:

- the `BridgeNfIptables` field in `api/types/system.Info`
- the `BridgeNfIp6tables` field in `api/types/system.Info`
- the `BridgeNFCallIPTablesDisabled` field in `pkg/sysinfo.SysInfo`
- the `BridgeNFCallIP6TablesDisabled` field in `pkg/sysinfo.SysInfo`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 22:10:05 +01:00
Sebastiaan van Stijn
30a365f543 docs/api: version-history.md: fix markdown
Fixes a typo introduced in 1932091e21

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 21:57:05 +01:00
Sebastiaan van Stijn
4e9df46a6e docs/api: document correct case for Api-Version header
This header is sent in its canonical format; update the docs to
reflect this.

Follow-up to 76a5ca1d4d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-16 14:06:09 +01:00
Sebastiaan van Stijn
5c358743af daemon: info: remove bridge-nf-call-iptables / ip6tables warnings
Historically, the `bridge` network-driver would detect whether netfiltering
was enabled in the kernel or, if disabled, try to do a `modprobe` when
initializing the driver. This approach became problematic, as loading the
module was not always performed  at startup depending on daemon configuration,
or the daemon may have failed to load the module. The `/info` response
would include a warning  to inform the user that some functionality may not
be available;

    WARNING: bridge-nf-call-iptables is disabled
    WARNING: bridge-nf-call-ip6tables is disabled

Starting with db25b0dcd0, detecting whether
netfiltering  is enabled now [happens when needed][1], which was further improved
on to not depend  on `modprobe` in 264c15bfc4 and
4740820716.

Because of the above, the `/info` output would now return warnings in any
situation where netfiltering was not enabled on the host before the daemon
started, which may be either _incorrect_ (i.e., the module may have been
loaded afterwards), or irrelevant, because netfiltering is not needed in
all situations.

This patch removes the warnings from the `/info` response,

[1]: 944e403502/libnetwork/drivers/bridge/setup_bridgenetfiltering.go (L16-L77)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-13 10:09:41 +01:00
Sebastiaan van Stijn
8b243a1a82 docs/api: deprecate non-distributable artifacts
Mark the AllowNondistributableArtifactsCIDRs and AllowNondistributableArtifactsHostnames
fields as deprecated in all API versions, as these fields will
no longer be propagated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 20:30:00 +01:00
Sebastiaan van Stijn
1932091e21 remove support for non-distributable artifacts and deprecate API fields and config
Non-distributable artifacts (foreign layers) were introduced in commit
05bd04350b to accommodate Windows images,
for which the EULA did not allow layers to be distributed through registries
other than those hosted by Microsoft. The concept of foreign / non-distributable
layers was adopted by the OCI distribution spec in [oci#233].

These restrictions were relaxed later to allow distributing these images
through non-public registries, for which a configuration was added in the
daemon in 67fdf574d5. In 2022, Microsoft updated
the EULA and [removed these restrictions altogether][1], and the OCI distribution
spec deprecated the  functionality in [oci#965].

In 2023, Microsoft [removed the use of foreign data layers][2] for their images,
making this functionality obsolete.

This patch:

- Deprecates the `--allow-nondistributable-artifacts` daemon flag and corresponding
  `allow-nondistributable-artifacts` field in `daemon.json`. Setting either
  option will no longer take an effect, but a deprecation warning log is added
  to raise awareness about the deprecation. This warning is planned to become
  an error in the next release.
- Deprecates the `RegistryConfig.AllowNondistributableArtifactsCIDRs` and
  `RegistryConfig.AllowNondistributableArtifactsHostnames` fields in the
  `GET /info` API response. For API version v1.48 and lower, the fields are
  still included in the response, but always `null`. In API version v1.49 and
  higher, the field will be omitted entirely.
- Deprecates the `api/types/registry/ServiceConfig.AllowNondistributableArtifactsCIDRs`
  field.
- Deprecates the `api/types/registry/ServiceConfig.AllowNondistributableArtifactsHostnames`
  field.
- Deprecates the `registry.ServiceOptions.AllowNondistributableArtifacts` field.

[oci#233]: https://github.com/opencontainers/image-spec/pull/233
[oci#965]: https://github.com/opencontainers/image-spec/pull/965
[1]: https://techcommunity.microsoft.com/blog/containers/announcing-windows-container-base-image-redistribution-rights-change/3645201
[2]: https://techcommunity.microsoft.com/blog/containers/announcing-removal-of-foreign-layers-from-windows-container-images/3846833

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 20:29:46 +01:00