Giter VIP home page Giter VIP logo

moby's Introduction

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.

moby's People

Contributors

aaronlehmann avatar aboch avatar akihirosuda avatar albers avatar alexlarsson avatar calavera avatar corhere avatar cpuguy83 avatar creack avatar crosbymichael avatar dnephin avatar icecrime avatar jamtur01 avatar jessfraz avatar kolyshkin avatar lk4d4 avatar lowenna avatar mavenugo avatar metalivedev avatar mrjana avatar runcom avatar svendowideit avatar thajeztah avatar tianon avatar tiborvass avatar tonistiigi avatar unclejack avatar vieux avatar vvoland avatar yongtang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moby's Issues

Add ability to throttle bandwidth by container

In some test cases it would be nice to see how code performs when at a limited bandwidth, for example 28k, 56k, etc. Adding this ability to docker would make running these sort of tests easier.

It would also be handy from an administrator perspective as well.

Standalone mode

Docker should be able to run in standalone mode, ie without a daemon running in the background. If possible the syntax should be the same in standalone mode and client mode.

For example: 'docker run -a base:e9cb4ad9173245ac /bin/ls' in standalone mode should fork and execute a new container, attach to it, and exit when it returns.

Of course detached mode would not be possible in standalone mode.

Addressability of Container Copies among machines

If I am running 10000 copies of the same container across multiple machines but not each on its own machine, how can each container uniquely identify itself? How can I attach to (or otherwise manipulate) a specific copy of the container? Is there a way to broadcast instructions to all of them?

Performance of AUFS/IO Burden

At what point does the AUFS file system become an IO burden instead of a benefit? That is, how many layers need to be tracked to resolve the final value of a byte in a file? What happens to files/bytes that will never be referenced because they are masked by something that has been written back to the file system?

Auto-restart processes

Docker should be capable of restarting its child processes when they exit or are killed. This behavior should be optional: sometimes you don't want the process to be restarted (singleton jobs, interactive shells...)

Data volumes

This is a placeholder for @jpetazzo's adamant request for data volumes :)

Jerome, I will let you make your case in your own words. I agree with a lot of it, although we'll have to be careful how we distill it into the simplest possible API, and I'm not sure how early we want to do it.

Store container logs on disk

Currently container logs are buffered in memory. If dockerd restarts, they are lost. They should be stored on disk instead.

Docker should not be responsible for managing rotation or other fancy log management strategies. It should expose a reasonable API for 3d-party logging tools to easily integrate with Docker (this will be the subject of another issue).

Memory limits

Docker already uses cgroups. Let's take advantage of this and enable per-container limits on ram usage.

Docker should expose the following per-container configuration:

  • Memory hard limit
  • Memory soft limit
  • OOM behavior

Create a way to expose metrics from Docker

right now there is no standard way on how to expose metric information about a container with docker. It would be helpful if there was some sort of metrics API, to make it easier to expose the metric information.

Download missing images automatically on "docker run"

It would be a nice convenience if 'docker run' automatically tried downloading missing images before running.

With this feature, getting started with docker would be as simple as:

$ apt-get install docker
$ docker run base echo hello world

:)

Run docker inside docker

We already build docker inside a docker container. If that container had the ability to run the test suite, then we could bootstrap a full CI environment on top of docker.

But that requires the ability to create containers within a docker container...

Template-less DNS auto-configuration

The containers system currently in production at dotCloud relies on a templating mechanism to setup a bunch of files before containers are actually started; namely:

  • /etc/hostname
  • /etc/network/interfaces
  • ... some service-dependent configuration files ...
  • /etc/resolv.conf

Almost all this templating magic can be waived a way or another (e.g., network configuration can be done "from outside" by Docker itself, instead of relying on inside-the-container distro scripts).

However, one item remains: /etc/resolv.conf. If we want the container to be able to do any kind of DNS resolution (and we probably do!) we need a valid /etc/resolv.conf.

