Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Go to file
Sebastiaan van Stijn 59854e407d
Change return for errdefs.getImplementer()
The types defined in the errdefs package do not
satisfy the `error` interface, because they do not
implement `Error()`.

Instead of returning the matched interface, return
the original error.

When matching _multiple_ interfaces/types, Golang doesn't complain:

    func getImplementer(err error) error {
        switch e := err.(type) {
        case
            ErrNotFound,
            ErrInvalidParameter:
            return e
        default:
            return err
        }
    }

But matching a single interface/type:

    func getImplementer(err error) error {
        switch e := err.(type) {
        case
            ErrNotFound:
            return e
        default:
            return err
        }
    }

Produces an error:

    cannot use e (type ErrNotFound) as type error in return argument: ErrNotFound does not implement error (missing Error method)

Return the original `err` instead of the matched interface/type instead.

Also added some additional tests

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-05 23:41:58 +01:00
.github Rename a few docker to moby 2017-10-25 13:56:12 +02:00
api Content encoding negotiation added to archive request. 2018-02-24 06:41:45 +01:00
builder Merge pull request #36424 from liubin/fix-typo 2018-02-27 10:24:20 +01:00
cli Add canonical import comment 2018-02-05 16:51:57 -05:00
client Merge pull request #36424 from liubin/fix-typo 2018-02-27 10:24:20 +01:00
cmd/dockerd Move all daemon image methods into imageService 2018-02-26 16:48:29 -05:00
container Clean-up after container unit test 2018-02-28 01:15:15 +00:00
contrib Bump Golang to 1.9.4 2018-02-07 14:49:51 -08:00
daemon Merge pull request #36475 from IRCody/logdriver-errors 2018-03-03 15:51:35 -08:00
distribution Add canonical import comment 2018-02-05 16:51:57 -05:00
dockerversion Add canonical import comment 2018-02-05 16:51:57 -05:00
docs Adjust minimum API version for templated configs/secrets 2018-02-21 15:23:00 +01:00
errdefs Change return for errdefs.getImplementer() 2018-03-05 23:41:58 +01:00
hack Bump Runc to 1.0.0-rc5 / 4fc53a81fb7c994640722ac585fa9ca548971871 2018-02-28 21:39:59 +01:00
image Don't restore image if layer does not exist 2018-02-13 11:51:01 -08:00
integration Merge pull request #36468 from vdemeester/e2e-container-run 2018-03-05 12:23:24 -08:00
integration-cli Merge pull request #36468 from vdemeester/e2e-container-run 2018-03-05 12:23:24 -08:00
internal Fixes some integration/container test to run on remote daemon 2018-03-05 14:24:01 +01:00
layer Add canonical import comment 2018-02-05 16:51:57 -05:00
libcontainerd Windows: Remove servicing mode 2018-02-27 08:48:31 -08:00
migrate/v1 Add canonical import comment 2018-02-05 16:51:57 -05:00
oci Add /proc/keys to masked paths 2018-02-21 16:23:34 +00:00
opts Add canonical import comment 2018-02-05 16:51:57 -05:00
pkg Merge pull request #35829 from cpuguy83/no_private_mount_for_plugins 2018-02-21 12:28:13 +01:00
plugin Merge pull request #35829 from cpuguy83/no_private_mount_for_plugins 2018-02-21 12:28:13 +01:00
profiles Add canonical import comment 2018-02-05 16:51:57 -05:00
project Add Moby TSC references/governance details 2017-12-13 16:51:46 -05:00
reference Add canonical import comment 2018-02-05 16:51:57 -05:00
registry Add canonical import comment 2018-02-05 16:51:57 -05:00
reports Add builder dev report for 2017-07-17 2017-07-18 18:31:42 -07:00
restartmanager Add canonical import comment 2018-02-05 16:51:57 -05:00
runconfig Add canonical import comment 2018-02-05 16:51:57 -05:00
vendor bump containerd/console to 2748ece16665b45a47f884001d5831ec79703880 2018-02-28 21:43:20 +01:00
volume Print which path failed when the mount source doesn't exist. 2018-02-27 23:19:46 +00: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 Add code coverage report and codecov config 2018-01-16 16:50:56 -05:00
.mailmap Update authors 2018-02-21 21:12:31 +01:00
AUTHORS Update authors 2018-02-21 21:12:31 +01:00
CHANGELOG.md Dropped hyphen in bind mount where appropriate 2017-08-19 21:25:07 +07:00
CONTRIBUTING.md Fix a typo in CONTRIBUTING.md 2018-01-28 16:19:51 +00:00
Dockerfile Merge pull request #36425 from vdemeester/dockerfile-adjusts 2018-02-28 23:07:27 +01:00
Dockerfile.aarch64 Add `busybox:latest` into the frozen images 2018-02-27 06:28:29 +00:00
Dockerfile.armhf Add `busybox:latest` into the frozen images 2018-02-27 06:28:29 +00:00
Dockerfile.e2e Add `busybox:latest` into the frozen images 2018-02-27 06:28:29 +00:00
Dockerfile.ppc64le Add `busybox:latest` into the frozen images 2018-02-27 06:28:29 +00:00
Dockerfile.s390x Add `busybox:latest` into the frozen images 2018-02-27 06:28:29 +00:00
Dockerfile.simple Split binary installers/commit scripts 2018-02-21 15:39:24 -05:00
Dockerfile.windows Bump Golang to 1.9.4 2018-02-07 14:49:51 -08:00
LICENSE Update copyright dates 2017-02-24 19:41:59 +00:00
MAINTAINERS Clean some maintainers 👼 2018-02-13 14:42:50 +01:00
Makefile Merge pull request #34369 from cyphar/build-buildmode-pie 2018-01-29 23:54:03 +09:00
NOTICE Update LICENSE date 2017-02-15 17:34:33 +01: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
VENDORING.md fix the bare url and the Summary of http://semver.org 2017-01-17 16:20:11 +08:00
codecov.yml Add code coverage report and codecov config 2018-01-16 16:50:56 -05:00
poule.yml Clean some maintainers 👼 2018-02-13 14:42:50 +01:00
vendor.conf bump containerd/console to 2748ece16665b45a47f884001d5831ec79703880 2018-02-28 21:43:20 +01:00

README.md

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.