The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Find a file
Sebastiaan van Stijn 5ad1e4be6b
Return 400 status instead of 500 for empty volume create body
The `POST /volumes/create` expects a request body to be provided.
If no body was provided, a 500 status was returned. A 500 status
is incorrect, because the request is invalid (it's not a server
error).

Before this change:

    $ curl --unix-socket /var/run/docker.sock -v -X POST http://localhost/volumes/create

    *   Trying /var/run/docker.sock...
    * Connected to localhost (/Users/sebastiaan/Library/Containers/com.dock) port 80 (#0)
    > POST /volumes/create HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.51.0
    > Accept: */*
    >
    < HTTP/1.1 500 Internal Server Error
    < Api-Version: 1.30
    < Content-Length: 18
    < Content-Type: application/json
    < Date: Wed, 19 Jul 2017 11:29:26 GMT
    < Docker-Experimental: true
    < Ostype: linux
    < Server: Docker/17.06.0-ce (linux)
    <
    {"message":"EOF"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

After this change:

    $ curl --unix-socket /var/run/docker.sock -v -X POST http://localhost/volumes/create

    *   Trying /var/run/docker.sock...
    * Connected to localhost (/var/run/docker.sock) port 80 (#0)
    > POST /volumes/create HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 400 Bad Request
    < Api-Version: 1.36
    < Content-Type: application/json
    < Docker-Experimental: false
    < Ostype: linux
    < Server: Docker/dev (linux)
    < Date: Tue, 09 Jan 2018 15:00:13 GMT
    < Content-Length: 42
    <
    {"message":"no body provided in request"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-16 20:42:44 +01:00
.github Rename a few docker to moby 2017-10-25 13:56:12 +02:00
api Return 400 status instead of 500 for empty volume create body 2018-01-16 20:42:44 +01:00
builder Merge pull request #35638 from cpuguy83/error_helpers2 2018-01-15 10:56:46 -08:00
cli Update logrus to v1.0.1 2017-07-31 13:16:46 -07:00
client Wrap response error for container logs method. 2018-01-12 16:43:51 +01:00
cmd/dockerd Fix node-generic-resources CLI typo 2018-01-10 00:51:47 +01:00
container Golint: remove redundant ifs 2018-01-15 00:42:25 +01:00
contrib [ci] use alternate bash comparison 2018-01-12 11:05:20 -05:00
daemon Merge pull request #36021 from yongtang/30897-follow-up 2018-01-16 09:38:16 +01:00
distribution Move api/errdefs to errdefs 2018-01-11 21:21:43 -05:00
dockerversion api: generalize version information to any platform component 2017-12-06 23:23:55 +01:00
docs Fixed in-container paths in dev doc: moby/moby -> docker/docker. 2017-12-28 20:22:02 -05:00
errdefs Move api/errdefs to errdefs 2018-01-11 21:21:43 -05:00
hack Merge pull request #35929 from arm64b/busybox-ls-compatible 2018-01-15 12:28:13 +01:00
image Golint: remove redundant ifs 2018-01-15 00:42:25 +01:00
integration Fix timeout issue of multi-services cration on AArch64 2018-01-12 11:52:35 +00:00
integration-cli Merge pull request #36018 from thaJeztah/remove-deprecated-testenv-functions 2018-01-15 13:24:52 -08:00
internal TestImportExtremelyLargeImageWorks: optimize DevZero 2017-12-28 13:08:41 -08:00
layer Golint: remove redundant ifs 2018-01-15 00:42:25 +01:00
libcontainerd Move api/errdefs to errdefs 2018-01-11 21:21:43 -05:00
migrate/v1 Golint: remove redundant ifs 2018-01-15 00:42:25 +01:00
oci Don't special case /sys/firmware in masked paths 2017-11-08 12:10:42 -08:00
opts Remove redundant build-tags 2017-12-18 17:41:53 +01:00
pkg Golint: remove redundant ifs 2018-01-15 00:42:25 +01:00
plugin Move api/errdefs to errdefs 2018-01-11 21:21:43 -05:00
profiles Copy Inslice() to those parts that use it 2017-11-10 13:42:38 +08:00
project Add Moby TSC references/governance details 2017-12-13 16:51:46 -05:00
reference Add gosimple linter 2017-09-12 12:09:59 -04:00
registry Move api/errdefs to errdefs 2018-01-11 21:21:43 -05: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 Remove solaris build tag and `contrib/mkimage/solaris 2017-11-02 00:01:46 +00:00
vendor Bump libnetwork to a1dfea384b39779552a3b4837ea9303194950976 2018-01-10 18:09:05 +01:00
volume Merge pull request #35638 from cpuguy83/error_helpers2 2018-01-15 10:56:46 -08:00
.DEREK.yml project: try alexellis/derek bot to manage PRs and issues 2017-12-04 16:11:41 +01: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 Cleanup and sort .mailmap 2018-01-02 12:48:14 +01:00
AUTHORS Update mailmap and authors 2018-01-02 12:47:47 +01:00
CHANGELOG.md Dropped hyphen in bind mount where appropriate 2017-08-19 21:25:07 +07:00
CONTRIBUTING.md Add Moby TSC references/governance details 2017-12-13 16:51:46 -05:00
Dockerfile Upgrade the frozen images to multi-arch 2018-01-11 05:14:09 +00:00
Dockerfile.aarch64 Legacy images replacement with multi-arch ones on AArch64 2017-12-12 05:47:17 +00:00
Dockerfile.armhf Upgrade the frozen images to multi-arch 2018-01-11 05:14:09 +00:00
Dockerfile.e2e Upgrade the frozen images to multi-arch 2018-01-11 05:14:09 +00:00
Dockerfile.ppc64le Upgrade the frozen images to multi-arch 2018-01-11 05:14:09 +00:00
Dockerfile.s390x Upgrade the frozen images to multi-arch 2018-01-11 05:14:09 +00:00
Dockerfile.simple Add required pkg-config for Dockerfile.simple 2018-01-11 20:12:16 +00:00
Dockerfile.windows Bump Go to 1.9.2 2017-11-21 20:57:02 +01:00
LICENSE Update copyright dates 2017-02-24 19:41:59 +00:00
MAINTAINERS Add Moby TSC references/governance details 2017-12-13 16:51:46 -05:00
Makefile api: generalize version information to any platform component 2017-12-06 23:23:55 +01: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 "Lego set" back in README.md 2017-10-10 14:10:39 +00:00
ROADMAP.md Update the Roadmap 2017-10-11 17:33:50 +01:00
TESTING.md Add testing.md 2017-08-04 17:36:18 -04:00
vendor.conf Bump libnetwork to a1dfea384b39779552a3b4837ea9303194950976 2018-01-10 18:09:05 +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 system, 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.