Here are a few facts:

  • if /etc/resolv.conf does not contain a "nameserver" entry (a fortiori if it's empty!), it will try to talk to the local DNS server (i.e. 127.0.0.1)
  • the resolver behavior used to be override-able with e.g. RESOLV_HOST_CONF, but that was before the days of NSS
  • /etc/resolv.conf can be itself completely bypassed by /etc/nsswitch.conf (the Name Service Switch master configuration file, which lets people enable NIS, LDAP, etc. for getpwnam, gethostbyaddr, and other resolving functions)
  • AFAIK there is no default configuration for nsswitch.conf (i.e. if it's empty, the system will probably be unusable)

Its' safe that >99% of the systems out there are setup to use /etc/resolv.conf (with <1% with LDAP etc.), so the overwhelming majority of systems will work if we override /etc/resolv.conf. This can be done in multiple ways:

  • if / is a writable (e.g. AUFS) filesystem, just overwrite /etc/resolv.conf
  • if / is read-only, update the base image, so that /etc/resolv.conf will be a symlink to a writable place (e.g. /tmp/resolv.conf)
  • bind-mount a pre-generated resolv.conf file over it (yes, you can bind-mount a file over another one!)
  • make sure that /etc/resolv.conf doesn't exist, and setup "something" to listen on *:53 and relay DNS queries to a proper resolver

Generally speaking, the issue might arise with other configuration files. However, this should be fairly limited. There is a vast amount of knowledge out there about operation of disk-less UNIX systems, using e.g. read-only NFS root filesystems. Such methods exist since the 90s and all decent distros even have hooks to support read-only rootfs operation. I expect that exceptions would stem from brain-dead vendor binaries assuming some configuration file to be located in a hard-coded location (e.g. /etc/foo.conf or /opt/foo-1.0.42/etc/foo.conf).

For now, I tend to favor the bind-mount option, since:

  • it doesn't involve AUFS
  • it doesn't involve templating (the resolv.conf file ought to be the same for every container)
  • it doesn't involve changing the base layer (as long as it contains a resolv.conf file)

Restore after a crash

If docker crashes while its child processes were running, it should be capable of seamlessly restoring its previous state when run again.

This means:

  1. Re-attaching to child processes which are still running (or killing them if that's not possible)

  2. Re-starting processes which were running at the time of the crash (eg. after a host reboot).

have better docker build file names

right now the docker build files on the download server aren't very helpful, it would be nice to have names with more info, maybe date of build, or version number, this will make it easier t o pin to a specific version.

Add an index to /var/lib/docker/containers

Docker keeps a lot of data on the disk. Basically one directory per command.

It's really important to hash the container directories in order to not reach a critical amount of directories inside /var/lib/docker/containers.

The problem with directory hashing is that it'll be more difficult to list the containers (without walking the whole filesystem). It's then mandatory to index the directories (using a sqlite db?) to keep the ps command fast (and to limit this command to a certain number of containers by default).

Catch non-200 HTTP statuses on "docker pull"

Currently, if you attempt to pull an existing image name with a non-existent revision, you receive the following error:

chooper@chimay:~/projects/docker/bin$ ./docker pull base:d34db33f
Downloading from base:d34db33f
Unpacking to base:d34db33f
curl: (6) Couldn't resolve host 'base'
base:d34db33f:e3b0c44298fc1c14
chooper@chimay:~/projects/docker/bin$ ./docker images
NAME                ID                               CREATED             PARENT
base:d34db33f       base:d34db33f:e3b0c44298fc1c14   2 minutes ago    

Broken termios settings on linux client

Allocating and configuring a tty ('docker run -t') works ok on a darwin client, but pretty badly on a linux client.

This is easy to reproduce with an interactive shell on the base image:

docker run -a -i -t base:e9cb4ad9173245ac /bin/bash

Image names require character restrictions

Currently, docker doesn't complain if you create an image with, for example, a colon in the name. However, if you then try to reference that image name, docker may believe you are pegging a specific version (since we use format $IMAGE_NAME:$REVISION) and certain commands will fail.

Validate and/or sanitize image names so, at the very least, they cannot contain colons.

Track CPU usage

It would be nice if container CPU usage was tracked and exposed in some way.

Uniqueness of Checksums as Idenifiers

How sure are you of that checksum's "universal uniqueness"?
That seems like a much shorter UUID than any other I've seen, and assuming that a faulty checksum uniquely identifies a container could lead to some terrible collisions.

Document how to contribute

Anybody interested in contributing to Docker should be able to do it as easily as possible.

That means:

  • accurate and simple instructions for setting up a dev environment
  • contribution guidelines

Install on Ubuntu 12.04 LTS

Currently dockerd requires Ubuntu 12.10. What would it take to get it working on 12.04? @brianm notes that many shops are sticking to LTS, and therefore might not be able to adopt docker as easily.

'docker commit' does not record deleted files

What steps will reproduce the problem?

  $ C=$(docker run base:e9cb4ad9173245ac /bin/sh -c "echo hello > /foo")
  $ IMG_ADDED=$(docker commit $C _/tmp/testrm)
  $ C=$(docker run $IMG_ADDED /bin/rm /foo)
  $ IMG_REMOVED=$(docker commit $C _/tmp/testrm)
  $ docker run -a $IMG_REMOVED /bin/cat /foo

What is the expected output?

  /bin/cat: /foo: No such file or directory

What do you see instead?

  hello

dockerweb.html not installed

"docker web" looks for dockerweb.html in the current working directory, which isn't currently installed anywhere. Make dockerweb.html part of the install. It could be placed in /var/lib/docker for now

Dockerd leaks environment variables into the containers

Containers inherit their environment from dockerd. They shouldn't.

We need 1) a minimal, predictable default environment for all containers, and 2) a mechanism for injecting new variables on a per-container basis (probably a new flag to docker run)

Which open-source licence should we use?

We are keeping Docker private while it incubates, but it is destined to be open-sourced. Under which licence should we do that?

Our priority in choosing a licence should be adoption. It should be as easy as possible for as many people as possible to use Docker.

Running '/bin/cat /dev/zero' in a container kills Docker with 'Signal 9'

When I create a new container and run the command '/bin/cat /dev/zero' inside it, it runs for approximately 2-5 seconds, then Docker prints 'Signal 9' and exits.

I could reproduce this reliably with the same command, but could not reproduce it with any other command. In particular, short-lived commands (eg. '/bin/touch /foobar') run properly without crashing, as well as other long-lived commands (eg. '/bin/sleep 10').

Publish smaller base image

Our current base image is a vanilla quantal base image, built with the following command:

debootstrap quantal ./base

The resulting image is 194MB uncompressed.

We could make that image smaller by using a "minbase" variation:

debootstrap --variant=minbase quantal ./minbase

The resulting image is 105MB uncompressed, 34MB gzipped.

Package docker for Ubuntu

It would be awesome to be able to install the latest version of docker on Ubuntu with simply "apt-get install docker".

Dead-simple EC2 install

Docker should be dead-simple to get working on EC2. The README should include instructions for this - 1 or 2 commands at most.

This could work with simply a custom .deb and ppa. But that might require installing a new kernel and rebooting. It would be nice to have instructions that don't require any reboot. Maybe with a custom AMI, or a pre-existing base AMI which has the kernel we need?

Generate an AMI from any docker container

Note: this probably belongs in a helper tool, rather than docker core.

Authoring AMIs is a pain in the ass. The best solution to the problem is to install docker on EC2, and never author an AMI again.

But sometimes installing docker is not an option - maybe you depend on a kernel which isn't supported by docker, or your workflow is locked into the EC2 toolchain, or maybe you're happy with your existing process manager.

In this case, wouldn't it be cool to still author your filesystem images with 'docker commit', then export them to create AMIs effortlessly?

Inspiration: https://bitbucket.org/dotcloud/vm2vm/src

"docker help" repeats usage or runs commands in some cases

chooper@chimay:~/projects/docker/bin$ ./docker help images

Usage: docker images [OPTIONS] [NAME]

List images

  -l=0: Only show the N most recent versions of each image
  -q=false: only show numeric IDs
NAME                ID                        CREATED             PARENT
Foo                 Foo:70e160905d3ce6c0...   25 minutes ago      base:e9cb4ad9173245ac
base                base:e9cb4ad9173245ac     31 minutes ago      
chooper@chimay:~/projects/docker/bin$ ./docker help inspect

Usage: docker inspect [OPTIONS] CONTAINER

Return low-level information on a container


Usage: docker inspect [OPTIONS] CONTAINER

Return low-level information on a container

Whiteouts in layers

Will layers store whiteouts (a list of files to remove) in addition to added files?

If I remove /foo in a container, and export those changes into a new layer, what happens when I run a new container using that layer? Either a) /foo will be present (whiteouts are not stored in the layer), or b) /foo will not be present (whiteouts are stored in the layer).

