Commit graph

43812 commits

Author SHA1 Message Date
CrazyMax
170049225c
ci: add cross job in ci workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-10 21:03:54 +02:00
CrazyMax
12558c8d6e
fix cross compilation for arm platforms
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-10 21:03:31 +02:00
CrazyMax
d730d550e2
ci: set shorter retention period for artifacts
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-10 21:01:24 +02:00
CrazyMax
c2dfb60e31
ci: update upload-artifact and download-artifact actions to v3
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-10 21:01:24 +02:00
Sebastiaan van Stijn
c6872980bb
Merge pull request #43475 from crazy-max/win-arm64
missing windows arm64 arch detection
2022-04-10 20:46:26 +02:00
CrazyMax
5d9e99ead3
missing windows arm64 arch detection
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-09 16:10:42 +02:00
Samuel Karp
5179299b98
Merge pull request #43457 from thaJeztah/daemon_fix_hosts_validation_step1 2022-04-09 00:55:40 -07:00
Sebastiaan van Stijn
eda65622e8
Merge pull request #43473 from samuelkarp/samuelkarp-maintainer-metadata
maintainers: update metadata for samuelkarp
2022-04-08 23:47:52 +02:00
Samuel Karp
eb4c6d8316
maintainers: update metadata for samuelkarp
Signed-off-by: Samuel Karp <skarp@amazon.com>
2022-04-08 14:27:34 -07:00
Sebastiaan van Stijn
7ea283fd91
Merge pull request #43458 from thaJeztah/fix_daemon_config_test
daemon/config: fix TestReloadDefaultConfigNotExist if file exists
2022-04-08 12:34:30 +02:00
Sebastiaan van Stijn
62ea92ba14
Merge pull request #43472 from thaJeztah/no_more_no_d_type
remove deprecated support for overlay(2) on backing FS without d_type (fstype=1)
2022-04-08 09:22:57 +02:00
Sebastiaan van Stijn
63a9e3cc93
Merge pull request #43448 from thaJeztah/daemon_config_group_proxies
daemon/config: move proxy settings to "proxies" struct within daemon.json
2022-04-07 22:00:20 +02:00
Brian Goff
67ee9839fe
Merge pull request #43438 from thaJeztah/no_default_limit
client: container ps: don't set "limit" if none was set
2022-04-07 11:57:20 -07:00
Sebastiaan van Stijn
101dafd049
daemon/config: move proxy settings to "proxies" struct within daemon.json
This is a follow-up to 427c7cc5f8, which added
proxy-configuration options ("http-proxy", "https-proxy", "no-proxy") to the
dockerd cli and in `daemon.json`.

While working on documentation changes for this feature, I realised that those
options won't be "next" to each-other when formatting the daemon.json JSON, for
example using `jq` (which sorts the fields alphabetically). As it's possible that
additional proxy configuration options are added in future, I considered that
grouping these options in a struct within the JSON may help setting these options,
as well as discovering related options.

This patch introduces a "proxies" field in the JSON, which includes the
"http-proxy", "https-proxy", "no-proxy" options.

Conflict detection continues to work as before; with this patch applied:

    mkdir -p /etc/docker/
    echo '{"proxies":{"http-proxy":"http-config", "https-proxy":"https-config", "no-proxy": "no-proxy-config"}}' > /etc/docker/daemon.json

    dockerd --http-proxy=http-flag --https-proxy=https-flag --no-proxy=no-proxy-flag --validate

    unable to configure the Docker daemon with file /etc/docker/daemon.json:
    the following directives are specified both as a flag and in the configuration file:
    http-proxy: (from flag: http-flag, from file: http-config),
    https-proxy: (from flag: https-flag, from file: https-config),
    no-proxy: (from flag: no-proxy-flag, from file: no-proxy-config)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-07 19:43:02 +02:00
Sebastiaan van Stijn
2bc07370ec
daemon/graphdriver: remove unused graphdriver.IsInitialized()
It's no longer used, and has no external consumers.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-07 16:21:31 +02:00
Sebastiaan van Stijn
d570bc4922
remove deprecated support for overlay(2) on backing FS without d_type (fstype=1)
Support for overlay on a backing filesystem without d_type was deprecated in
0abb8dec3f (Docker 17.12), with an exception
for existing installations (0a4e793a3d).

That deprecation was nearly 5 years ago, and running without d_type is known to
cause serious issues (so users will likely already have run into other problems).

This patch removes support for running overlay and overlay2 on these filesystems,
returning the error instead of logging it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-07 16:15:26 +02:00
Sebastiaan van Stijn
a461373146
Merge pull request #43453 from thaJeztah/bump_buildx_0.8.2
Makefile: update buildx to v0.8.2
2022-04-07 10:45:57 +02:00
Sebastiaan van Stijn
39e52b0b6d
Merge pull request #43467 from thaJeztah/jenkinsfile_enable_all_s390_and_power
Jenkinsfile: allow all ppc64le / s390x stages through checkbox
2022-04-06 22:13:27 +02:00
Sebastiaan van Stijn
87948c7892
Jenkinsfile: allow all ppc64le / s390x stages through checkbox
Previously, the ppc64ls and s390x stages only ran on non-PR commits,
but the unit-tests and integration/xx tests could be enabled with
a checkbox.

