Skip to content

Commit

Permalink
Make fixes based on feedback and introduce multi platform options for…
Browse files Browse the repository at this point in the history
… gcrane completion cmd
  • Loading branch information
rvandernoort committed Sep 30, 2024
1 parent d1dc0dd commit 03bf275
Show file tree
Hide file tree
Showing 27 changed files with 248 additions and 140 deletions.
24 changes: 12 additions & 12 deletions pages/common/crane-append.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
- Push image based on a base image:

`crane append {{-b|--base}} {{string}}`

- Display help:

`crane append {{-h|--help}}`
`crane append {{-b|--base}} {{image_name}}`

- Push image with appended layer from tarball:

`crane append {{-f|--new_layer}} {{strings}}`
`crane append {{-f|--new_layer}} {{layer_name1 layer_name2 ...}}`

- Push image with appended layer with new tag:

`crane append {{-t|--new_tag}} {{strings}}`
`crane append {{-t|--new_tag}} {{tag_name}}`

- Use empty base image of type OCI media instead of Docker:
- Push resulting image to new tarball:

`crane append {{--oci-empty-base}}`
`crane append {{-o|--output}} {{path/to/tarball}}`

- Push resulting image to new tarball:
- Use empty base image of type OCI media instead of Docker:

`crane append {{-o|--output}} {{string}}`
`crane append --oci-empty-base`

- Annotate resulting image as being based on the base image:

`crane append {{--set-base-image-annotations}}`
`crane append --set-base-image-annotations`

- Display help:

`crane append {{-h|--help}}`
14 changes: 7 additions & 7 deletions pages/common/crane-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
> Log in or access credentials.
> More information: <https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_auth.md>.
- Execute crane auth subcommand:
- Execute `crane auth` subcommand:

`crane auth {{subcommand}}`

- Display help:

`crane auth {{-h|--help}}`

- Implement credential helper:

`crane auth get {{registry_address}} {{-h|--help}}`

- Log in to a registry:

`crane auth login {{registry_address}} {{-h|--help}} {{-p|--password}} {{string}} {{-password-stdin}} {{-u|--username}} {{string}}`
`crane auth login {{registry_address}} {{-h|--help}} {{-p|--password}} {{password}} {{-password-stdin}} {{-u|--username}} {{username}}`

- Log out of a registry:

`crane auth logout {{registry_address}} {{-h|--help}}`

- Retrieve a token for a remote repository:

`crane auth token {{registry_address}} {{-H|--header}} {{-h|--help}} {{-m|--mount}} {{strings}} {{--push}}`
`crane auth token {{registry_address}} {{-H|--header}} {{-h|--help}} {{-m|--mount}} {{scope1 scope2 ...}} --push`

- Display help:

`crane auth {{-h|--help}}`
2 changes: 1 addition & 1 deletion pages/common/crane-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

- Print the full image reference:

`crane catalog {{registry_address}} {{--full-ref}}`
`crane catalog {{registry_address}} --full-ref`

- Display help:

Expand Down
8 changes: 4 additions & 4 deletions pages/common/crane-copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

`crane copy {{source}} {{target}} {{-a|--all-tags}}`

- Display help:

`crane copy {{-h|--help}}`

- Set the maximum number of concurrent copies, defaults to GOMAXPROCS:

`crane copy {{source}} {{target}} {{-j|--jobs}} {{int}}`

- Avoid overwriting existing tags in target:

`crane copy {{source}} {{target}} {{-n|--no-clobber}}`

- Display help:

`crane copy {{-h|--help}}`
10 changes: 5 additions & 5 deletions pages/common/crane-digest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

- Print the full image reference by digest:

`crane digest {{image_name}} {{--full-ref}}`
`crane digest {{image_name}} --full-ref`

- Display help:
- Specify path to tarball containing the image:

`crane digest {{image_name}} {{-h|--help}}`
`crane digest {{image_name}} --tarball {{path/to/tarball}}`

- Specify path to tarball containing the image:
- Display help:

