The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Find a file
Sebastiaan van Stijn 6aea26b431
client: fix connection-errors being shadowed by API version mismatch errors
Commit e6907243af applied a fix for situations
where the client was configured with API-version negotiation, but did not yet
negotiate a version.

However, the checkVersion() function that was implemented copied the semantics
of cli.NegotiateAPIVersion, which ignored connection failures with the
assumption that connection errors would still surface further down.

However, when using the result of a failed negotiation for NewVersionError,
an API version mismatch error would be produced, masking the actual connection
error.

This patch changes the signature of checkVersion to return unexpected errors,
including failures to connect to the API.

Before this patch:

    docker -H unix:///no/such/socket.sock secret ls
    "secret list" requires API version 1.25, but the Docker daemon API version is 1.24

With this patch applied:

    docker -H unix:///no/such/socket.sock secret ls
    Cannot connect to the Docker daemon at unix:///no/such/socket.sock. Is the docker daemon running?

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-23 15:17:10 +01:00
.devcontainer Add devcontainer configuration 2023-12-13 13:27:52 +01:00
.github Merge pull request #47423 from vvoland/ci-check-changelog 2024-02-23 12:24:13 +01:00
api Merge pull request #47361 from robmry/47331_swarm_ipam_validation 2024-02-16 16:58:33 +01:00
builder builder/dockerfile: ADD with best-effort xattrs 2024-02-12 13:31:44 -05:00
cli frozen images: update to debian:bookworm-slim 2023-11-30 12:01:06 +01:00
client client: fix connection-errors being shadowed by API version mismatch errors 2024-02-23 15:17:10 +01:00
cmd api/server/middleware: NewVersionMiddleware: add validation 2024-02-06 18:44:45 +01:00
container volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
contrib dockerd-rootless-setuptool.sh: add nsenter subcommand 2024-01-17 22:59:18 +09:00
daemon Merge pull request #47361 from robmry/47331_swarm_ipam_validation 2024-02-16 16:58:33 +01:00
distribution api/types: move image options to api/types/image 2024-01-24 00:10:33 +01:00
dockerversion dockerversion: DockerUserAgent(): allow custom versions to be passed 2023-06-01 18:21:58 +02:00
docs api/history: Mention empty Created 2024-02-14 11:00:17 +01:00
errdefs feat: make errdefs.IsXXX helper functions work with wrapped errors 2024-01-05 22:54:13 +08:00
hack update to go1.21.7 2024-02-14 12:56:06 +01:00
image migrate image spec to github.com/moby/docker-image-spec 2024-02-09 19:12:18 +01:00
integration integration/TestDaemonProxy: Remove OTEL span 2024-02-20 10:21:53 +01:00
integration-cli api: remove handling of HostConfig on POST /containers/{id}/start (api < v1.24) 2024-02-06 18:44:44 +01:00
internal integration/save: Add tests checking OCI archive output 2024-02-05 11:17:58 +01:00
layer layer: ChecksumForGraphID: remove unused code for for migrating v1 layers 2024-01-08 12:28:41 +01:00
libcontainerd libcontainerd/supervisor: fix data race 2024-02-01 15:53:18 -05:00
libnetwork libnet/ds: remove extra space in error msg 2024-02-22 18:49:28 +01:00
oci daemon: set libnetwork sandbox key w/o OCI hook 2024-01-19 20:23:12 +00:00
opts opts: ValidateIPAddress: improve error, godoc, and tests 2023-11-11 15:31:19 +01:00
pkg Merge pull request #46419 from vvoland/pkg-pools-close-noop 2024-01-25 14:24:43 +01:00
plugin plugins: fix panic installing from repo w/ digest 2024-02-04 20:23:06 +00:00
profiles seccomp: add futex_wake syscall (kernel v6.7, libseccomp v2.5.5) 2024-02-06 14:12:40 +01:00
project Remove 'VERSION' from the text 2024-02-04 11:59:03 +08:00
quota quota: increase sparse test-image to 300MB 2023-11-27 16:08:08 +01:00
reference migrate to new github.com/distribution/reference module 2023-09-05 12:09:26 +02:00
registry Merge pull request #46594 from regisb/36598-regisb/registry-mirror-path 2023-10-12 20:37:52 +02:00
reports Fix typos 2018-05-16 09:15:43 +08:00
restartmanager restartmanager: rename max/min as it collides with go1.21 builtin 2023-08-26 19:37:19 +02:00
runconfig api: remove handling of HostConfig on POST /containers/{id}/start (api < v1.24) 2024-02-06 18:44:44 +01:00
testutil api/types: move image options to api/types/image 2024-01-24 00:10:33 +01:00
vendor vendor: github.com/containerd/continuity v0.4.3 2024-02-22 10:24:52 +01:00
volume volume/local: Fix cifs url containing spaces 2024-01-23 17:42:11 +01:00
.dockerignore ignorefiles: cleanup 2022-11-21 18:43:42 -07:00
.gitattributes chore: fix linguist for Dockerfile 2022-04-27 06:38:41 +02:00
.gitignore hack: introduce validate/no-module 2022-12-12 18:39:06 -07:00
.golangci.yml Remove httputil lint exceptions 2023-12-18 13:16:37 -08:00
.mailmap update authors and mailmap 2023-11-13 22:12:58 +01:00
AUTHORS update AUTHORS 2024-01-03 10:12:37 +01:00
codecov.yml codecov: disable "patch" status 2022-06-07 17:24:46 +02:00
CONTRIBUTING.md CONTRIBUTING.md: update links to golang docs and blog 2023-08-25 12:43:31 +02:00
docker-bake.hcl Dockerfile: remove APT_MIRROR build-arg 2023-12-04 13:52:58 +01:00
Dockerfile update to go1.21.7 2024-02-14 12:56:06 +01:00
Dockerfile.simple update to go1.21.7 2024-02-14 12:56:06 +01:00
Dockerfile.windows update to go1.21.7 2024-02-14 12:56:06 +01:00
Jenkinsfile remove s390x and ppc64ls pipelines 2023-08-14 16:54:44 +02:00
LICENSE Update LICENSE 2018-09-12 14:27:53 +01:00
MAINTAINERS Add Rob Murray (robmry) to curators 2024-01-09 13:20:44 +01:00
Makefile Makefile: Pass PAGER/GIT_PAGER variable 2024-02-20 11:52:58 +01:00
NOTICE switch kr/pty to creack/pty v1.1.7 2019-07-29 16:59:08 -07:00
README.md Fix grammar in README.md 2022-11-10 19:49:41 +00:00
ROADMAP.md Fix some typos in ROADMAP.md 2019-01-25 14:27:13 +08:00
SECURITY.md Update SECURITY.md to have an option to keep name anonymous if requested. 2019-06-18 16:37:16 +00:00
TESTING.md TESTING.md: note that integration-cli is deprecated 2020-12-18 07:51:46 +01:00
vendor.mod vendor: github.com/containerd/continuity v0.4.3 2024-02-22 10:24:52 +01:00
vendor.sum vendor: github.com/containerd/continuity v0.4.3 2024-02-22 10:24:52 +01:00
VENDORING.md fix the bare url and the Summary of http://semver.org 2017-01-17 16:20:11 +08:00

