Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "executor", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { if err := util.ConfigureLogging(logLevel); err != nil { return err } if !opts.NoPush && len(opts.Destinations) == 0 { return errors.New("You must provide --destination, or use --no-push") } if err := cacheFlagsValid(); err != nil { return errors.Wrap(err, "cache flags invalid") } if err := resolveSourceContext(); err != nil { return errors.Wrap(err, "error resolving source context") } return resolveDockerfilePath() }, Run: func(cmd *cobra.Command, args []string) { if !checkContained() { if !force { exit(errors.New("kaniko should only be run inside of a container, run with the --force flag if you are sure you want to continue")) } logrus.Warn("kaniko is being run outside of a container. This can have dangerous effects on your system") } if err := os.Chdir("/"); err != nil { exit(errors.Wrap(err, "error changing to root dir")) } image, err := executor.DoBuild(opts) if err != nil { exit(errors.Wrap(err, "error building image")) } if err := executor.DoPush(image, opts); err != nil { exit(errors.Wrap(err, "error pushing image")) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.