You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-16Lines changed: 33 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Open Container Specifications
2
2
3
-
This project is where the [Open Container Initiative](http://www.opencontainers.org/) Specifications are written. This is a work in progress. We should have a first draft by end of July 2015.
3
+
This project is where the [Open Container Initiative](http://www.opencontainers.org/) Specifications are written.
4
+
This is a work in progress.
5
+
We should have a first draft by end of July 2015.
4
6
5
7
Table of Contents
6
8
@@ -20,35 +22,53 @@ To provide context for users the following section gives example use cases for e
20
22
21
23
# The 5 principles of Standard Containers
22
24
23
-
Define a unit of software delivery called a Standard Container. The goal of a Standard Container is to encapsulate a software component and all its dependencies in a format that is self-describing and portable, so that any compliant runtime can run it without extra dependencies, regardless of the underlying machine and the contents of the container.
25
+
Define a unit of software delivery called a Standard Container.
26
+
The goal of a Standard Container is to encapsulate a software component and all its dependencies in a format that is self-describing and portable, so that any compliant runtime can run it without extra dependencies, regardless of the underlying machine and the contents of the container.
24
27
25
-
The specification for Standard Containers is straightforward. It mostly defines 1) a file format, 2) a set of standard operations, and 3) an execution environment.
28
+
The specification for Standard Containers is straightforward.
29
+
It mostly defines 1) a file format, 2) a set of standard operations, and 3) an execution environment.
26
30
27
-
A great analogy for this is the shipping container. Just like how Standard Containers are a fundamental unit of software delivery, shipping containers are a fundamental unit of physical delivery.
31
+
A great analogy for this is the shipping container.
32
+
Just like how Standard Containers are a fundamental unit of software delivery, shipping containers are a fundamental unit of physical delivery.
28
33
29
34
## 1. Standard operations
30
35
31
-
Just like shipping containers, Standard Containers define a set of STANDARD OPERATIONS. Shipping containers can be lifted, stacked, locked, loaded, unloaded and labelled. Similarly, Standard Containers can be created, started, and stopped using standard container tools (what this spec is about); copied and snapshotted using standard filesystem tools; and downloaded and uploaded using standard network tools.
36
+
Just like shipping containers, Standard Containers define a set of STANDARD OPERATIONS.
37
+
Shipping containers can be lifted, stacked, locked, loaded, unloaded and labelled.
38
+
Similarly, Standard Containers can be created, started, and stopped using standard container tools (what this spec is about); copied and snapshotted using standard filesystem tools; and downloaded and uploaded using standard network tools.
32
39
33
40
## 2. Content-agnostic
34
41
35
-
Just like shipping containers, Standard Containers are CONTENT-AGNOSTIC: all standard operations have the same effect regardless of the contents. A shipping container will be stacked in exactly the same way whether it contains Vietnamese powder coffee or spare Maserati parts. Similarly, Standard Containers are started or uploaded in the same way whether they contain a postgres database, a php application with its dependencies and application server, or Java build artifacts.
42
+
Just like shipping containers, Standard Containers are CONTENT-AGNOSTIC: all standard operations have the same effect regardless of the contents.
43
+
A shipping container will be stacked in exactly the same way whether it contains Vietnamese powder coffee or spare Maserati parts.
44
+
Similarly, Standard Containers are started or uploaded in the same way whether they contain a postgres database, a php application with its dependencies and application server, or Java build artifacts.
36
45
37
46
## 3. Infrastructure-agnostic
38
47
39
-
Both types of containers are INFRASTRUCTURE-AGNOSTIC: they can be transported to thousands of facilities around the world, and manipulated by a wide variety of equipment. A shipping container can be packed in a factory in Ukraine, transported by truck to the nearest routing center, stacked onto a train, loaded into a German boat by an Australian-built crane, stored in a warehouse at a US facility, etc. Similarly, a standard container can be bundled on my laptop, uploaded to S3, downloaded, run and snapshotted by a build server at Equinix in Virginia, uploaded to 10 staging servers in a home-made Openstack cluster, then sent to 30 production instances across 3 EC2 regions.
48
+
Both types of containers are INFRASTRUCTURE-AGNOSTIC: they can be transported to thousands of facilities around the world, and manipulated by a wide variety of equipment.
49
+
A shipping container can be packed in a factory in Ukraine, transported by truck to the nearest routing center, stacked onto a train, loaded into a German boat by an Australian-built crane, stored in a warehouse at a US facility, etc.
50
+
Similarly, a standard container can be bundled on my laptop, uploaded to S3, downloaded, run and snapshotted by a build server at Equinix in Virginia, uploaded to 10 staging servers in a home-made Openstack cluster, then sent to 30 production instances across 3 EC2 regions.
40
51
41
52
## 4. Designed for automation
42
53
43
-
Because they offer the same standard operations regardless of content and infrastructure, Standard Containers, just like their physical counterparts, are extremely well-suited for automation. In fact, you could say automation is their secret weapon.
54
+
Because they offer the same standard operations regardless of content and infrastructure, Standard Containers, just like their physical counterparts, are extremely well-suited for automation.
55
+
In fact, you could say automation is their secret weapon.
44
56
45
-
Many things that once required time-consuming and error-prone human effort can now be programmed. Before shipping containers, a bag of powder coffee was hauled, dragged, dropped, rolled and stacked by 10 different people in 10 different locations by the time it reached its destination. 1 out of 50 disappeared. 1 out of 20 was damaged. The process was slow, inefficient and cost a fortune - and was entirely different depending on the facility and the type of goods.
57
+
Many things that once required time-consuming and error-prone human effort can now be programmed.
58
+
Before shipping containers, a bag of powder coffee was hauled, dragged, dropped, rolled and stacked by 10 different people in 10 different locations by the time it reached its destination.
59
+
1 out of 50 disappeared.
60
+
1 out of 20 was damaged.
61
+
The process was slow, inefficient and cost a fortune - and was entirely different depending on the facility and the type of goods.
46
62
47
-
Similarly, before Standard Containers, by the time a software component ran in production, it had been individually built, configured, bundled, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers. Builds failed, libraries conflicted, mirrors crashed, post-it notes were lost, logs were misplaced, cluster updates were half-broken. The process was slow, inefficient and cost a fortune - and was entirely different depending on the language and infrastructure provider.
63
+
Similarly, before Standard Containers, by the time a software component ran in production, it had been individually built, configured, bundled, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers.
64
+
Builds failed, libraries conflicted, mirrors crashed, post-it notes were lost, logs were misplaced, cluster updates were half-broken.
65
+
The process was slow, inefficient and cost a fortune - and was entirely different depending on the language and infrastructure provider.
48
66
49
67
## 5. Industrial-grade delivery
50
68
51
-
There are 17 million shipping containers in existence, packed with every physical good imaginable. Every single one of them can be loaded onto the same boats, by the same cranes, in the same facilities, and sent anywhere in the World with incredible efficiency. It is embarrassing to think that a 30 ton shipment of coffee can safely travel half-way across the World in *less time* than it takes a software team to deliver its code from one datacenter to another sitting 10 miles away.
69
+
There are 17 million shipping containers in existence, packed with every physical good imaginable.
70
+
Every single one of them can be loaded onto the same boats, by the same cranes, in the same facilities, and sent anywhere in the World with incredible efficiency.
71
+
It is embarrassing to think that a 30 ton shipment of coffee can safely travel half-way across the World in *less time* than it takes a software team to deliver its code from one datacenter to another sitting 10 miles away.
52
72
53
73
With Standard Containers we can put an end to that embarrassment, by making INDUSTRIAL-GRADE DELIVERY of software a reality.
54
74
@@ -97,11 +117,8 @@ For example, this paragraph will span three lines in the Markdown source.
97
117
98
118
### Sign your work
99
119
100
-
The sign-off is a simple line at the end of the explanation for the
101
-
patch, which certifies that you wrote it or otherwise have the right to
102
-
pass it on as an open-source patch. The rules are pretty simple: if you
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.
121
+
The rules are pretty simple: if you can certify the below (from [developercertificate.org](http://developercertificate.org/)):
Copy file name to clipboardExpand all lines: bundle.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
1
# Bundle Container Format
2
2
3
-
This section defines a format for encoding a container as a *bundle* - a directory organized in a certain way, and containing all the necessary data and metadata for any compliant runtime to perform all standard operations against it. See also [OS X application bundles](http://en.wikipedia.org/wiki/Bundle_%28OS_X%29) for a similar use of the term *bundle*.
3
+
This section defines a format for encoding a container as a *bundle* - a directory organized in a certain way, and containing all the necessary data and metadata for any compliant runtime to perform all standard operations against it.
4
+
See also [OS X application bundles](http://en.wikipedia.org/wiki/Bundle_%28OS_X%29) for a similar use of the term *bundle*.
4
5
5
-
The format does not define distribution. In other words, it only specifies how a container must be stored on a local filesystem, for consumption by a runtime. It does not specify how to transfer a container between computers, how to discover containers, or assign names or versions to them. Any distribution method capable of preserving the original layout of a container, as specified here, is considered compliant.
6
+
The format does not define distribution.
7
+
In other words, it only specifies how a container must be stored on a local filesystem, for consumption by a runtime.
8
+
It does not specify how to transfer a container between computers, how to discover containers, or assign names or versions to them.
9
+
Any distribution method capable of preserving the original layout of a container, as specified here, is considered compliant.
6
10
7
11
A standard container bundle is made of the following 3 parts:
Copy file name to clipboardExpand all lines: config-linux.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,12 @@
1
1
# Linux-specific configuration
2
2
3
-
The Linux container specification uses various kernel features like namespaces,
4
-
cgroups, capabilities, LSM, and file system jails to fulfill the spec.
5
-
Additional information is needed for Linux over the [default spec configuration](config.md)
6
-
in order to configure these various kernel features.
3
+
The Linux container specification uses various kernel features like namespaces, cgroups, capabilities, LSM, and file system jails to fulfill the spec.
4
+
Additional information is needed for Linux over the [default spec configuration](config.md) in order to configure these various kernel features.
7
5
8
6
## Capabilities
9
7
10
-
Capabilities is an array that specifies Linux capabilities that can be provided to the process
11
-
inside the container. Valid values are the string after `CAP_` for capabilities defined
12
-
in [the man page](http://man7.org/linux/man-pages/man7/capabilities.7.html)
8
+
Capabilities is an array that specifies Linux capabilities that can be provided to the process inside the container.
9
+
Valid values are the string after `CAP_` for capabilities defined in [the man page](http://man7.org/linux/man-pages/man7/capabilities.7.html).
13
10
14
11
```json
15
12
"capabilities": [
@@ -21,7 +18,9 @@ in [the man page](http://man7.org/linux/man-pages/man7/capabilities.7.html)
21
18
22
19
## Rootfs Mount Propagation
23
20
24
-
rootfsPropagation sets the rootfs's mount propagation. Its value is either slave, private, or shared. [The kernel doc](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) has more information about mount propagation.
21
+
rootfsPropagation sets the rootfs's mount propagation.
22
+
Its value is either slave, private, or shared.
23
+
[The kernel doc](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) has more information about mount propagation.
Copy file name to clipboardExpand all lines: config.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,4 +123,5 @@ For Linux-based systems the user structure has the following fields:
123
123
}
124
124
```
125
125
126
-
Interpretation of the platform section of the JSON file is used to find which platform-specific sections may be available in the document. For example, if `os` is set to `linux`, then a JSON object conforming to the [Linux-specific schema](config-linux.md) SHOULD be found at the key `linux` in the `config.json`.
126
+
Interpretation of the platform section of the JSON file is used to find which platform-specific sections may be available in the document.
127
+
For example, if `os` is set to `linux`, then a JSON object conforming to the [Linux-specific schema](config-linux.md) SHOULD be found at the key `linux` in the `config.json`.
Copy file name to clipboardExpand all lines: runtime-config-linux.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,9 +127,9 @@ Next parameters can be specified:
127
127
128
128
## Control groups
129
129
130
-
Also known as cgroups, they are used to restrict resource usage for a container and handle
131
-
device access. cgroups provide controls to restrict cpu, memory, IO, pids and network for
132
-
the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
130
+
Also known as cgroups, they are used to restrict resource usage for a container and handle device access.
131
+
cgroups provide controls to restrict cpu, memory, IO, pids and network for the container.
132
+
For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
133
133
134
134
## Sysctl
135
135
@@ -155,7 +155,9 @@ For more information, see [the man page](http://man7.org/linux/man-pages/man8/sy
155
155
]
156
156
```
157
157
158
-
rlimits allow setting resource limits. The type is from the values defined in [the man page](http://man7.org/linux/man-pages/man2/setrlimit.2.html). The kernel enforces the soft limit for a resource while the hard limit acts as a ceiling for that value that could be set by an unprivileged process.
158
+
rlimits allow setting resource limits.
159
+
The type is from the values defined in [the man page](http://man7.org/linux/man-pages/man2/setrlimit.2.html).
160
+
The kernel enforces the soft limit for a resource while the hard limit acts as a ceiling for that value that could be set by an unprivileged process.
159
161
160
162
## SELinux process label
161
163
@@ -177,8 +179,7 @@ For more information about Apparmor, see [Apparmor documentation](https://wiki.u
177
179
## seccomp
178
180
179
181
Seccomp provides application sandboxing mechanism in the Linux kernel.
180
-
Seccomp configuration allows one to configure actions to take for matched syscalls and furthermore also allows
181
-
matching on values passed as arguments to syscalls.
182
+
Seccomp configuration allows one to configure actions to take for matched syscalls and furthermore also allows matching on values passed as arguments to syscalls.
182
183
For more information about Seccomp, see [Seccomp kernel documentation](https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt)
183
184
The actions and operators are strings that match the definitions in seccomp.h from [libseccomp](https://github.com/seccomp/libseccomp) and are translated to corresponding values.
0 commit comments