summaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index a2acbbf53..5134448da 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -6,6 +6,7 @@ import (
"os"
"path"
+ "github.com/containers/common/pkg/config"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/define"
@@ -81,7 +82,10 @@ var rootCmd = &cobra.Command{
SilenceErrors: true,
}
-var MainGlobalOpts cliconfig.MainFlags
+var (
+ MainGlobalOpts cliconfig.MainFlags
+ defaultContainerConfig = getDefaultContainerConfig()
+)
func initCobra() {
cobra.OnInitialize(initConfig)
@@ -175,3 +179,12 @@ func main() {
CheckForRegistries()
os.Exit(exitCode)
}
+
+func getDefaultContainerConfig() *config.Config {
+ defaultContainerConfig, err := config.Default()
+ if err != nil {
+ logrus.Error(err)
+ os.Exit(1)
+ }
+ return defaultContainerConfig
+}