Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
| ... | ... |
@@ -33,97 +33,58 @@ won't be accepting pull requests adding or removing items from this file. |
| 33 | 33 |
|
| 34 | 34 |
# 1. Features and refactoring |
| 35 | 35 |
|
| 36 |
-## 1.1 Security |
|
| 36 |
+## 1.1 Runtime improvements |
|
| 37 | 37 |
|
| 38 |
-Security is a top objective for the Docker Engine. The most notable items we intend to provide in |
|
| 39 |
-the near future are: |
|
| 38 |
+We recently introduced [`runC`](https://runc.io) as a standalone low-level tool for container |
|
| 39 |
+execution. The initial goal was to integrate runC as a replacement in the Engine for the traditional |
|
| 40 |
+default libcontainer `execdriver`, but the Engine internals were not ready for this. |
|
| 40 | 41 |
|
| 41 |
-- Trusted distribution of images: the effort is driven by the [distribution](https://github.com/docker/distribution) |
|
| 42 |
-group but will have significant impact on the Engine |
|
| 43 |
-- [User namespaces](https://github.com/docker/docker/pull/12648) |
|
| 44 |
-- [Seccomp support](https://github.com/docker/libcontainer/pull/613) |
|
| 42 |
+As runC continued evolving, and the OCI specification along with it, we created |
|
| 43 |
+[`containerd`](https://containerd.tools/), a daemon to control and monitor multiple `runC`. This is |
|
| 44 |
+the new target for Engine integration, as it can entirely replace the whole `execdriver` |
|
| 45 |
+architecture, and container monitoring along with it. |
|
| 45 | 46 |
|
| 46 |
-## 1.2 Plumbing project |
|
| 47 |
+Docker Engine will rely on a long-running `containerd` companion daemon for all container execution |
|
| 48 |
+related operations. This could open the door in the future for Engine restarts without interrupting |
|
| 49 |
+running containers. |
|
| 47 | 50 |
|
| 48 |
-We define a plumbing tool as a standalone piece of software usable and meaningful on its own. In |
|
| 49 |
-the current state of the Docker Engine, most subsystems provide independent functionalities (such |
|
| 50 |
-the builder, pushing and pulling images, running applications in a containerized environment, etc) |
|
| 51 |
-but all are coupled in a single binary. We want to offer the users to flexibility to use only the |
|
| 52 |
-pieces they need, and we will also gain in maintainability by splitting the project among multiple |
|
| 53 |
-repositories. |
|
| 51 |
+## 1.2 Plugins improvements |
|
| 54 | 52 |
|
| 55 |
-As it currently stands, the rough design outlines is to have: |
|
| 56 |
-- Low level plumbing tools, each dealing with one responsibility (e.g., [runC](https://runc.io)) |
|
| 57 |
-- Docker subsystems services, each exposing an elementary concept over an API, and relying on one or |
|
| 58 |
-multiple lower level plumbing tools for their implementation (e.g., network management) |
|
| 59 |
-- Docker Engine to expose higher level actions (e.g., create a container with volume `V` and network |
|
| 60 |
-`N`), while still providing pass-through access to the individual subsystems. |
|
| 53 |
+Docker Engine 1.7.0 introduced plugin support, initially for the use cases of volumes and networks |
|
| 54 |
+extensions. The plugin infrastructure was kept minimal as we were collecting use cases and real |
|
| 55 |
+world feedback before optimizing for any particular workflow. |
|
| 61 | 56 |
|
| 62 |
-The architectural details are still being worked on, but one thing we know for sure is that we need |
|
| 63 |
-to technically decouple the pieces. |
|
| 57 |
+In the future, we'd like plugins to become first class citizens, and encourage an ecosystem of |
|
| 58 |
+plugins. This implies in particular making it trivially easy to distribute plugins as containers |
|
| 59 |
+through any Registry instance, as well as solving the commonly heard pain points of plugins needing |
|
| 60 |
+to be treated as somewhat special (being active at all time, started before any other user |
|
| 61 |
+containers, and not as easily dismissed). |
|
| 64 | 62 |
|
| 65 |
-### 1.2.1 Runtime |
|
| 63 |
+## 1.3 Internal decoupling |
|
| 66 | 64 |
|
| 67 |
-A Runtime tool already exists today in the form of [runC](https://github.com/opencontainers/runc). |
|
| 68 |
-We intend to modify the Engine to directly call out to a binary implementing the Open Containers |
|
| 69 |
-Specification such as runC rather than relying on libcontainer to set the container runtime up. |
|
| 65 |
+A lot of work has been done in trying to decouple the Docker Engine's internals. In particular, the |
|
| 66 |
+API implementation has been refactored and ongoing work is happening to move the code to a separate |
|
| 67 |
+repository ([`docker/engine-api`](https://github.com/docker/engine-api)), and the Builder side of |
|
| 68 |
+the daemon is now [fully independent](https://github.com/docker/docker/tree/master/builder) while |
|
| 69 |
+still residing in the same repository. |
|
| 70 | 70 |
|
| 71 |
-This plan will deprecate the existing [`execdriver`](https://github.com/docker/docker/tree/master/daemon/execdriver) |
|
| 72 |
-as different runtime backends will be implemented as separated binaries instead of being compiled |
|
| 73 |
-into the Engine. |
|
| 71 |
+We are exploring ways to go further with that decoupling, capitalizing on the work introduced by the |
|
| 72 |
+runtime renovation and plugins improvement efforts. Indeed, the combination of `containerd` support |
|
| 73 |
+with the concept of "special" containers opens the door for bootstrapping more Engine internals |
|
| 74 |
+using the same facilities. |
|
| 74 | 75 |
|
| 75 |
-### 1.2.2 Builder |
|
| 76 |
+## 1.4 Cluster capable Engine |
|
| 76 | 77 |
|
| 77 |
-The Builder (i.e., the ability to build an image from a Dockerfile) is already nicely decoupled, |
|
| 78 |
-but would benefit from being entirely separated from the Engine, and rely on the standard Engine |
|
| 79 |
-API for its operations. |
|
| 78 |
+The community has been pushing for a more cluster capable Docker Engine, and a huge effort was spent |
|
| 79 |
+adding features such as multihost networking, and node discovery down at the Engine level. Yet, the |
|
| 80 |
+Engine is currently incapable of taking scheduling decisions alone, and continues relying on Swarm |
|
| 81 |
+for that. |
|
| 80 | 82 |
|
| 81 |
-### 1.2.3 Distribution |
|
| 82 |
- |
|
| 83 |
-Distribution already has a [dedicated repository](https://github.com/docker/distribution) which |
|
| 84 |
-holds the implementation for Registry v2 and client libraries. We could imagine going further by |
|
| 85 |
-having the Engine call out to a binary providing image distribution related functionalities. |
|
| 86 |
- |
|
| 87 |
-There are two short term goals related to image distribution. The first is stabilize and simplify |
|
| 88 |
-the push/pull code. Following that is the conversion to the more secure Registry V2 protocol. |
|
| 89 |
- |
|
| 90 |
-### 1.2.4 Networking |
|
| 91 |
- |
|
| 92 |
-Most of networking related code was already decoupled today in [libnetwork](https://github.com/docker/libnetwork). |
|
| 93 |
-As with other ingredients, we might want to take it a step further and make it a meaningful utility |
|
| 94 |
-that the Engine would call out to instead of a library. |
|
| 95 |
- |
|
| 96 |
-## 1.3 Plugins |
|
| 97 |
- |
|
| 98 |
-An initiative around plugins started with Docker 1.7.0, with the goal of allowing for out of |
|
| 99 |
-process extensibility of some Docker functionalities, starting with volumes and networking. The |
|
| 100 |
-approach is to provide specific extension points rather than generic hooking facilities. We also |
|
| 101 |
-deliberately keep the extensions API the simplest possible, expanding as we discover valid use |
|
| 102 |
-cases that cannot be implemented. |
|
| 103 |
- |
|
| 104 |
-At the time of writing: |
|
| 105 |
- |
|
| 106 |
-- Plugin support is merged as an experimental feature: real world use cases and user feedback will |
|
| 107 |
-help us refine the UX to make the feature more user friendly. |
|
| 108 |
-- There are no immediate plans to expand on the number of pluggable subsystems. |
|
| 109 |
-- Golang 1.5 might add language support for [plugins](https://docs.google.com/document/d/1nr-TQHw_er6GOQRsF6T43GGhFDelrAP0NqSS_00RgZQ) |
|
| 110 |
-which we consider supporting as an alternative to JSON/HTTP. |
|
| 111 |
- |
|
| 112 |
-## 1.4 Volume management |
|
| 113 |
- |
|
| 114 |
-Volumes are not a first class citizen in the Engine today: we would like better volume management, |
|
| 115 |
-similar to the way network are managed in the new [CNM](https://github.com/docker/docker/issues/9983). |
|
| 116 |
- |
|
| 117 |
-## 1.5 Better API implementation |
|
| 118 |
- |
|
| 119 |
-The current Engine API is insufficiently typed, versioned, and ultimately hard to maintain. We |
|
| 120 |
-also suffer from the lack of a common implementation with [Swarm](https://github.com/docker/swarm). |
|
| 121 |
- |
|
| 122 |
-## 1.6 Checkpoint/restore |
|
| 123 |
- |
|
| 124 |
-Support for checkpoint/restore was [merged](https://github.com/docker/libcontainer/pull/479) in |
|
| 125 |
-[libcontainer](https://github.com/docker/libcontainer) and made available through [runC](https://runc.io): |
|
| 126 |
-we intend to take advantage of it in the Engine. |
|
| 83 |
+We plan to complete this effort and make Engine fully cluster capable. Multiple instances of the |
|
| 84 |
+Docker Engine being already capable of discovering each other and establish overlay networking for |
|
| 85 |
+their container to communicate, the next step is for a given Engine to gain ability to dispatch work |
|
| 86 |
+to another node in the cluster. This will be introduced in a backward compatible way, such that a |
|
| 87 |
+`docker run` invocation on a particular node remains fully deterministic. |
|
| 127 | 88 |
|
| 128 | 89 |
# 2 Frozen features |
| 129 | 90 |
|
| ... | ... |
@@ -139,45 +100,41 @@ The Dockerfile syntax as we know it is simple, and has proven successful in supp |
| 139 | 139 |
definitive move, we temporarily won't accept more patches to the Dockerfile syntax for several |
| 140 | 140 |
reasons: |
| 141 | 141 |
|
| 142 |
-- Long term impact of syntax changes is a sensitive matter that require an amount of attention |
|
| 143 |
-the volume of Engine codebase and activity today doesn't allow us to provide. |
|
| 144 |
-- Allowing the Builder to be implemented as a separate utility consuming the Engine's API will |
|
| 145 |
-open the door for many possibilities, such as offering alternate syntaxes or DSL for existing |
|
| 146 |
-languages without cluttering the Engine's codebase. |
|
| 147 |
-- A standalone Builder will also offer the opportunity for a better dedicated group of maintainers |
|
| 148 |
-to own the Dockerfile syntax and decide collectively on the direction to give it. |
|
| 149 |
-- Our experience with official images tend to show that no new instruction or syntax expansion is |
|
| 150 |
-*strictly* necessary for the majority of use cases, and although we are aware many things are still |
|
| 151 |
-lacking for many, we cannot make it a priority yet for the above reasons. |
|
| 142 |
+ - Long term impact of syntax changes is a sensitive matter that require an amount of attention the |
|
| 143 |
+ volume of Engine codebase and activity today doesn't allow us to provide. |
|
| 144 |
+ - Allowing the Builder to be implemented as a separate utility consuming the Engine's API will |
|
| 145 |
+ open the door for many possibilities, such as offering alternate syntaxes or DSL for existing |
|
| 146 |
+ languages without cluttering the Engine's codebase. |
|
| 147 |
+ - A standalone Builder will also offer the opportunity for a better dedicated group of maintainers |
|
| 148 |
+ to own the Dockerfile syntax and decide collectively on the direction to give it. |
|
| 149 |
+ - Our experience with official images tend to show that no new instruction or syntax expansion is |
|
| 150 |
+ *strictly* necessary for the majority of use cases, and although we are aware many things are |
|
| 151 |
+ still lacking for many, we cannot make it a priority yet for the above reasons. |
|
| 152 | 152 |
|
| 153 | 153 |
Again, this is not about saying that the Dockerfile syntax is done, it's about making choices about |
| 154 | 154 |
what we want to do first! |
| 155 | 155 |
|
| 156 | 156 |
## 2.3 Remote Registry Operations |
| 157 | 157 |
|
| 158 |
-A large amount of work is ongoing in the area of image distribution and |
|
| 159 |
-provenance. This includes moving to the V2 Registry API and heavily |
|
| 160 |
-refactoring the code that powers these features. The desired result is more |
|
| 161 |
-secure, reliable and easier to use image distribution. |
|
| 162 |
- |
|
| 163 |
-Part of the problem with this part of the code base is the lack of a stable |
|
| 164 |
-and flexible interface. If new features are added that access the registry |
|
| 165 |
-without solidifying these interfaces, achieving feature parity will continue |
|
| 166 |
-to be elusive. While we get a handle on this situation, we are imposing a |
|
| 167 |
-moratorium on new code that accesses the Registry API in commands that don't |
|
| 168 |
-already make remote calls. |
|
| 169 |
- |
|
| 170 |
-Currently, only the following commands cause interaction with a remote |
|
| 171 |
-registry: |
|
| 172 |
- |
|
| 173 |
-- push |
|
| 174 |
-- pull |
|
| 175 |
-- run |
|
| 176 |
-- build |
|
| 177 |
-- search |
|
| 178 |
-- login |
|
| 179 |
- |
|
| 180 |
-In the interest of stabilizing the registry access model during this ongoing |
|
| 181 |
-work, we are not accepting additions to other commands that will cause remote |
|
| 182 |
-interaction with the Registry API. This moratorium will lift when the goals of |
|
| 183 |
-the distribution project have been met. |
|
| 158 |
+A large amount of work is ongoing in the area of image distribution and provenance. This includes |
|
| 159 |
+moving to the V2 Registry API and heavily refactoring the code that powers these features. The |
|
| 160 |
+desired result is more secure, reliable and easier to use image distribution. |
|
| 161 |
+ |
|
| 162 |
+Part of the problem with this part of the code base is the lack of a stable and flexible interface. |
|
| 163 |
+If new features are added that access the registry without solidifying these interfaces, achieving |
|
| 164 |
+feature parity will continue to be elusive. While we get a handle on this situation, we are imposing |
|
| 165 |
+a moratorium on new code that accesses the Registry API in commands that don't already make remote |
|
| 166 |
+calls. |
|
| 167 |
+ |
|
| 168 |
+Currently, only the following commands cause interaction with a remote registry: |
|
| 169 |
+ |
|
| 170 |
+ - push |
|
| 171 |
+ - pull |
|
| 172 |
+ - run |
|
| 173 |
+ - build |
|
| 174 |
+ - search |
|
| 175 |
+ - login |
|
| 176 |
+ |
|
| 177 |
+In the interest of stabilizing the registry access model during this ongoing work, we are not |
|
| 178 |
+accepting additions to other commands that will cause remote interaction with the Registry API. This |
|
| 179 |
+moratorium will lift when the goals of the distribution project have been met. |