The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Find a file
Sebastiaan van Stijn 01f9227ec9
Return 400 error if API client is too new
Commit e98e4a7111 implemented API version
negotiation using the `/_ping` endpoint. In that change, URL validation for the
maximum supported API version was removed from the API server (validation for
the _minimum_ version was kept in place).

With this feature, clients that support version negotiation would negotiate the
maximum version supported by the daemon, and downgrade to an older API version
if the client's default API version is not supported.

However, clients that do _not_ support version negotiation can call API versions
that are higher than the maximum supported version. Due to the missing version
check, this is silently ignored, and the daemon's default API version is used.

This is a problem, because the actual API version in use is non-deterministic;
for example, calling `/v9999.9999/version` on a daemon that runs API v1.34 will
use API v1.34, but calling the same URL on an older daemon may use API version
v1.24.

This patch reverts the removal of the API check for maximum supported versions.
The documentation has been updated accordingly

Before this patch is applied, the daemon returns a 200 (success):

    $ curl -v --unix-socket /var/run/docker.sock http://localhost/v9999.9999/version
    *   Trying /var/run/docker.sock...
    * Connected to localhost (/Users/sebastiaan/Library/Containers/com.dock) port 80 (#0)
    > GET /v9999.9999/version HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.54.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Api-Version: 1.32
    < Content-Length: 240
    < Content-Type: application/json
    < Date: Tue, 10 Oct 2017 09:11:29 GMT
    < Docker-Experimental: true
    < Ostype: linux
    < Server: Docker/17.09.0-ce (linux)
    <
    {"Version":"17.09.0-ce","ApiVersion":"1.32","MinAPIVersion":"1.12","GitCommit":"afdb6d4","GoVersion":"go1.8.3","Os":"linux","Arch":"amd64","KernelVersion":"4.9.49-moby","Experimental":true,"BuildTime":"2017-09-26T22:45:38.000000000+00:00"}
    * Connection #0 to host localhost left intact

After this patch is applied, a 400 (Bad Request) is returned:

    $ curl -v --unix-socket /var/run/docker.sock http://localhost/v9999.9999/version
    *   Trying /var/run/docker.sock...
    * Connected to localhost (/var/run/docker.sock) port 80 (#0)
    > GET /v9999.9999/info HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 400 Bad Request
    < Content-Type: application/json
    < Date: Tue, 10 Oct 2017 08:08:34 GMT
    < Content-Length: 89
    <
    {"message":"client version 9999.9999 is too new. Maximim supported API version is 1.34"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-10 11:17:48 +02:00
.github Fix GitHub spelling 2017-10-07 00:10:24 +08:00
api Return 400 error if API client is too new 2017-10-10 11:17:48 +02:00
builder Merge pull request #35138 from vdemeester/foo 2017-10-09 12:16:16 -07:00
cli Update logrus to v1.0.1 2017-07-31 13:16:46 -07:00
client LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00
cmd/dockerd LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
container LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00
contrib Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
daemon LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00
distribution Stop filtering Windows manifest lists by version 2017-10-06 22:37:31 -07:00
dockerversion Spelling fixes 2017-07-03 13:13:09 -07:00
docs Return 400 error if API client is too new 2017-10-10 11:17:48 +02:00
hack Bump vndr to a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384 2017-09-29 15:09:57 +02:00
image LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00
integration Merge pull request #34358 from ripcurld0/fix_link_problem 2017-09-26 18:41:08 +02:00
integration-cli Merge pull request #35103 from abhi/master 2017-10-09 19:32:41 -07:00
internal Docker EE integration test fixes 2017-09-25 18:09:19 +02:00
layer LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
libcontainerd Merge pull request #34846 from Microsoft/jjh/debuggcs 2017-09-19 22:33:46 +02:00
migrate/v1 LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
oci Merge pull request #34356 from mlaventure/update-containerd 2017-08-24 14:25:44 -07:00
opts Merge pull request #34689 from chchliang/envunitest 2017-09-01 10:53:42 -07:00
pkg LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00
plugin LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
profiles Remove double defined alarm 2017-08-19 09:55:03 +02:00
project Fix GitHub spelling 2017-10-07 00:10:24 +08:00
reference Add gosimple linter 2017-09-12 12:09:59 -04:00
registry Merge pull request #34495 from ripcurld0/registry_mirror_json 2017-09-18 21:59:14 -07:00
reports Add builder dev report for 2017-07-17 2017-07-18 18:31:42 -07:00
restartmanager Adding support for docker max restart time 2017-02-04 03:54:47 +00:00
runconfig Volume refactoring for LCOW 2017-09-14 12:33:31 -07:00
vendor Vendoring libnetwork and swarmkit 2017-10-09 13:08:03 -07:00
volume Merge pull request #34792 from runcom/fix-relabel-symlinks 2017-09-27 17:42:23 +02:00
.dockerignore [EXPERIMENTAL] Integration Test on Swarm 2017-02-28 02:10:09 +00:00
.gitignore Cleanup test output, and binaries. 2017-08-09 11:02:57 -04:00
.mailmap Update mailmap and authors 2017-10-04 14:44:24 +02:00
AUTHORS Update mailmap and authors 2017-10-04 14:44:24 +02:00
CHANGELOG.md Dropped hyphen in bind mount where appropriate 2017-08-19 21:25:07 +07:00
CONTRIBUTING.md Merge pull request #34407 from dnephin/add-TESTING-doc 2017-08-17 12:33:43 -07:00
Dockerfile Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.aarch64 Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.armhf Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.e2e Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.ppc64le Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.s390x Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.simple Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.solaris Remove pkcs11, libltdl-dev, and clang for osx. 2017-06-21 11:18:44 -04:00
Dockerfile.windows Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
LICENSE Update copyright dates 2017-02-24 19:41:59 +00:00
MAINTAINERS Fix GitHub spelling 2017-10-07 00:10:24 +08:00
Makefile Add a new entrypoint for CI 2017-09-20 17:26:30 -04:00
NOTICE Update LICENSE date 2017-02-15 17:34:33 +01:00
poule.yml Disable auto-assigning PR's to milestones 2017-06-13 03:32:48 +02:00
README.md Add link to docker.com in README.md 2017-07-06 23:09:54 +05:30
ROADMAP.md Header has incorrect punctuation. 2016-12-19 21:38:59 +08:00
TESTING.md Add testing.md 2017-08-04 17:36:18 -04:00
vendor.conf Vendoring libnetwork and swarmkit 2017-10-09 13:08:03 -07:00
VENDORING.md fix the bare url and the Summary of http://semver.org 2017-01-17 16:20:11 +08:00
VERSION bump API and version 2017-04-11 11:21:55 -07:00

Docker users, see Moby and Docker to clarify the relationship between the projects

Docker maintainers and contributors, see Transitioning to Moby for more details

The Moby Project

Moby Project logo

Moby is an open-source project created by Docker to advance the software containerization movement. It provides a “Lego set” of dozens of components, the framework for assembling them into custom container-based systems, and a place for all container enthusiasts to experiment and exchange ideas.

Moby

Overview

At the core of Moby is a framework to assemble specialized container systems. It provides:

  • A library of containerized components for all vital aspects of a container system: OS, container runtime, orchestration, infrastructure management, networking, storage, security, build, image distribution, etc.
  • Tools to assemble the components into runnable artifacts for a variety of platforms and architectures: bare metal (both x86 and Arm); executables for Linux, Mac and Windows; VM images for popular cloud and virtualization providers.
  • A set of reference assemblies which can be used as-is, modified, or used as inspiration to create your own.

All Moby components are containers, so creating new components is as easy as building a new OCI-compatible container.

Principles

Moby is an open project guided by strong principles, but modular, flexible and without too strong an opinion on user experience, so it is open to the community to help set its direction. The guiding principles are:

  • Batteries included but swappable: Moby includes enough components to build fully featured container system, but its modular architecture ensures that most of the components can be swapped by different implementations.
  • Usable security: Moby will provide secure defaults without compromising usability.
  • Container centric: Moby is built with containers, for running containers.

With Moby, you should be able to describe all the components of your distributed application, from the high-level configuration files down to the kernel you would like to use and build and deploy it easily.

Moby uses containerd as the default container runtime.

Audience

Moby is recommended for anyone who wants to assemble a container-based system. This includes:

  • Hackers who want to customize or patch their Docker build
  • System engineers or integrators building a container system
  • Infrastructure providers looking to adapt existing container systems to their environment
  • Container enthusiasts who want to experiment with the latest container tech
  • Open-source developers looking to test their project in a variety of different systems
  • Anyone curious about Docker internals and how its built

Moby is NOT recommended for:

  • Application developers looking for an easy way to run their applications in containers. We recommend Docker CE instead.
  • Enterprise IT and development teams looking for a ready-to-use, commercially supported container platform. We recommend Docker EE instead.
  • Anyone curious about containers and looking for an easy way to learn. We recommend the docker.com website instead.

Transitioning to Moby

Docker is transitioning all of its open source collaborations to the Moby project going forward. During the transition, all open source activity should continue as usual.

We are proposing the following list of changes:

  • splitting up the engine into more open components
  • removing the docker UI, SDK etc to keep them in the Docker org
  • clarifying that the project is not limited to the engine, but to the assembly of all the individual components of the Docker platform
  • open-source new tools & components which we currently use to assemble the Docker product, but could benefit the community
  • defining an open, community-centric governance inspired by the Fedora project (a very successful example of balancing the needs of the community with the constraints of the primary corporate sponsor)

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.