...

Source file src/github.com/Microsoft/hcsshim/cmd/wclayer/makebaselayer.go

Documentation: github.com/Microsoft/hcsshim/cmd/wclayer

     1  package main
     2  
     3  import (
     4  	"path/filepath"
     5  
     6  	"github.com/Microsoft/hcsshim"
     7  	"github.com/Microsoft/hcsshim/internal/appargs"
     8  	"github.com/urfave/cli"
     9  )
    10  
    11  var makeBaseLayerCommand = cli.Command{
    12  	Name:      "makebaselayer",
    13  	Usage:     "converts a directory containing 'Files/' into a base layer",
    14  	ArgsUsage: "<layer path>",
    15  	Before:    appargs.Validate(appargs.NonEmptyString),
    16  	Action: func(context *cli.Context) error {
    17  		path, err := filepath.Abs(context.Args().First())
    18  		if err != nil {
    19  			return err
    20  		}
    21  
    22  		return hcsshim.ConvertToBaseLayer(path)
    23  	},
    24  }
    25  

View as plain text