github.com/coreos/rocket@v1.30.1-0.20200224141603-171c416fac02/rkt/image.go (about)

     1  // Copyright 2015 The rkt Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package main
    16  
    17  import "github.com/spf13/cobra"
    18  
    19  var (
    20  	cmdImage = &cobra.Command{
    21  		Use:   "image [command]",
    22  		Short: "Operate on image(s) in the local store",
    23  		Long: `This subcommand operates on image(s) in the local store.
    24  
    25  The "cat-manifest", "export", "extract", "render", and "rm" subcommands
    26  take the ID or image name to reference images in the local store.
    27  
    28  The ID can be specified using the long or short version, i.e. "sha512-78c08a541997",
    29  or "sha512-78c08a5419979fff71e615f27aad75b84362a3cd9a13703b9d47ec27d1cfd029".
    30  
    31  The image name can be specified including the version tag as stored in the local store,
    32  i.e. "quay.io/coreos/etcd:latest", or "quay.io/coreos/etcd:v3.0.13".
    33  
    34  The version tag may be left out, i.e. "quay.io/coreos/etcd".
    35  In case of ambiguity, the least recently fetched image with this name will be chosen.`,
    36  	}
    37  )
    38  
    39  func init() {
    40  	cmdRkt.AddCommand(cmdImage)
    41  }