From 76b071cf742fdf6926c9f00cd6e15d7c9e9845f0 Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Thu, 26 Oct 2017 00:56:43 +0200 Subject: [PATCH] cmd/copy: add {src,dst}-shared-blob-dir flags Only works for OCI layout sources and destinations. --- cmd/skopeo/copy.go | 10 ++++++++++ cmd/skopeo/utils.go | 1 + 2 files changed, 11 insertions(+) diff --git a/cmd/skopeo/copy.go b/cmd/skopeo/copy.go index cbee3c00..fc522d9f 100644 --- a/cmd/skopeo/copy.go +++ b/cmd/skopeo/copy.go @@ -121,5 +121,15 @@ var copyCmd = cli.Command{ Value: "", Usage: "`DIRECTORY` to use for OSTree temporary files", }, + cli.StringFlag{ + Name: "src-shared-blob-dir", + Value: "", + Usage: "`DIRECTORY` to use to fetch retrieved blobs (OCI layout sources only)", + }, + cli.StringFlag{ + Name: "dest-shared-blob-dir", + Value: "", + Usage: "`DIRECTORY` to use to store retrieved blobs (OCI layout destinations only)", + }, }, } diff --git a/cmd/skopeo/utils.go b/cmd/skopeo/utils.go index cdd99915..e78fce6d 100644 --- a/cmd/skopeo/utils.go +++ b/cmd/skopeo/utils.go @@ -17,6 +17,7 @@ func contextFromGlobalOptions(c *cli.Context, flagPrefix string) (*types.SystemC // them if per subcommand flags are provided (see below). DockerInsecureSkipTLSVerify: !c.GlobalBoolT("tls-verify"), OSTreeTmpDirPath: c.String(flagPrefix + "ostree-tmp-dir"), + OCISharedBlobDirPath: c.String(flagPrefix + "shared-blob-dir"), } if c.IsSet(flagPrefix + "tls-verify") { ctx.DockerInsecureSkipTLSVerify = !c.BoolT(flagPrefix + "tls-verify")