Question 1: are whiteouts needed? Are certain use cases only possible with whiteouts?

Question 2: if we do need whiteouts in layer, what format should we use? We could use AUFS's convention - effectively making aufs part of the api, instead of just an implementation detail. Do we want that?

'docker pull' should only download missing versions

Currently 'docker pull' must perform a full download before it can determine which images it already has. The download protocol should support checking for available versions, and only downloading missing versions.

This is especially interesting when downloading many images derived from the same base. Typically the base is much larger than the changes, so download times are vastly reduced.

Security: Authentication model

If you can manipulate docker from inside docker, what is the authentication model?
How do I keep other containers from messing with me, cloning me, starting me, stopping me?
Or how do I give them permission to do so?

/dev/tty does not map to the terminal allocated with "docker run -t"

The "run -t" flag correctly allocates a pseudo-terminal and maps it to the process' stdin, stdout and stder. If that process opens /dev/tty, the correct behavior would be to return a file descriptor to the same pseudo-terminal. Eg. writing to it should produce output in the docker client, and reading from it should yield what was input on the docker client.

Instead, it returns a descriptor on the controlling termimal of dockerd. Eg output appears in the terminal which started dockerd. If dockerd doesn't have a controlling terminal, opening /dev/tty will fail altogether.

Publish new images with 'docker push'

'docker push' should allow publishing images on a public mirror so that any other docker user can use them.

Images would be available under a namespace similar to github: username/project

usernames could be reserved with a builtin signup/login system, similar to 'npm adduser'.

Container tagging / naming

In previous conversations I think we agreed that the ability to tag containers would be nice, but there was no compelling reason to add it to the core. Especially with globally unique IDs, it's super easy for a user to store all the metadata he needs himself: users, applications, services, versions, source repository, source tag, whatever.

However there is one thing that is only possible in the core: atomic operations on a set of containers matching certain tags. In the future that might be a necessary feature, for a number of reasons:

a) Performance (to avoid running 200 duplicate commands for 200 containers)
b) Reliability (eg. less moving parts when coordinating many dockers)
c) Ease of development

I don't have a set opinion, but wanted to write this down for later discussion.

Remote API

Expose an API to allow programmatic interaction with docker over the network.

cc @aluzzardi @progrium feel free to record your preferences here for design, technology choices etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.