The Moby Project

Moby Project logo

Moby is an open-source project created by Docker to enable and accelerate software containerization.

It provides a "Lego set" of toolkit components, the framework for assembling them into custom container-based systems, and a place for all container enthusiasts and professionals to experiment and exchange ideas. Components include container build tools, a container registry, orchestration tools, a runtime and more, and these can be used as building blocks in conjunction with other tools and projects.

Principles

Moby is an open project guided by strong principles, aiming to be modular, flexible and without too strong an opinion on user experience. It is open to the community to help set its direction.

  • Modular: the project includes lots of components that have well-defined functions and APIs that work together.
  • Batteries included but swappable: Moby includes enough components to build fully featured container systems, but its modular architecture ensures that most of the components can be swapped by different implementations.
  • Usable security: Moby provides secure defaults without compromising usability.
  • Developer focused: The APIs are intended to be functional and useful to build powerful tools. They are not necessarily intended as end user tools but as components aimed at developers. Documentation and UX is aimed at developers not end users.

Audience

The Moby Project is intended for engineers, integrators and enthusiasts looking to modify, hack, fix, experiment, invent and build systems based on containers. It is not for people looking for a commercially supported system, but for people who want to work and learn with open source code.

Relationship with Docker

The components and tools in the Moby Project are initially the open source components that Docker and the community have built for the Docker Project. New projects can be added if they fit with the community goals. Docker is committed to using Moby as the upstream for the Docker Product. However, other projects are also encouraged to use Moby as an upstream, and to reuse the components in diverse ways, and all these uses will be treated in the same way. External maintainers and contributors are welcomed.

The Moby project is not intended as a location for support or feature requests for Docker products, but as a place for contributors to work on open source code, fix bugs, and make the code more useful. The releases are supported by the maintainers, community and users, on a best efforts basis only, and are not intended for customers who want enterprise or commercial support; Docker EE is the appropriate product for these use cases.


Legal

Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.

Use and transfer of Moby may be subject to certain restrictions by the United States and other governments.

It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.

For more information, please see https://www.bis.doc.gov

Licensing

Moby is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.