`crane digest {{image_name}} {{--tarball}} {{string}}`
`crane digest {{-h|--help}}`
4 changes: 2 additions & 2 deletions pages/common/crane-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

- Write tarball to file:

`crane export {{image_name}} {{file_name}}`
`crane export {{image_name}} {{path/to/tarball}}`

- Read image from stdin:

`crane export - {{file_name}}`
`crane export - {{path/to/filename}}`
8 changes: 4 additions & 4 deletions pages/common/crane-flatten.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

`crane flatten`

- Display help:
- Apply new tag to flattened image:

`crane flatten {{-h|--help}}`
`crane flatten {{-t|--tag}} {{tag_name}}`

- Apply new tag to flattened image:
- Display help:

`crane flatten {{-t|--tag}} {{string}}`
`crane flatten {{-h|--help}}`
20 changes: 10 additions & 10 deletions pages/common/crane-index-append.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@

`crane index append`

- Empty base index will have Docker media types instead of OCI:
- Reference to manifests to append to the base index:

`crane index append {{--docker-empty-base}}`
`crane index append {{-m|--manifest}} {{manifest_name1 manifest_name2 ...}}`

- Append each of its children rather than the index itself (defaults true):
- Tag to apply to resulting image:

`crane index append {{--flatten}}`
`crane index append {{-t|--tag}} {{tag_name}}`

- Display help:
- Empty base index will have Docker media types instead of OCI:

`crane index append {{-h|--help}}`
`crane index append --docker-empty-base`

- Reference to manifests to append to the base index:
- Append each of its children rather than the index itself (defaults true):

`crane index append {{-m|--manifest}} {{strings}}`
`crane index append --flatten`

- Tag to apply to resulting image:
- Display help:

`crane index append {{-t|--tag}} {{string}}`
`crane index append {{-h|--help}}`
12 changes: 6 additions & 6 deletions pages/common/crane-index-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

`crane index filter`

- Display help:

`crane index filter {{-h|--help}}`

- Specify the platform(s) to keep from base in the form os/arch{{/variant}}{{:osversion}}{{,<platform>}}:

`crane index filter {{--platform}} {{platform(s)}}`
`crane index filter --platform {{platform1 platform2 ...}}`

- Tag to apply to resulting image:

`crane index filter {{-t|--tags}} {{string}}`
`crane index filter {{-t|--tags}} {{tag_name}}`

- Display help:

`crane index filter {{-h|--help}}`
10 changes: 5 additions & 5 deletions pages/common/crane-ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

- Print the full image reference:

`crane ls {{repository}} {{--full-ref}}`

- Display help:

`crane ls {{-h|--help}}`
`crane ls {{repository}} --full-ref`

- Omit digest tags:

`crane ls {{-o|--omit-digest-tags}}`

- Display help:

`crane ls {{-h|--help}}`
24 changes: 12 additions & 12 deletions pages/common/crane-mutate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
- New annotations to set (default []):

`crane mutate {{-a|--annotaiton}}/{{-l|--label}} {{strinToString}}`
`crane mutate {{-a|--annotation}}/{{-l|--label}} {{annotation/label}}`

- Path to tarball/command/entrypoint/environment variable/exposed-ports to append to image:

`crane mutate {{--append}}/{{--cmd}}/{{--entrypoint}}/{{-e|--env}}/{{--exposed-ports}} {{strings}}`

- Display help:

`crane mutate {{-h|--help}}`
`crane mutate {{--append}}/{{--cmd}}/{{--entrypoint}}/{{-e|--env}}/{{--exposed-ports}} {{var1 var2 ...}}`

- Path to new tarball of resulting image:

`crane mutate {{-o|--output}} {{string}}`
`crane mutate {{-o|--output}} {{path/to/tarball}}`

- Repository to push mutated image:
- Repository in the form os/arch{{/variant}}{{:osversion}}{{,<platform>}} to push mutated image:

`crane mutate {{--set-platform}} {{string}}`
`crane mutate --set-platform {{platform_name}}`

- New tag reference to apply to mutated image:

`crane mutate {{-t|--tag}} {{string}}`
`crane mutate {{-t|--tag}} {{tag_name}}`