This patch changes the Jenkinsfile to also allow the integration-cli
tests to be run on pull requests if the checkbox is enabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-06 15:40:47 +02:00
Akihiro Suda
7691d17a37
Merge pull request #43455 from thaJeztah/daemon_add_experimental_note
cmd/dockerd: update --ip6tables description to include "experimental"
2022-04-05 12:13:20 +09:00
Akihiro Suda
f1b52b5c1a
Merge pull request #43462 from thaJeztah/carry_43155_update_authors
Updated AUTHORS and .mailmap files
2022-04-05 12:12:42 +09:00
Gabriel Goller
2ff043c9fe
Updated AUTHORS and .mailmap files
Updated the list of AUTHORS using the generate-authors.sh script.

Also updating the .mailmap file to prevent some duplicates, and
to include some updates from containerd, which had a more up-to-date
list of author's preferred e-mail addresses.

Signed-off-by: Gabriel Goller <gabrielgoller123@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 20:33:51 +02:00
Sebastiaan van Stijn
a35b4ac54a
daemon/config: Validate(): validate hosts
The config.Validate() function did not validate hosts that were configured in
the daemon.json configuration file, resulting in `--validate` to pass, but the
daemon failing to start.

before this patch:

    echo '{"hosts":["127.0.0.1:2375/path"]}' > /etc/docker/daemon.json

    dockerd --validate
    configuration OK

    dockerd
    INFO[2022-04-03T11:42:22.162366200Z] Starting up
    failed to load listeners: error parsing -H 127.0.0.1:2375/path: invalid bind address (127.0.0.1:2375/path): should not contain a path element

with this patch:

    echo '{"hosts":["127.0.0.1:2375/path"]}' > /etc/docker/daemon.json

    dockerd --validate
    unable to configure the Docker daemon with file /etc/docker/daemon.json: configuration validation from file failed: invalid bind address (127.0.0.1:2375/path): should not contain a path element

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 15:18:01 +02:00
Sebastiaan van Stijn
5cfcd88d57
daemon/config: fix TestReloadDefaultConfigNotExist if file exists
The TestReloadDefaultConfigNotExist() test assumed it was running in a clean
environment, in which the `/etc/docker/daemon.json` file doesn't exist, and
would fail if that was not the case.

This patch updates the test to override the default location to a a non-existing
path, to allow running the test in an environment where `/etc/docker/daemon.json`
is present.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 15:07:05 +02:00
Sebastiaan van Stijn
ecbfe73193
opts: ParseTCPAddr(): fix validation of hosts to not ignore path elements
There was a discrepancy between what `ParseTCPAddr()` accepted, and what the
daemon was able to use, resulting in the daemon to start, but fail to create
listeners for the specified host.

Before this patch:

    dockerd -H tcp://127.0.0.1:2375/
    INFO[2022-04-03T10:18:06.417502600Z] Starting up
    ...
    failed to load listeners: listen tcp: address tcp/2375/: unknown port

    dockerd -H 127.0.0.1:2375/path
    INFO[2022-04-03T10:18:06.417502600Z] Starting up
    ...
    failed to load listeners: listen tcp: address tcp/5555/path: unknown port

After this patch:

    dockerd -H tcp://127.0.0.1:2375/
    Status: invalid argument "tcp://127.0.0.1:2375/" for "-H, --host" flag: invalid bind address (127.0.0.1:2375/): should not contain a path element
    See 'dockerd --help'., Code: 125

    dockerd -H 127.0.0.1:2375/path
    Status: invalid argument "127.0.0.1:2375/path" for "-H, --host" flag: invalid bind address (127.0.0.1:2375/path): should not contain a path element
    See 'dockerd --help'., Code: 125

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 12:50:45 +02:00
Sebastiaan van Stijn
846af8e413
cmd/dockerd: update --ip6tables description to include "experimental"
This feature requires experimental mode to be enabled, so mentioning that
in the flag description.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 11:54:01 +02:00
Sebastiaan van Stijn
ae7d3efafd
Makefile: update buildx to v0.8.2
release notes: https://github.com/docker/buildx/releases/tag/v0.8.2

Notable changes:

