runc/README.md

165 lines
7.3 KiB
Markdown
Raw Normal View History

# Open Container Initiative Runtime Specification
2015-06-06 08:39:27 +08:00
The [Open Container Initiative][oci] develops specifications for standards on Operating System process and application containers.
The specification can be found [here](spec.md).
## Table of Contents
Additional documentation about how this group operates:
- [Code of Conduct][code-of-conduct]
- [Style and Conventions](style.md)
- [Roadmap](ROADMAP.md)
- [Implementations](implementations.md)
- [Releases](RELEASES.md)
- [project](project.md)
- [charter][charter]
## Use Cases
To provide context for users the following section gives example use cases for each part of the spec.
### Application Bundle Builders
Application bundle builders can create a [bundle](bundle.md) directory that includes all of the files required for launching an application as a container.
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) 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).
Because the configuration includes host-specific settings, application bundle directories copied between two hosts may require configuration adjustments.
### 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.
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.
## Releases
There is a loose [Road Map](./ROADMAP.md).
During the `0.x` series of OCI releases we make no backwards compatibility guarantees and intend to break the schema during this series.
## Contributing
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).
The specification and code is licensed under the Apache 2.0 license found in the [LICENSE](./LICENSE) file.
### 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).
### Weekly Call
README: Document the alternate-week meeting times On Thu, Mar 09, 2017 at 08:37:55AM -0700, Chris Aniszczyk wrote [1]: > summarizing the discussion, how about we just alternative the time like > Jonathan discussed? > > I believe that's the only fair thing to do and it's reassuring to hear from > people like Phil who would be able to make the time along with others. > > I'm fine with the current time (1000AEST/1500PST/0000CET) and then > 0400AEST/0900PST/1800CET The 8am Pacific time ended up working out better than 9am for Jonathan and Samuel [2,3], so I've used that instead of 9am. The 8am slot was confirmed as the most popular slot in a Doodle poll [4], with the following folks approving that slot: * David Lyle * George Lestaris * Jonathan Boulle * Julz * Michael Crosby * Mike Brown * Mrunal Patel * Phil Estes * Rob Dolin * Samuel Ortiz * Stephen Day * Stephen Walli * Vincent Batts * W. Trevor King Removing those folks, the second most popular slot is 5pm Pacific, with the following folks approving that slot: * Aleksa Sarai * Keyang Xie * Lei Jitang * Ma Shimiao * Qiang Huang Stephen and Mrunal approved both slots, and since they frequently anchor the runtime and image conversations respectively, there should be sufficient continuity between the two meetings. The only person voting in the Doodle poll who didn't approve either slot is Tianon. Folks with a POSIX ‘date’ command can find the week number with [5]: $ date +%V There may be some doubling up around the end of the year, but we're usually canceling meetings around then anyway. The 8am Pacific meeting gets the odd slot because it's Europe-friendly and lots of folks will be in Europe on 2017-03-29 for KubeCon [6]. I'd be happier with meeting times anchored to UTC to make life easier for folks outside of the US, but one change at a time ;). Future bumps to meeting.ics should bump LAST-MODIFIED [7] or DTSTAMP [8] for any altered components. We can't use DTSTAMP in the VEVENT because VEVENTs require DTSTAMP [9]. The timezone entry is based on the America/New_York example from [10]. Figuring out a single RRULE to cover both meeting times was beyond my abilities, and while RFC 2445 allowed multiple RRULEs in a single VEVENT [11,12], RFC 5545 does not [13]. Something like: RRULE:FREQ=YEARLY;BYDAY=WE;BYHOUR=8,17;BYSETPOS=1,4,5,8,9,... should be legal (at least for 2017), but Google Calendar [14] doesn't seem to respect BYHOUR expansion, and ICAL.js [15] doesn't seem to respect the BYSETPOS limit, so I gave it up and went with two events. To stick strictly to the ISO weeks we could use: RRULE:FREQ=YEARLY;BYDAY=WE;BYWEEKNO=13,15,17,19,21,23,25,27,29,31,33,35, 37,39,41,43,45,47,49,51 and: RRULE:FREQ=YEARLY;BYDAY=WE;BYWEEKNO=14,16,18,20,22,24,26,28,30,32,34,36, 38,40,42,44,46,48,50,52 but that's tedious to type, and folks probably don't care all that much about ISO weeks. I've gone with WEEKLY and INTERVAL=2 to give us something that might survive the end of the year. The ICS was validated with [16]. The CRLF line endings are intentional [17], and the .gitattributes entry ensures we keep them. The committed files will still have LF endings, which can confuse 'git diff ...', but you can use --ignore-space-at-eol to see what really changed. [1]: https://groups.google.com/a/opencontainers.org/d/msg/dev/p0mTOspVgd0/mh7FYse2BAAJ Subject: Re: Moving the OCI Call (again) Date: Thu, 9 Mar 2017 08:37:55 -0700 Message-ID: <CAJg1wMTCGEFRuKoKBEbUPdho82TVH8sPZdGORK_NA2vCNe+w9w@mail.gmail.com> [2]: https://groups.google.com/a/opencontainers.org/d/msg/dev/p0mTOspVgd0/ULXnARy9BAAJ Subject: Re: Moving the OCI Call (again) Date: Thu, 9 Mar 2017 18:33:34 +0100 Message-ID: <CAPWU_0rByhFp=jQQ6cvagHJuYmeTvN7T1zAW+oZR3=F1W8b_rw@mail.gmail.com> [3]: https://github.com/opencontainers/runtime-spec/pull/719#pullrequestreview-26109314 [4]: http://doodle.com/poll/zu664785gb59pwkg [5]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html [6]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-03-22-21.00.log.html [7]: https://tools.ietf.org/html/rfc5545#section-3.8.7.3 [8]: https://tools.ietf.org/html/rfc5545#section-3.8.7.2 [9]: https://tools.ietf.org/html/rfc5545#section-3.6.1 [10]: https://tools.ietf.org/html/rfc5545#page-69 [11]: https://tools.ietf.org/html/rfc2445#section-4.6.1 [12]: https://tools.ietf.org/html/rfc2445#section-4.8.5.4 [13]: https://tools.ietf.org/html/rfc5545#appendix-A.1 [14]: https://calendar.google.com/ [15]: http://mozilla-comm.github.io/ical.js/ [16]: https://icalendar.org/validator.html [17]: https://tools.ietf.org/html/rfc5545#section-3.1 Signed-off-by: W. Trevor King <wking@tremily.us>
2017-03-10 01:12:19 +08:00
The contributors and maintainers of all OCI projects have a weekly meeting on Wednesdays at:
* 8:00 AM (USA Pacific), during [odd weeks][iso-week].
* 5:00 PM (USA Pacific), during [even weeks][iso-week].
There is an [iCalendar][rfc5545] format for the meetings [here](meeting.ics).
Everyone is welcome to participate via [UberConference web][uberconference] or audio-only: +1 415 968 0849 (no PIN needed).
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.
Minutes are posted to the [mailing list](#mailing-list) and minutes from past calls are archived [here][minutes], with minutes from especially old meetings (September 2015 and earlier) archived [here][runtime-wiki].
### Mailing List
You can subscribe and join the mailing list on [Google Groups][dev-list].
### IRC
OCI discussion happens on #opencontainers on Freenode ([logs][irc-logs]).
### Git commit
#### Sign your work
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 http://developercertificate.org):
```
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`.
#### Commit Style
Simple house-keeping for clean git history.
Read more on [How to Write a Git Commit Message][how-to-git-commit] or the Discussion section of [git-commit(1)][git-commit.1].
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: ...")
[charter]: https://www.opencontainers.org/about/governance
[code-of-conduct]: https://github.com/opencontainers/tob/blob/master/code-of-conduct.md
[dev-list]: https://groups.google.com/a/opencontainers.org/forum/#!forum/dev
[how-to-git-commit]: http://chris.beams.io/posts/git-commit
[irc-logs]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/
README: Document the alternate-week meeting times On Thu, Mar 09, 2017 at 08:37:55AM -0700, Chris Aniszczyk wrote [1]: > summarizing the discussion, how about we just alternative the time like > Jonathan discussed? > > I believe that's the only fair thing to do and it's reassuring to hear from > people like Phil who would be able to make the time along with others. > > I'm fine with the current time (1000AEST/1500PST/0000CET) and then > 0400AEST/0900PST/1800CET The 8am Pacific time ended up working out better than 9am for Jonathan and Samuel [2,3], so I've used that instead of 9am. The 8am slot was confirmed as the most popular slot in a Doodle poll [4], with the following folks approving that slot: * David Lyle * George Lestaris * Jonathan Boulle * Julz * Michael Crosby * Mike Brown * Mrunal Patel * Phil Estes * Rob Dolin * Samuel Ortiz * Stephen Day * Stephen Walli * Vincent Batts * W. Trevor King Removing those folks, the second most popular slot is 5pm Pacific, with the following folks approving that slot: * Aleksa Sarai * Keyang Xie * Lei Jitang * Ma Shimiao * Qiang Huang Stephen and Mrunal approved both slots, and since they frequently anchor the runtime and image conversations respectively, there should be sufficient continuity between the two meetings. The only person voting in the Doodle poll who didn't approve either slot is Tianon. Folks with a POSIX ‘date’ command can find the week number with [5]: $ date +%V There may be some doubling up around the end of the year, but we're usually canceling meetings around then anyway. The 8am Pacific meeting gets the odd slot because it's Europe-friendly and lots of folks will be in Europe on 2017-03-29 for KubeCon [6]. I'd be happier with meeting times anchored to UTC to make life easier for folks outside of the US, but one change at a time ;). Future bumps to meeting.ics should bump LAST-MODIFIED [7] or DTSTAMP [8] for any altered components. We can't use DTSTAMP in the VEVENT because VEVENTs require DTSTAMP [9]. The timezone entry is based on the America/New_York example from [10]. Figuring out a single RRULE to cover both meeting times was beyond my abilities, and while RFC 2445 allowed multiple RRULEs in a single VEVENT [11,12], RFC 5545 does not [13]. Something like: RRULE:FREQ=YEARLY;BYDAY=WE;BYHOUR=8,17;BYSETPOS=1,4,5,8,9,... should be legal (at least for 2017), but Google Calendar [14] doesn't seem to respect BYHOUR expansion, and ICAL.js [15] doesn't seem to respect the BYSETPOS limit, so I gave it up and went with two events. To stick strictly to the ISO weeks we could use: RRULE:FREQ=YEARLY;BYDAY=WE;BYWEEKNO=13,15,17,19,21,23,25,27,29,31,33,35, 37,39,41,43,45,47,49,51 and: RRULE:FREQ=YEARLY;BYDAY=WE;BYWEEKNO=14,16,18,20,22,24,26,28,30,32,34,36, 38,40,42,44,46,48,50,52 but that's tedious to type, and folks probably don't care all that much about ISO weeks. I've gone with WEEKLY and INTERVAL=2 to give us something that might survive the end of the year. The ICS was validated with [16]. The CRLF line endings are intentional [17], and the .gitattributes entry ensures we keep them. The committed files will still have LF endings, which can confuse 'git diff ...', but you can use --ignore-space-at-eol to see what really changed. [1]: https://groups.google.com/a/opencontainers.org/d/msg/dev/p0mTOspVgd0/mh7FYse2BAAJ Subject: Re: Moving the OCI Call (again) Date: Thu, 9 Mar 2017 08:37:55 -0700 Message-ID: <CAJg1wMTCGEFRuKoKBEbUPdho82TVH8sPZdGORK_NA2vCNe+w9w@mail.gmail.com> [2]: https://groups.google.com/a/opencontainers.org/d/msg/dev/p0mTOspVgd0/ULXnARy9BAAJ Subject: Re: Moving the OCI Call (again) Date: Thu, 9 Mar 2017 18:33:34 +0100 Message-ID: <CAPWU_0rByhFp=jQQ6cvagHJuYmeTvN7T1zAW+oZR3=F1W8b_rw@mail.gmail.com> [3]: https://github.com/opencontainers/runtime-spec/pull/719#pullrequestreview-26109314 [4]: http://doodle.com/poll/zu664785gb59pwkg [5]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html [6]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-03-22-21.00.log.html [7]: https://tools.ietf.org/html/rfc5545#section-3.8.7.3 [8]: https://tools.ietf.org/html/rfc5545#section-3.8.7.2 [9]: https://tools.ietf.org/html/rfc5545#section-3.6.1 [10]: https://tools.ietf.org/html/rfc5545#page-69 [11]: https://tools.ietf.org/html/rfc2445#section-4.6.1 [12]: https://tools.ietf.org/html/rfc2445#section-4.8.5.4 [13]: https://tools.ietf.org/html/rfc5545#appendix-A.1 [14]: https://calendar.google.com/ [15]: http://mozilla-comm.github.io/ical.js/ [16]: https://icalendar.org/validator.html [17]: https://tools.ietf.org/html/rfc5545#section-3.1 Signed-off-by: W. Trevor King <wking@tremily.us>
2017-03-10 01:12:19 +08:00
[iso-week]: https://en.wikipedia.org/wiki/ISO_week_date#Calculating_the_week_number_of_a_given_date
[minutes]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/
[oci]: https://www.opencontainers.org
README: Document the alternate-week meeting times On Thu, Mar 09, 2017 at 08:37:55AM -0700, Chris Aniszczyk wrote [1]: > summarizing the discussion, how about we just alternative the time like > Jonathan discussed? > > I believe that's the only fair thing to do and it's reassuring to hear from > people like Phil who would be able to make the time along with others. > > I'm fine with the current time (1000AEST/1500PST/0000CET) and then > 0400AEST/0900PST/1800CET The 8am Pacific time ended up working out better than 9am for Jonathan and Samuel [2,3], so I've used that instead of 9am. The 8am slot was confirmed as the most popular slot in a Doodle poll [4], with the following folks approving that slot: * David Lyle * George Lestaris * Jonathan Boulle * Julz * Michael Crosby * Mike Brown * Mrunal Patel * Phil Estes * Rob Dolin * Samuel Ortiz * Stephen Day * Stephen Walli * Vincent Batts * W. Trevor King Removing those folks, the second most popular slot is 5pm Pacific, with the following folks approving that slot: * Aleksa Sarai * Keyang Xie * Lei Jitang * Ma Shimiao * Qiang Huang Stephen and Mrunal approved both slots, and since they frequently anchor the runtime and image conversations respectively, there should be sufficient continuity between the two meetings. The only person voting in the Doodle poll who didn't approve either slot is Tianon. Folks with a POSIX ‘date’ command can find the week number with [5]: $ date +%V There may be some doubling up around the end of the year, but we're usually canceling meetings around then anyway. The 8am Pacific meeting gets the odd slot because it's Europe-friendly and lots of folks will be in Europe on 2017-03-29 for KubeCon [6]. I'd be happier with meeting times anchored to UTC to make life easier for folks outside of the US, but one change at a time ;). Future bumps to meeting.ics should bump LAST-MODIFIED [7] or DTSTAMP [8] for any altered components. We can't use DTSTAMP in the VEVENT because VEVENTs require DTSTAMP [9]. The timezone entry is based on the America/New_York example from [10]. Figuring out a single RRULE to cover both meeting times was beyond my abilities, and while RFC 2445 allowed multiple RRULEs in a single VEVENT [11,12], RFC 5545 does not [13]. Something like: RRULE:FREQ=YEARLY;BYDAY=WE;BYHOUR=8,17;BYSETPOS=1,4,5,8,9,... should be legal (at least for 2017), but Google Calendar [14] doesn't seem to respect BYHOUR expansion, and ICAL.js [15] doesn't seem to respect the BYSETPOS limit, so I gave it up and went with two events. To stick strictly to the ISO weeks we could use: RRULE:FREQ=YEARLY;BYDAY=WE;BYWEEKNO=13,15,17,19,21,23,25,27,29,31,33,35, 37,39,41,43,45,47,49,51 and: RRULE:FREQ=YEARLY;BYDAY=WE;BYWEEKNO=14,16,18,20,22,24,26,28,30,32,34,36, 38,40,42,44,46,48,50,52 but that's tedious to type, and folks probably don't care all that much about ISO weeks. I've gone with WEEKLY and INTERVAL=2 to give us something that might survive the end of the year. The ICS was validated with [16]. The CRLF line endings are intentional [17], and the .gitattributes entry ensures we keep them. The committed files will still have LF endings, which can confuse 'git diff ...', but you can use --ignore-space-at-eol to see what really changed. [1]: https://groups.google.com/a/opencontainers.org/d/msg/dev/p0mTOspVgd0/mh7FYse2BAAJ Subject: Re: Moving the OCI Call (again) Date: Thu, 9 Mar 2017 08:37:55 -0700 Message-ID: <CAJg1wMTCGEFRuKoKBEbUPdho82TVH8sPZdGORK_NA2vCNe+w9w@mail.gmail.com> [2]: https://groups.google.com/a/opencontainers.org/d/msg/dev/p0mTOspVgd0/ULXnARy9BAAJ Subject: Re: Moving the OCI Call (again) Date: Thu, 9 Mar 2017 18:33:34 +0100 Message-ID: <CAPWU_0rByhFp=jQQ6cvagHJuYmeTvN7T1zAW+oZR3=F1W8b_rw@mail.gmail.com> [3]: https://github.com/opencontainers/runtime-spec/pull/719#pullrequestreview-26109314 [4]: http://doodle.com/poll/zu664785gb59pwkg [5]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html [6]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-03-22-21.00.log.html [7]: https://tools.ietf.org/html/rfc5545#section-3.8.7.3 [8]: https://tools.ietf.org/html/rfc5545#section-3.8.7.2 [9]: https://tools.ietf.org/html/rfc5545#section-3.6.1 [10]: https://tools.ietf.org/html/rfc5545#page-69 [11]: https://tools.ietf.org/html/rfc2445#section-4.6.1 [12]: https://tools.ietf.org/html/rfc2445#section-4.8.5.4 [13]: https://tools.ietf.org/html/rfc5545#appendix-A.1 [14]: https://calendar.google.com/ [15]: http://mozilla-comm.github.io/ical.js/ [16]: https://icalendar.org/validator.html [17]: https://tools.ietf.org/html/rfc5545#section-3.1 Signed-off-by: W. Trevor King <wking@tremily.us>
2017-03-10 01:12:19 +08:00
[rfc5545]: https://tools.ietf.org/html/rfc5545
[runtime-wiki]: https://github.com/opencontainers/runtime-spec/wiki
[uberconference]: https://www.uberconference.com/opencontainers
[git-commit.1]: http://git-scm.com/docs/git-commit