// GetBase grabs the base layer and puts it in the cache.
GetBase grabs the base layer and puts it in the cache.
// GetBase grabs the base layer and puts it in the cache .
func GetBase(o BaseLayerOpts) error {
	switch o.Layer.From.Type {
	case types.BuiltLayer:
		return nil
	case types.TarLayer:
		cacheDir := path.Join(o.Config.StackerDir, "layer-bases")
		if err := os.MkdirAll(cacheDir, 0755); err != nil {
			return err
		}
		_, err := acquireUrl(o.Config, o.Storage, o.Layer.From.Url, cacheDir, o.Progress, "")
		return err
	case types.OCILayer:
		fallthrough
	case types.DockerLayer:
		return importContainersImage(o.Layer.From, o.Config, o.Progress)
	default:
		return errors.Errorf("unknown layer type: %v", o.Layer.From.Type)
	}
}
func GetBase ( o BaseLayerOpts ) error { switch o . Layer . From . Type { case types . BuiltLayer : return nil case types . TarLayer : cacheDir := path . Join ( o . Config . StackerDir , " " ) if err := os . MkdirAll ( cacheDir , 0755 ) ; err != nil { return err } _ , err := acquireUrl ( o . Config , o . Storage , o . Layer . From . Url , cacheDir , o . Progress , " " ) return err case types . OCILayer : fallthrough case types . DockerLayer : return importContainersImage ( o . Layer . From , o . Config , o . Progress ) default : return errors . Errorf ( " " , o . Layer . From . Type ) } }
GetBase grabs the base layer and puts it in the cache.
GetBase grabs the base layer and puts it in the cache .
/* now we can do all the containers/image types */