Skip to content

Commit 1abc017

Browse files
author
Doug Davis
committed
Cleanup bundle.md
Mainly just moved stuff around, but also tried to add some clarity around what is required w.r.t. naming and location of files/dirs. Signed-off-by: Doug Davis <dug@us.ibm.com>
1 parent 294b77c commit 1abc017

File tree

1 file changed

+43
-36
lines changed

1 file changed

+43
-36
lines changed

bundle.md

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
1-
# Bundle
1+
# Filesystem Bundle
22

33
## Container Format
44

5-
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.
6-
See also [OS X application bundles](http://en.wikipedia.org/wiki/Bundle_%28OS_X%29) for a similar use of the term *bundle*.
7-
8-
The format does not define distribution.
9-
In other words, it only specifies how a container must be stored on a local filesystem, for consumption by a runtime.
10-
It does not specify how to transfer a container between computers, how to discover containers, or assign names or versions to them.
11-
Any distribution method capable of preserving the original layout of a container, as specified here, is considered compliant.
12-
13-
A standard container bundle is made of the following 3 parts:
14-
15-
- A top-level directory holding everything else
16-
- One or more content directories
17-
- A configuration file
18-
19-
## Directory layout
20-
21-
A Standard Container bundle is a directory containing all the content needed to load and run a container.
22-
This includes two configuration files `config.json` and `runtime.json`, and a rootfs directory.
23-
The `config.json` file contains settings that are host independent and application specific such as security permissions, environment variables and arguments.
24-
The `runtime.json` file contains settings that are host specific such as memory limits, local device access and mount points.
25-
The goal is that the bundle can be moved as a unit to another machine and run the same application if `runtime.json` is removed or reconfigured.
26-
27-
Configuration file syntax and semantics:
28-
29-
* [`config.json`](config.md) (immutable, host independent configuration)
30-
* [`runtime.json`](runtime-config.md) (mutable, host dependent configuration)
31-
32-
A single `rootfs` directory MUST be in the same directory as the `config.json`.
33-
The names of the directories may be arbitrary, but users should consider using conventional names as in the example below.
34-
35-
```
36-
config.json
37-
runtime.json
38-
rootfs/
39-
```
5+
This section defines a format for encoding a container as a *filesystem
6+
bundle* -
7+
a set of files organized in a certain way, and containing all the necessary
8+
data and metadata for any compliant runtime to perform all standard operations
9+
against it. See also
10+
[OS X application bundles](http://en.wikipedia.org/wiki/Bundle_%28OS_X%29)
11+
for a similar use of the term *bundle*.
12+
13+
The definition of a bundle is only concerned with how a container, and its
14+
configuration data, are stored on a local file system so that it can be
15+
consumed by a compliant runtime.
16+
Issues such as distribution, including how to transfer a container
17+
between runtimes, assigning names, versioning of bundle, or discovery of
18+
bundles are out of scope of this specification.
19+
20+
A Standard Container bundle contains all the information needed to load and run
21+
a container. This includes the following three artifacts which MUST all
22+
reside in the same directory on the local filesystem:
23+
24+
1. `config.json` : immutable, host independent configuration.
25+
This file, which MUST be named `config.json`, contains
26+
settings that are host independent and application specific such as security
27+
permissions, environment variables and arguments. See
28+
[`config.json`](config.md) for more details.
29+
30+
2. `runtime.json` : mutable, host dependent configuration.
31+
This file, which MUST be named `runtime.json`, contains
32+
settings that are host specific such as memory limits, local device access
33+
and mount points.
34+
The goal is that the bundle can be moved as a unit to another runtime and
35+
run the same application if `runtime.json` is reconfigured.
36+
See [`runtime.json`](runtime-config.md) for more details.
37+
38+
3. A directory representing the root filesystem of the container.
39+
While the name of this directory may be arbitrary, users should consider using
40+
a conventional name, such as `rootfs`. This directory will be referenced from
41+
within the `config.json` file.
42+
43+
While these three artifacts MUST all be present in a single directory on the
44+
local filesytem, that directory itself is not part of the bundle. In other
45+
words, a tar archive of a *bundle* will have these artifacts at the root
46+
of the archive, not nested within a top-level directory.

0 commit comments

Comments
 (0)