Commit Graph

45 Commits

Author SHA1 Message Date
Josh Soref
4987a67293 Spelling
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-12-21 16:10:45 -05:00
Daniel J Walsh
5d73dea577
Add --format option to skopeo inspect
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-18 16:44:23 -05:00
Alvaro Iradier
467b462b79 Keep options order in code and add missing bash completions 2020-09-18 20:57:02 +02:00
Alvaro Iradier
3c73c0c0cd Add --registry-token flags to support Bearer token authentication
Signed-off-by: Alvaro Iradier <airadier@gmail.com>
2020-09-18 11:42:54 +02:00
Qi Wang
0858cafffc Retry skopeo inspect command
Enables to retry skopeo inspect. Add `--retry-times` to set the number of times to retry. Use exponential backoff and  1s as default initial retry delay.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-07-09 11:57:13 -04:00
Qi Wang
0ec2610f04 Add skopeo login&logout
Implements skopeo login&logout commands.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-11 16:35:46 -04:00
Qi Wang
46fbbbd282 Use cobra in skopeo
Use cobra in skopeo can help share code with podman/buildah(code for skopeo login/logout CLI).
(libpod issue  #839)

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-04 14:50:15 -04:00
Daniel J Walsh
aa20fbfdf5
Skopeo should support for BigFilesTemporaryDir (SystemContext)
Enhancement request: https://github.com/containers/skopeo/issues/805

Also sorted commands and options on skopeo man page and skopeo --help

Originally submitted by  Michel Belleau <michel.belleau@malaiwah.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-29 06:00:47 -04:00
Valentin Rothberg
ed883c5230
Merge branch 'master' into feat-override-variant 2020-03-20 15:43:39 +01:00
Zach Hill
cce44c45d5 Adds "list-tags" command to list tags with no known tag required. Fixes #276
Example: skopeo list-tags docker://docker.io/library/centos
Returns response:
{
  Repository": "docker.io/library/centos",
  "Tags": [
    "6",
    "7",
    ...
  ]
}

Signed-off-by: Zach Hill <zach@anchore.com>
2020-02-12 00:03:34 -08:00
Daniel Strobusch
4489ddd8a5 add specific authfile options to copy (and sync) command.
With additional prefixed flags for authfiles, it is possible to override the shared authfile flag to use different authfiles for src and dest registries. This is an important feature if the two registries have the same domain (but different paths) and require separate credentials.

Closes #773.

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2020-01-15 10:24:30 +01:00
Jirka Chadima
222beaf4c7
Adds the --override-variant command line flag
Signed-off-by: Jirka Chadima <chadima.jiri@gmail.com>
2020-01-09 15:13:28 +01:00
Giuseppe Scrivano
140b47e8e9
skopeo: drop support for ostree
drop support for the ostree backend.  The only known user for the
backend is the atomic CLI tool that is not maintained anymore
upstream.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1766404

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-01 12:42:06 +01:00
Nalin Dahyabhai
7d251f5a74 copy: add a --all/-a flag
Add a --all/-a flag to instruct us to attempt to copy all of the
instances in the source image, if the source image specified to "skopeo
copy" is actually a list of images.  Previously, we'd just try to locate
one for our preferred OS/arch combination.

Add a couple of tests to verify that we can copy an image into and then
back out of containers-storage.  The contents of an image that has been
copied out of containers-storage need a bit of tweaking to compensate
for containers-storage's habit of returning uncompressed versions of the
layer blobs that were originally written to it, in order to be
comparable to the image as it was when it was pulled from a registry.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-10-22 11:05:42 -04:00
Valentin Rothberg
8c96dca362 bash completion: add comments to keep scattered options in sync
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-06 16:23:34 +02:00
Valentin Rothberg
1d8f5f29a5 bash completion: use read -r instead of disabling SC2207
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
b31f0da5c6 bash completion: support --opt arg completion
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
a02e57dde8 bash-completion: use replacement instead of sed
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
a000c1943d bash completion: disable shellcheck SC2207
Disabling SC2207 to continue setting COMPREPLY.

https://github.com/koalaman/shellcheck/wiki/SC2207

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
86e3564356 bash completion: double-quote to avoid re-splitting
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
c61a5ea2c4 bash completions: use bash replacement instead of sed
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
89bb6158eb bash completion: remove unused variable
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
646e197eed bash-completions: split decl and assignment to avoid masking retvals
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
699c25568c bash completion: double-quote fixes
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
0c579aca9c bash completion: hard-set PROG=skopeo
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
bc8281c016 bash completion: remove unused variable
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
91510e39ab bash completion: use || instead of -o
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Valentin Rothberg
7b0db25a74 bash completion: rm eval on assigned variable
warning: previous_extglob_setting is referenced but not assigned. [SC2154]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-03 13:00:25 +02:00
Tycho Andersen
8a1a26018b bash completion: add --dest-oci-accept-uncompressed-layers
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
2019-06-25 15:54:24 -06:00
Nalin Dahyabhai
7ae62af073 inspect: add a --config flag
Add a --config option to "skopeo inspect" to dump an image's
configuration blob in the OCI format, or the original format
if --config and --raw are specified.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-05-08 11:07:52 -04:00
juanluisvaladas
07287b5783 Add --no-creds flag to skopeo inspect
Follow PR #433
Close #421

Currently skopeo inspect allows to:
Use the default credentials in $HOME/.docker.config
Explicitly define credentials via de --creds flag

This implements a --no-creds flag which will query docker registries anonymously.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-05-03 13:30:33 -04:00
ERAMOTO Masaya
b434c8f424 completions: Use only spaces in indent
Since both of tabs and spaces in indentation were used and
there were tabs expected 4 spaces width and 8 spaces width,
only spaces use in indentation.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2019-03-06 11:45:41 +09:00
ERAMOTO Masaya
79de2d9f09 completions: Fix completions with a global option
After a global option was specified, a following string for global
options, commands, and command options was not complemented.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2019-03-06 11:45:13 +09:00
ERAMOTO Masaya
640b967463 completions: Introduce transports completions
Introduces bash completions for transports which commands (copy, delete,
and inspect) support.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2019-02-15 14:27:55 +09:00
ERAMOTO Masaya
790620024e completions: Fix bash completions when a option requires a argument
Since the string of options variable as pattern in the case statement has
not been delimited and it does not match the value of prev variable,
bash completions tries to complement any option even when a specified
option requires a argument.
This fix stops complementing options when a option requires a argument.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2019-01-23 19:14:26 +09:00
jianqli
3456577268 add command timeout support for skopeo
* add global command-timeout option for skopeo
2018-11-01 23:02:33 +08:00
Justin Lewis Salmon
0cea6dde02 Support host configuration for docker-daemon sources and destinations
This PR adds CLI support for overriding the default docker daemon host when using the
`docker-daemon` transport.

Fixes #244

Signed-off-by: Justin Lewis Salmon <justin.lewis.salmon@gmail.com>
2018-04-07 14:14:32 +10:00
Urvashi Mohnani
cbedcd967e Use credentials from authfile for skopeo commands
skopeo copy, delete, and inspect can now use credentials stored in the auth file
by the kpod login command
e.g kpod login docker.io -> skopeo copy dir:mydir docker://username/image

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2017-11-21 10:33:59 -05:00
Miloslav Trmač
e8fb01e1ed Add global --override-arch and --override-os options
This e.g. allows accessing Linux images on macOS.
2017-11-16 16:28:03 +01:00
Urvashi Mohnani
409dce8a89 Add manifest type conversion to skopeo with dir transport
User can select from 3 manifest types: oci, v2s1, or v2s2
skopeo copy defaults to oci manifest if the --format flag is not set
Adds option to compress blobs when saving to the directory using the dir transport
e.g skopeo copy --format v2s1 --compress-blobs docker-archive:alp.tar dir:my-directory

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2017-11-14 14:45:32 -05:00
Giuseppe Scrivano
1d5c681f0f skopeo: support copy to OSTree storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2017-04-24 20:23:45 +02:00
Nathaniel Kofalt
467a574e34 Add documentation for --insecure-policy flag
Signed-off-by: Nathaniel Kofalt <nathaniel@kofalt.com>
2017-03-24 17:30:01 -05:00
Erez Freiberger
52aade5356 fix cert-path references in completions/bash/skopeo 2017-03-20 16:16:57 +02:00
Antonio Murdaca
1215f5fe69
cmd: per command tls flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-08 17:56:22 +01:00
Dan Walsh
6dc36483f4 Complete bash completions for skopeo
Current code only handled commands not the options.
2016-11-30 13:22:57 -05:00