- Update Compose spec used by buildx bake to v1.2.1 to fix parsing ports definition
- Fix possible crash on handling progress streams from BuildKit v0.10
- Fix parsing groups in buildx bake when already loaded by a parent group

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 11:03:52 +02:00
Tianon Gravi
83970db5ef
Merge pull request #43445 from AkihiroSuda/runc-1.1.1
update runc to v1.1.1
2022-04-01 16:04:46 -07:00
Sebastiaan van Stijn
99b2894e17
Merge pull request #43434 from tonistiigi/amd64-variant-support
distribution: fix matching amd64 variants
2022-04-02 00:12:33 +02:00
Akihiro Suda
ffc903d7a6
update runc binary to v1.1.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-04-01 15:24:13 +09:00
Akihiro Suda
69993c1c57
vendor: github.com/opencontainers/runc v1.1.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-04-01 15:23:46 +09:00
Tonis Tiigi
482d1d15bf distribution: use the maximum compatible platform by default
When no specific platform is set, pull the platform that
most matches the current host.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-03-31 15:20:59 -07:00
Sebastiaan van Stijn
a6005ef380
Merge pull request #43368 from TBBle/generalised-Windows-device-syntax
Introduce `://` syntax for Windows Devices in DeviceMapping.PathOnHost
2022-03-31 22:34:12 +02:00
Sebastiaan van Stijn
890231f46b
client: container ps: don't set "limit" if none was set
both -1 and 0 are accepted as "no limit", so don't send the
limit option if no limit was set. For simplicity, we're ignoring
values <= 0.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-31 19:59:17 +02:00
Tonis Tiigi
fcc42d5682 distribution: use correct platform matcher for containerd
This uses the correct comparison with compatibility
checks for variants.

The deprecated arm variant matcher is left as is.
Although it is not needed for valid cases it is not
fully compatible as also matches some invalid
combinations, so should be removed separately.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-03-27 19:46:45 -07:00
Sebastiaan van Stijn
88e1fec490
Merge pull request #43432 from crazy-max/fix-buildkit-tests
vendor: github.com/moby/buildkit d7744bc
2022-03-27 14:34:09 +02:00
CrazyMax
d74bf97f40
vendor: github.com/moby/buildkit d7744bc
full diff: 8d45bd6...d7744bc

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-27 13:07:05 +02:00
Paul "TBBle" Hampson
064650dd09 Pass TestPsListContainersFilterCreated if other created containers exist
The test was dependent on its container being _first_ in the response,
but anywhere on the line should be fine.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-27 13:26:47 +11:00
Paul "TBBle" Hampson
31e1fec950 Suport vpci-class-guid in the non-containerd backend
IDType `vpci-class-guid` is a synonym of `class`.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-27 13:26:47 +11:00
Paul "TBBle" Hampson
cb07afa3cc Implement :// separator for arbitrary Windows Device IDTypes
Arbitrary here does not include '', best to catch that one early as it's
almost certainly a mistake (possibly an attempt to pass a POSIX path
through this API)

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-27 13:26:47 +11:00
Paul "TBBle" Hampson
92f13bad88 Allow Windows Devices to be activated for HyperV Isolation
If not using the containerd backend, this will still fail, but later.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-27 13:26:41 +11:00
Paul "TBBle" Hampson
c60f70f112 Break out setupWindowsDevices and add tests
Since this function is about to get more complicated, and change
behaviour, this establishes tests for the existing implementation.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-27 13:23:48 +11:00
Sebastiaan van Stijn
8941dcfcc5
Merge pull request #43428 from thaJeztah/prevent_rootlesskit_dependency_in_cli
registry: remove dependency on rootlesskit, add `SetCertsDir()`
2022-03-26 18:11:51 +01:00
Sebastiaan van Stijn
1ad9a09af8
Merge pull request #43369 from sestegra/stop
Allow STOPSIGNAL instruction in commit change
2022-03-26 14:40:32 +01:00
Sebastiaan van Stijn
aaf70b5c6b
Merge pull request #42064 from thaJeztah/swarm_ping
API: add "Swarm" header to _ping endpoint
2022-03-26 14:39:50 +01:00
Sebastiaan van Stijn
070726194d
Merge pull request #43427 from AkihiroSuda/rootlesskit-1.0.0
update RootlessKit to v1.0.0
2022-03-26 00:14:18 +01:00
Sebastiaan van Stijn
1e645fb70f
client: Ping(): add handling for swarm status headers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-25 23:57:58 +01:00
Sebastiaan van Stijn
adf4bf772d
API: add "Swarm" header to _ping endpoint
This adds an additional "Swarm" header to the _ping endpoint response,
which allows a client to detect if Swarm is enabled on the daemon, without
having to call additional endpoints.

This change is not versioned in the API, and will be returned irregardless
of the API version that is used. Clients should fall back to using other
endpoints to get this information if the header is not present.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-25 23:54:14 +01:00
Sebastiaan van Stijn
0729fbd343
Merge pull request #43378 from thaJeztah/deprecate_storage_drivers
daemon: require storage-driver to be set if the driver is deprecated
2022-03-25 20:33:23 +01:00
Sebastiaan van Stijn
ffd5d2665d
Merge pull request #43379 from evol262/overlay2-fix-deadlock
libnetwork/overlay:fix sandbox deadlock
2022-03-25 19:48:00 +01:00