mirror of
https://github.com/containers/skopeo.git
synced 2025-07-13 14:34:44 +00:00
Merge pull request #242 from runcom/fix-skopeo-layers
Fix skopeo layers and deprecate it
This commit is contained in:
commit
bd816574ed
@ -1,7 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/containers/image/directory"
|
"github.com/containers/image/directory"
|
||||||
@ -11,14 +14,17 @@ import (
|
|||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO(runcom): document args and usage
|
|
||||||
var layersCmd = cli.Command{
|
var layersCmd = cli.Command{
|
||||||
Name: "layers",
|
Name: "layers",
|
||||||
Usage: "Get layers of IMAGE-NAME",
|
Usage: "Get layers of IMAGE-NAME",
|
||||||
ArgsUsage: "IMAGE-NAME",
|
ArgsUsage: "IMAGE-NAME [LAYER...]",
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
fmt.Fprintln(os.Stderr, `DEPRECATED: skopeo layers is deprecated in favor of skopeo copy`)
|
||||||
|
if c.NArg() == 0 {
|
||||||
|
return errors.New("Usage: layers imageReference [layer...]")
|
||||||
|
}
|
||||||
rawSource, err := parseImageSource(c, c.Args()[0], []string{
|
rawSource, err := parseImageSource(c, c.Args()[0], []string{
|
||||||
// TODO: skopeo layers only support these now
|
// TODO: skopeo layers only supports these now
|
||||||
// eventually we'll remove this command altogether...
|
// eventually we'll remove this command altogether...
|
||||||
manifest.DockerV2Schema1SignedMediaType,
|
manifest.DockerV2Schema1SignedMediaType,
|
||||||
manifest.DockerV2Schema1MediaType,
|
manifest.DockerV2Schema1MediaType,
|
||||||
|
Loading…
Reference in New Issue
Block a user