1
0
mirror of https://github.com/opencontainers/runtime-spec.git synced 2026-02-05 18:45:18 +01:00
Files
runtime-spec/bundle.md
W. Trevor King b46ed85e08 bundle: Move 'rootfs' recommendation to config.md
Anyone setting 'rootfs.path' should be aware of this advice,
regardless of whether they're the ones composing the bundle or not.

Use the RFC 2119 "SHOULD" (vs. the old lowercase "should") for this
recommendation.  The SHOULD semantics make sense and using SHOULD
avoids confusing readers ("did they mean to SHOULD this?").

Also drop the "While the name of this directory may be arbitrary"
caveat, because SHOULD already implies "but you can pick another
directory name if you want".

Note that the "MUST be present in a single directory" line which is
still in bundle.md forbids you from picking "foo/bar", "../foo", or
other paths that do not point at a direct child of the bundle
directory.  I don't like that direct-child restriction [1], but I'm
not touching it in this commit.

[1]: https://github.com/opencontainers/runtime-spec/pull/469

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-18 11:42:05 -07:00

1.7 KiB

Filesystem Bundle

Container Format

This section defines a format for encoding a container as a filesystem bundle - a set of files 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 MacOS application bundles for a similar use of the term bundle.

The definition of a bundle is only concerned with how a container, and its configuration data, are stored on a local filesystem so that it can be consumed by a compliant runtime.

A Standard Container bundle contains all the information needed to load and run a container. This includes the following artifacts:

  1. config.json: contains configuration data. This REQUIRED file MUST reside in the root of the bundle directory and MUST be named config.json. See config.json for more details.

  2. A directory representing the root filesystem of the container. On Windows, for Windows Server containers, this directory is REQUIRED. For Hyper-V containers, it MUST be omitted.

    On all other platforms, this field is REQUIRED.

    If set, this directory MUST be referenced by root within the config.json file.

When supplied, while these artifacts MUST all be present in a single directory on the local filesystem, that directory itself is not part of the bundle. In other words, a tar archive of a bundle will have these artifacts at the root of the archive, not nested within a top-level directory.