2016-04-05 02:20:51 +08:00
# Open Container Runtime Specification
2015-06-06 08:39:27 +08:00
2016-04-05 02:20:51 +08:00
The [Open Container Initiative ](http://www.opencontainers.org/ ) develops specifications for standards on Operating System process and application containers.
2015-09-11 02:02:35 +08:00
2015-06-25 08:15:48 +08:00
Table of Contents
2016-03-09 07:38:46 +08:00
- [Introduction ](README.md )
2016-05-03 02:04:54 +08:00
- [Code of Conduct ](#code-of-conduct )
2016-03-09 07:38:46 +08:00
- [Container Principles ](principles.md )
- [Style and Conventions ](style.md )
- [Roadmap ](ROADMAP.md )
- [Implementations ](implementations.md )
2016-04-12 15:16:10 +08:00
- [project ](project.md )
2015-06-25 08:15:48 +08:00
- [Filesystem Bundle ](bundle.md )
2016-04-27 06:33:33 +08:00
- Runtime and Lifecycle
- [General Runtime and Lifecycle ](runtime.md )
- [Linux-specific Runtime and Lifecycle ](runtime-linux.md )
2015-09-11 02:36:13 +08:00
- Configuration
2016-04-27 06:33:33 +08:00
- [General Configuration ](config.md )
- [Linux-specific Configuration ](config-linux.md )
2016-05-06 00:17:38 +08:00
- [Solaris-specific Configuration ](config-solaris.md )
2015-08-12 01:15:20 +08:00
- [Glossary ](glossary.md )
2015-06-25 08:15:48 +08:00
2015-12-02 05:25:59 +08:00
In the specifications in the above table of contents, the keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in [RFC 2119 ](http://tools.ietf.org/html/rfc2119 ) (Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997).
2016-04-12 11:59:42 +08:00
An implementation is not compliant if it fails to satisfy one or more of the MUST or REQUIRED requirements for the protocols it implements.
2016-04-07 05:20:26 +08:00
An implementation that satisfies all the MUST or REQUIRED and all the SHOULD requirements for its protocols is said to be "unconditionally compliant".
2015-09-11 02:36:13 +08:00
# Use Cases
2015-07-29 23:24:46 +08:00
To provide context for users the following section gives example use cases for each part of the spec.
2015-12-23 14:02:49 +08:00
#### Application Bundle Builders
2015-07-29 23:24:46 +08:00
2015-12-23 14:02:49 +08:00
Application bundle builders can create a [bundle ](bundle.md ) directory that includes all of the files required for launching an application as a container.
config: Single, unified config file
Reverting 7232e4b1 (specs: introduce the concept of a runtime.json,
2015-07-30, #88) after discussion on the mailing list [1]. The main
reason is that it's hard to draw a clear line around "inherently
runtime-specific" or "non-portable", so we shouldn't try to do that in
the spec. Folks who want to flag settings as non-portable for their
own system are welcome to do so (e.g. "we will clobber 'hooks' in
bundles we run") are welcome to do so, but we don't have to have
to split the config into multiple files to do that.
There have been a number of additional changes since #88, so this
isn't a pure Git reversion. Besides copy-pasting and the associated
link-target updates, I've:
* Restored path -> destination, now that the mount type contains both
source and target paths again. I'd prefer 'target' to 'destination'
to match mount(2), but the pre-7232e4b1 phrasing was 'destination'
(possibly due to Windows using 'target' for the source?).
* Restored the Windows mount example to its pre-7232e4b1 content.
* Removed required mounts from the config example (requirements landed
in 3848a238, config-linux: specify the default devices/filesystems
available, 2015-09-09, #164), because specifying those mounts in the
config is now redundant.
* Used headers (vs. bold paragraphs) to set off mount examples so we
get link anchors in the rendered Markdown.
* Replaced references to runtime.json with references to config.json.
[1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/0QbyJDM9fWY
Subject: Single, unified config file (i.e. rolling back specs#88)
Date: Wed, 4 Nov 2015 09:53:20 -0800
Message-ID: <20151104175320.GC24652@odin.tremily.us>
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-12-29 02:06:40 +08:00
The bundle contains an OCI [configuration file ](config.md ) where the builder can specify host-independent details such as [which executable to launch ](config.md#process-configuration ) and host-specific settings such as [mount ](config.md#mounts ) locations, [hook ](config.md#hooks ) paths, Linux [namespaces ](config-linux.md#namespaces ) and [cgroups ](config-linux.md#control-groups ).
2015-12-23 14:02:49 +08:00
Because the configuration includes host-specific settings, application bundle directories copied between two hosts may require configuration adjustments.
2015-07-29 23:24:46 +08:00
2015-12-23 14:02:49 +08:00
#### Hook Developers
config: Single, unified config file
Reverting 7232e4b1 (specs: introduce the concept of a runtime.json,
2015-07-30, #88) after discussion on the mailing list [1]. The main
reason is that it's hard to draw a clear line around "inherently
runtime-specific" or "non-portable", so we shouldn't try to do that in
the spec. Folks who want to flag settings as non-portable for their
own system are welcome to do so (e.g. "we will clobber 'hooks' in
bundles we run") are welcome to do so, but we don't have to have
to split the config into multiple files to do that.
There have been a number of additional changes since #88, so this
isn't a pure Git reversion. Besides copy-pasting and the associated
link-target updates, I've:
* Restored path -> destination, now that the mount type contains both
source and target paths again. I'd prefer 'target' to 'destination'
to match mount(2), but the pre-7232e4b1 phrasing was 'destination'
(possibly due to Windows using 'target' for the source?).
* Restored the Windows mount example to its pre-7232e4b1 content.
* Removed required mounts from the config example (requirements landed
in 3848a238, config-linux: specify the default devices/filesystems
available, 2015-09-09, #164), because specifying those mounts in the
config is now redundant.
* Used headers (vs. bold paragraphs) to set off mount examples so we
get link anchors in the rendered Markdown.
* Replaced references to runtime.json with references to config.json.
[1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/0QbyJDM9fWY
Subject: Single, unified config file (i.e. rolling back specs#88)
Date: Wed, 4 Nov 2015 09:53:20 -0800
Message-ID: <20151104175320.GC24652@odin.tremily.us>
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-12-29 02:06:40 +08:00
[Hook ](config.md#hooks ) developers can extend the functionality of an OCI-compliant runtime by hooking into a container's lifecycle with an external application.
2015-12-23 14:02:49 +08:00
Example use cases include sophisticated network configuration, volume garbage collection, etc.
#### Runtime Developers
Runtime developers can build runtime implementations that run OCI-compliant bundles and container configuration, containing low-level OS and host specific details, on a particular platform.
2015-07-29 23:24:46 +08:00
2015-10-08 15:33:09 +08:00
# Releases
2015-09-11 04:13:37 +08:00
2015-12-17 05:37:50 +08:00
There is a loose [Road Map ](./ROADMAP.md ).
2015-09-11 04:13:37 +08:00
During the `0.x` series of OCI releases we make no backwards compatibility guarantees and intend to break the schema during this series.
2015-07-03 04:56:14 +08:00
# Contributing
2015-08-11 02:02:48 +08:00
Development happens on GitHub for the spec.
Issues are used for bugs and actionable items and longer discussions can happen on the [mailing list ](#mailing-list ).
2015-07-30 02:29:36 +08:00
2016-05-23 09:19:34 +08:00
The specification and code is licensed under the Apache 2.0 license found in the [LICENSE ](./LICENSE ) file.
2015-08-11 02:02:48 +08:00
2015-09-04 21:36:26 +08:00
## Code of Conduct
2016-05-03 02:04:54 +08:00
Participation in the OpenContainers community is governed by [OpenContainer's Code of Conduct ](https://github.com/opencontainers/tob/blob/d2f9d68c1332870e40693fe077d311e0742bc73d/code-of-conduct.md ).
2015-09-04 21:36:26 +08:00
2015-08-11 02:02:48 +08:00
## Discuss your design
The project welcomes submissions, but please let everyone know what you are working on.
Before undertaking a nontrivial change to this specification, send mail to the [mailing list ](#mailing-list ) to discuss what you plan to do.
This gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits.
It also guarantees that the design is sound before code is written; a GitHub pull-request is not the place for high-level discussions.
Typos and grammatical errors can go straight to a pull-request.
When in doubt, start on the [mailing-list ](#mailing-list ).
2015-07-03 04:56:14 +08:00
2015-07-30 02:29:36 +08:00
## Weekly Call
2016-04-07 01:36:44 +08:00
The contributors and maintainers of all OCI projects have a weekly meeting Wednesdays at 10:00 AM (USA Pacific.)
2016-02-25 02:23:05 +08:00
Everyone is welcome to participate via [UberConference web][UberConference] or audio-only: 646-494-8704 (no PIN needed.)
2015-08-27 03:12:10 +08:00
An initial agenda will be posted to the [mailing list ](#mailing-list ) earlier in the week, and everyone is welcome to propose additional topics or suggest other agenda alterations there.
2016-04-05 02:14:04 +08:00
Minutes are posted to the [mailing list ](#mailing-list ) and minutes from past calls are archived to the [wiki ](https://github.com/opencontainers/runtime-spec/wiki ) for those who are unable to join the call.
2015-08-11 02:02:48 +08:00
## Mailing List
You can subscribe and join the mailing list on [Google Groups ](https://groups.google.com/a/opencontainers.org/forum/#!forum/dev ).
2015-07-30 02:29:36 +08:00
README: Document YouTube and IRC backchannel for meetings
On Mon, Aug 10, 2015 at 09:38:50AM -0700, Mrunal Patel wrote [1]:
> There is a limit of 10 participants per hangout. So, I will
> broadcast it at the time when it starts and people who aren't
> invited could view the stream and discuss on IRC.
On Mon, Aug 10, 2015 at 09:53:59AM -0700, Mrunal Patel wrote [2]:
> I think the youtube channel should work as the broadcast link
> https://www.youtube.com/channel/UC1wmLdEYmwWcsFg7bt1s5nw
The IRC channel location is from opencontainers/web@f693390f (updated
content, 2015-06-21).
[1]: https://groups.google.com/a/opencontainers.org/d/msg/dev/Cy5uFI_ySpg/E1FnYUmfDwAJ
From: Mrunal Patel
Subject: Re: Discussions and Notes
Date: Mon, 10 Aug 2015 09:38:50 -0700
Message-ID: <CANEZBD7K=8+i7RaTAkg_0XLUSQrZLykGR0bxce-JtErO8KAQ1Q@mail.gmail.com>
Cc: dev <dev@opencontainers.org>, ...
[2]: https://groups.google.com/a/opencontainers.org/d/msg/dev/Cy5uFI_ySpg/X4RQEx2gDwAJ
From: Mrunal Patel
Subject: Re: Discussions and Notes
Date: Mon, 10 Aug 2015 09:53:59 -0700
Message-ID: <CANEZBD7snSro5GXYc6QRuk3+KnR0WAeFThfQXvOcnx3t9jNXag@mail.gmail.com>
Cc: dev <dev@opencontainers.org>, ...
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-08-11 01:05:48 +08:00
## IRC
2016-03-30 12:22:12 +08:00
OCI discussion happens on #opencontainers on Freenode ([logs][irc-logs]).
README: Document YouTube and IRC backchannel for meetings
On Mon, Aug 10, 2015 at 09:38:50AM -0700, Mrunal Patel wrote [1]:
> There is a limit of 10 participants per hangout. So, I will
> broadcast it at the time when it starts and people who aren't
> invited could view the stream and discuss on IRC.
On Mon, Aug 10, 2015 at 09:53:59AM -0700, Mrunal Patel wrote [2]:
> I think the youtube channel should work as the broadcast link
> https://www.youtube.com/channel/UC1wmLdEYmwWcsFg7bt1s5nw
The IRC channel location is from opencontainers/web@f693390f (updated
content, 2015-06-21).
[1]: https://groups.google.com/a/opencontainers.org/d/msg/dev/Cy5uFI_ySpg/E1FnYUmfDwAJ
From: Mrunal Patel
Subject: Re: Discussions and Notes
Date: Mon, 10 Aug 2015 09:38:50 -0700
Message-ID: <CANEZBD7K=8+i7RaTAkg_0XLUSQrZLykGR0bxce-JtErO8KAQ1Q@mail.gmail.com>
Cc: dev <dev@opencontainers.org>, ...
[2]: https://groups.google.com/a/opencontainers.org/d/msg/dev/Cy5uFI_ySpg/X4RQEx2gDwAJ
From: Mrunal Patel
Subject: Re: Discussions and Notes
Date: Mon, 10 Aug 2015 09:53:59 -0700
Message-ID: <CANEZBD7snSro5GXYc6QRuk3+KnR0WAeFThfQXvOcnx3t9jNXag@mail.gmail.com>
Cc: dev <dev@opencontainers.org>, ...
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-08-11 01:05:48 +08:00
2015-09-10 06:51:56 +08:00
## Git commit
2015-07-03 04:56:14 +08:00
### Sign your work
2015-09-09 22:17:06 +08:00
The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch.
The rules are pretty simple: if you can certify the below (from [developercertificate.org ](http://developercertificate.org/ )):
2015-07-03 04:56:14 +08:00
```
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```
then you just add a line to every git commit message:
Signed-off-by: Joe Smith < joe @ gmail . com >
using your real name (sorry, no pseudonyms or anonymous contributions.)
You can add the sign off when creating the git commit via `git commit -s` .
README: Document YouTube and IRC backchannel for meetings
On Mon, Aug 10, 2015 at 09:38:50AM -0700, Mrunal Patel wrote [1]:
> There is a limit of 10 participants per hangout. So, I will
> broadcast it at the time when it starts and people who aren't
> invited could view the stream and discuss on IRC.
On Mon, Aug 10, 2015 at 09:53:59AM -0700, Mrunal Patel wrote [2]:
> I think the youtube channel should work as the broadcast link
> https://www.youtube.com/channel/UC1wmLdEYmwWcsFg7bt1s5nw
The IRC channel location is from opencontainers/web@f693390f (updated
content, 2015-06-21).
[1]: https://groups.google.com/a/opencontainers.org/d/msg/dev/Cy5uFI_ySpg/E1FnYUmfDwAJ
From: Mrunal Patel
Subject: Re: Discussions and Notes
Date: Mon, 10 Aug 2015 09:38:50 -0700
Message-ID: <CANEZBD7K=8+i7RaTAkg_0XLUSQrZLykGR0bxce-JtErO8KAQ1Q@mail.gmail.com>
Cc: dev <dev@opencontainers.org>, ...
[2]: https://groups.google.com/a/opencontainers.org/d/msg/dev/Cy5uFI_ySpg/X4RQEx2gDwAJ
From: Mrunal Patel
Subject: Re: Discussions and Notes
Date: Mon, 10 Aug 2015 09:53:59 -0700
Message-ID: <CANEZBD7snSro5GXYc6QRuk3+KnR0WAeFThfQXvOcnx3t9jNXag@mail.gmail.com>
Cc: dev <dev@opencontainers.org>, ...
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-08-11 01:05:48 +08:00
2015-09-10 06:51:56 +08:00
### Commit Style
Simple house-keeping for clean git history.
Read more on [How to Write a Git Commit Message ](http://chris.beams.io/posts/git-commit/ ) or the Discussion section of [`git-commit(1)` ](http://git-scm.com/docs/git-commit ).
1. Separate the subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how
* If there was important/useful/essential conversation or information, copy or include a reference
8. When possible, one keyword to scope the change in the subject (i.e. "README: ...", "runtime: ...")
2016-02-25 02:23:05 +08:00
[UberConference]: https://www.uberconference.com/ssaul
2016-03-30 12:22:12 +08:00
[irc-logs]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/