-
Notifications
You must be signed in to change notification settings - Fork 82
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
validate: remove autodetect for type and add require limit #184
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
cmd/oci-create-runtime-bundle/oci-create-runtime-bundle.1.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
% OCI(1) OCI-CREATE-RUNTIME-BUNDLE User Manuals | ||
% OCI Community | ||
% JULY 2016 | ||
# NAME | ||
oci-create-runtime-bundle \- Create an OCI runtime bundle | ||
|
||
# SYNOPSIS | ||
**oci-create-runtime-bundle** [src] [dest] [flags] | ||
**oci-create-runtime-bundle** [--help|-v|--version] | ||
|
||
# DESCRIPTION | ||
`oci-create-runtime-bundle` 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-unpack**(1) for more details on this process. | ||
|
||
Also translates the referenced config from application/vnd.oci.image.config.v1+json to a | ||
runtime-spec-compatible `dest/config.json`. | ||
|
||
# FLAGS | ||
**--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-create-runtime-bundle will try to auto-detect the type. One of "imageLayout,image" | ||
|
||
**-v**, **--version** | ||
Print version information and exit. | ||
|
||
# EXAMPLES | ||
``` | ||
$ skopeo copy docker://busybox oci:busybox-oci | ||
$ mkdir busybox-bundle | ||
$ oci-create-runtime-bundle --ref latest busybox-oci busybox-bundle | ||
$ cd busybox-bundle && sudo runc run busybox | ||
[...] | ||
``` | ||
|
||
# SEE ALSO | ||
**runc**(1), **skopeo**(1) | ||
|
||
# HISTORY | ||
Sept 2016, Originally compiled by Antonio Murdaca (runcom at redhat dot com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
% OCI(1) OCI-IMAGE-VALIDATE User Manuals | ||
% OCI Community | ||
% JULY 2016 | ||
# NAME | ||
oci-image-validate \- Validate one or more image files | ||
|
||
# SYNOPSIS | ||
**oci-image-validate** FILE... [flags] | ||
**oci-image-validate** [--help|-v|--version] | ||
|
||
# DESCRIPTION | ||
`oci-image-validate` validates the given file(s) against the OCI image specification. | ||
|
||
|
||
# FLAGS | ||
**--help** | ||
Print usage statement | ||
|
||
**--ref**=[] | ||
The reference to validate (should point to a manifest). | ||
Can be specified multiple times to validate multiple references. | ||
`NAME` must be present in the `refs` subdirectory of the image. | ||
Only applicable if type is image or imageLayout. | ||
|
||
**--type**="" | ||
Type of the file to validate. If unset, oci-image-validate will try to auto-detect the type. One of "imageLayout,image,manifest,manifestList,config" | ||
|
||
**-v**, **--version** | ||
Print version information and exit. | ||
|
||
# EXAMPLES | ||
``` | ||
$ skopeo copy docker://busybox oci:busybox-oci | ||
$ oci-image-validate --type imageLayout --ref latest busybox-oci | ||
busybox-oci: OK | ||
``` | ||
|
||
# SEE ALSO | ||
**skopeo**(1) | ||
|
||
# HISTORY | ||
Sept 2016, Originally compiled by Antonio Murdaca (runcom at redhat dot com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
% OCI(1) OCI-UNPACK User Manuals | ||
% OCI Community | ||
% JULY 2016 | ||
# NAME | ||
oci-unpack \- Unpack an image or image source layout | ||
|
||
# SYNOPSIS | ||
**oci-unpack** [src] [dest] [flags] | ||
**oci-unpack** [--help|-v|--version] | ||
|
||
# DESCRIPTION | ||
`oci-unpack` validates an application/vnd.oci.image.manifest.v1+json and unpacks its layered filesystem to `dest`. | ||
|
||
# FLAGS | ||
**--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-unpack will try to auto-detect the type. One of "imageLayout,image" | ||
|
||
**-v**, **--version** | ||
Print version information and exit. | ||
|
||
# EXAMPLES | ||
``` | ||
$ skopeo copy docker://busybox oci:busybox-oci | ||
$ mkdir busybox-bundle | ||
$ oci-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 | ||
**skopeo**(1) | ||
|
||
# HISTORY | ||
Sept 2016, Originally compiled by Antonio Murdaca (runcom at redhat dot com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An
image
isn't the layout. The layout is the collection of resources that can make up an image. For example, I can still have an image and not have a layout.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, agree. And as you said, layout makes up an image. If we have a layout then we have an image. The point is image may be stored in different file types.
But if you don't have a layout, then it will not be a valid OCI image.
So, how do you think we should change the help info?