- New user to set:

`crane mutate {{-u|--user}} {{string}}`
`crane mutate {{-u|--user}} {{username}}`

- New working dir to set:

`crane mutate {{-w|--workdir}} {{string}}`
`crane mutate {{-w|--workdir}} {{path/to/workdir}}`

- Display help:

`crane mutate {{-h|--help}}`
8 changes: 4 additions & 4 deletions pages/common/crane-pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
- Pull remote image:

`crane pull {{image_name}} {{tarball}}`
`crane pull {{image_name}} {{path/to/tarball}}`

- Preserve image reference used to pull as an annotation when used with --format=oci:

`crane pull {{image_name}} {{tarball}} {{--annoate-ref}}`
`crane pull {{image_name}} {{path/to/tarball}} --annotate-ref`

- Path to cache image layers:

`crane pull {{image_name}} {{tarball}} {{-c|--cache_path}} {{string}}`
`crane pull {{image_name}} {{path/to/tarball}} {{-c|--cache_path}} {{path/to/cache}}`

- Format in which to save images (default 'tarball'):

`crane pull {{image_name}} {{tarball}} {{-format}} {{string}}`
`crane pull {{image_name}} {{path/to/tarball}} {{-format}} {{format_name}}`

- Display help:

Expand Down
14 changes: 7 additions & 7 deletions pages/common/crane-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
- Push local image to remote registry:

`crane push {{path}} {{image_name}}`

- Display help:

`crane push {{-h|--help}}`
`crane push {{path/to/tarball}} {{image_name}}`

- Path to file with list of published image references:

`crane push {{path}} {{image_name}} {{--image-refs}} {{string}}`
`crane push {{path/to/tarball}} {{image_name}} --image-refs {{path/to/filename}}`

- Push a collection of images as a single index (required if path has multiple images):

`crane push {{path}} {{image_name}} {{--index}}`
`crane push {{path/to/tarball}} {{image_name}} --index`

- Display help:

`crane push {{-h|--help}}`
14 changes: 7 additions & 7 deletions pages/common/crane-rebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

`crane rebase`

- Display help:

`crane rebase {{-h|--help}}`

- New base image to insert:

`crane rebase {{--new_base}} {{string}}`
`crane rebase --new_base {{image_name}}`

- Old base image to remove:

`crane rebase {{--old_base}} {{string}}`
`crane rebase --old_base {{image_name}}`

- Tag to apply to rebased image:

`crane rebase {{-t|--tag}} {{string}}`
`crane rebase {{-t|--tag}} {{tag_name}}`

- Display help:

`crane rebase {{-h|--help}}`
14 changes: 7 additions & 7 deletions pages/common/crane-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@

`crane registry serve`

- Display help:

`crane registry {{-h|--help}}`

- Address to listen on:

`crane registry serve {{--address}} {{string}}`
`crane registry serve --address {{address_name}}`

- Path to a directory where blobs will be stored:

`crane registry serve {{--disk}} {{string}}`
`crane registry serve --disk {{path/to/store_dir}}`

- Display help:

`crane registry {{-h|--help}}`

- Display help:

`crane regsitry serve {{-h|--help}}`
`crane registry serve {{-h|--help}}`
2 changes: 1 addition & 1 deletion pages/common/crane-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Tag remote image:

`crane tag {{image_name}} {{tag}}`
`crane tag {{image_name}} {{tag_name}}`

- Display help:

Expand Down
14 changes: 7 additions & 7 deletions pages/common/crane-validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

- Skip downloading/digesting layers:

`crane validate {{--fast}}`

- Display help:

`crane validate {{-h|--help}}`
`crane validate --fast`

- Name of remote image to validate:

`crane validate {{--remote}} {{string}}`
`crane validate --remote {{image_name}}`

- Path to tarball to validate:

`crane validate {{--tarball}} {{string}}`
`crane validate --tarball {{path/to/tarball}}`

- Display help:

`crane validate {{-h|--help}}`
Loading

0 comments on commit 03bf275

Please sign in to comment.