Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/oci-image-tool: add manuals #180

Merged
merged 1 commit into from
Jul 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions cmd/oci-image-tool/man/oci-image-tool-create-runtime-bundle.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
% OCI(1) OCI-IMAGE-TOOL User Manuals
% OCI Community
% JULY 2016
# NAME
oci-image-tool-create-runtime-bundle \- Create an OCI image runtime bundle

# SYNOPSIS
**oci-image-tool create-runtime-bundle** [src] [dest] [flags]

# DESCRIPTION
`oci-image-tool create-runtime-bundle` generates an [OCI bundle](https://github.com/opencontainers/runtime-spec/blob/master/bundle.md) from an [OCI image layout](https://github.com/opencontainers/image-spec/blob/master/image-layout.md).


# OPTIONS
**--help**
Print usage statement

**--ref**
The ref pointing to the manifest of the OCI image. This must be present in the "refs" subdirectory of the image. (default "v1.0")

**--rootfs**
A directory representing the root filesystem of the container in the OCI runtime bundle. It is strongly recommended to keep the default value. (default "rootfs")

**--type**
Type of the file to unpack. If unset, oci-image-tool will try to auto-detect the type. One of "imageLayout,image"

# EXAMPLES
```
$ skopeo copy docker://busybox oci:busybox-oci
$ mkdir busybox-bundle
$ ci-image-tool create-runtime-bundle --ref latest busybox-oci busybox-bundle
$ cd busybox-bundle && sudo runc start busybox
[...]
```

# SEE ALSO
**oci-image-tool(1)**, **runc**(1), **skopeo**(1)

# HISTORY
July 2016, Originally compiled by Antonio Murdaca (runcom at redhat dot com)
50 changes: 50 additions & 0 deletions cmd/oci-image-tool/man/oci-image-tool-unpack.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
% OCI(1) OCI-IMAGE-TOOL User Manuals
% OCI Community
% JULY 2016
# NAME
oci-image-tool-unpack \- Unpack an image or image source layout

# SYNOPSIS
**oci-image-tool unpack** [src] [dest] [flags]

# DESCRIPTION
`oci-image-tool unpack` unpacks a given OCI image into a directory suitable to be used with `runc`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably worth drawing a clear distinction between unpack and create-runtime-bundle here. That distinction is mostly around rootfs-or-not and config translation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, any suggestion on the language?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Fri, Jul 22, 2016 at 10:25:35AM -0700, Antonio Murdaca wrote:

+# DESCRIPTION
+oci-image-tool unpack unpacks a given OCI image into a directory suitable to be used with runc.

sure, any suggestion on the language?

For unpack, something like:

Validates an application/vnd.oci.image.manifest.v1+json and unpacks
its layered filesystem to DEST.

For create-runtime-bundle, something like:

Validates an application/vnd.oci.image.manifest.v1+json and unpacks
its layered filesystem to DEST/rootfs, although the target directory
is configurable with --rootfs. See oci-image-tool-unpack(1) for
more details on this process.

Also translates the referenced config from
application/vnd.oci.image.serialization.config.v1+json to a
runtime-spec's config.json.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Fri, Jul 22, 2016 at 10:35:50AM -0700, W. Trevor King wrote:

Also translates the referenced config from
application/vnd.oci.image.serialization.config.v1+json to a
runtime-spec's config.json.

Probably worth working in DEST/config.json there somewhow. Maybe:

Also translates the referenced config from
application/vnd.oci.image.serialization.config.v1+json to a
runtime-spec-compatible DEST/config.json.



# OPTIONS
**--help**
Print usage statement

**--ref**
The ref pointing to the manifest to be unpacked. This must be present in the "refs" subdirectory of the image. (default "v1.0")

**--type**
Type of the file to unpack. If unset, oci-image-tool will try to auto-detect the type. One of "imageLayout,image"

# EXAMPLES
```
$ skopeo copy docker://busybox oci:busybox-oci
$ mkdir busybox-bundle
$ oci-image-tool unpack --ref latest busybox-oci busybox-bundle
tree busybox-bundle
busybox-bundle
├── bin
│   ├── [
│   ├── [[
│   ├── acpid
│   ├── addgroup
│   ├── add-shell
│   ├── adduser
│   ├── adjtimex
│   ├── ar
│   ├── arp
│   ├── arping
│   ├── ash
[...]
```

# SEE ALSO
**oci-image-tool(1)**, **skopeo**(1)

# HISTORY
July 2016, Originally compiled by Antonio Murdaca (runcom at redhat dot com)
35 changes: 35 additions & 0 deletions cmd/oci-image-tool/man/oci-image-tool-validate.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
% OCI(1) OCI-IMAGE-TOOL User Manuals
% OCI Community
% JULY 2016
# NAME
oci-image-tool-validate \- Validate one or more image files

# SYNOPSIS
**oci-image-tool validate** FILE... [flags]

# DESCRIPTION
`oci-image-tool validate` validates the given file(s) against the OCI image specification.


# OPTIONS
**--help**
Print usage statement

**--ref**
The ref pointing to the manifest to be validated. This must be present in the "refs" subdirectory of the image. Only applicable if type is image or imageLayout. (default "v1.0")

**--type**
Type of the file to validate. If unset, oci-image-tool will try to auto-detect the type. One of "imageLayout,image,manifest,manifestList,config"

# EXAMPLES
```
$ skopeo copy docker://busybox oci:busybox-oci
$ oci-image-tool validate --type imageLayout --ref latest busybox-oci
busybox-oci: OK
```

# SEE ALSO
**oci-image-tool(1)**, **skopeo**(1)

# HISTORY
July 2016, Originally compiled by Antonio Murdaca (runcom at redhat dot com)
37 changes: 37 additions & 0 deletions cmd/oci-image-tool/man/oci-image-tool.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
% OCI(1) OCI-IMAGE-TOOL User Manuals
% OCI Community
% JULY 2016
# NAME
oci-image-tool \- OCI (Open Container Initiative) image tool

# SYNOPSIS
**oci-image-tool** [OPTIONS] COMMAND [arg...]

**oci-image-tool** [--help]

# DESCRIPTION
`oci-image-tool` is a collection of tools for working with the [OCI image specification](https://github.com/opencontainers/image-spec).


# OPTIONS
**--help**
Print usage statement

# COMMANDS
**create-runtime-bundle**
Create an OCI image runtime bundle
See **oci-image-tools-create-runtime-bundle(1)** for full documentation on the **create-runtime-bundle** command.

**unpack**
Unpack an image or image source layout
See **oci-image-tools-unpack(1)** for full documentation on the **unpack** command.

**validate**
Validate one or more image files
See **oci-image-tool-validate(1)** for full documentation on the **validate** command.

# SEE ALSO
**oci-image-tool-create-runtime-bundle**, **ocitools-unpack**(1), **ocitools-validate**(1)

# HISTORY
July 2016, Originally compiled by Antonio Murdaca (runcom at redhat dot com)