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.SetLogLevel(logLevel); err != nil { return err } if err := resolveSourceContext(); err != nil { return err } return checkDockerfilePath() }, Run: func(cmd *cobra.Command, args []string) { if !checkContained() { if !force { logrus.Error("kaniko should only be run inside of a container, run with the --force flag if you are sure you want to continue.") os.Exit(1) } logrus.Warn("kaniko is being run outside of a container. This can have dangerous effects on your system") } if err := os.Chdir("/"); err != nil { logrus.Error(err) os.Exit(1) } image, err := executor.DoBuild(executor.KanikoBuildArgs{ DockerfilePath: absouteDockerfilePath(), SrcContext: srcContext, SnapshotMode: snapshotMode, Args: buildArgs, SingleSnapshot: singleSnapshot, Reproducible: reproducible, Target: target, }) if err != nil { logrus.Error(err) os.Exit(1) } if err := executor.DoPush(image, destinations, tarPath); err != nil { logrus.Error(err) os.Exit(1) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.