From e62d08177024ab237d543d6f19c79631defece33 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 16 Apr 2020 21:54:31 -0400 Subject: Update podman to use containers.conf Add more default options parsing Switch to using --time as opposed to --timeout to better match Docker. Signed-off-by: Daniel J Walsh --- pkg/util/utils.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'pkg/util') diff --git a/pkg/util/utils.go b/pkg/util/utils.go index babf7dfc9..55e775d7a 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -13,6 +13,7 @@ import ( "time" "github.com/BurntSushi/toml" + "github.com/containers/common/pkg/config" "github.com/containers/image/v5/types" "github.com/containers/libpod/pkg/errorhandling" "github.com/containers/libpod/pkg/namespaces" @@ -27,6 +28,17 @@ import ( "golang.org/x/crypto/ssh/terminal" ) +var containerConfig *config.Config + +func init() { + var err error + containerConfig, err = config.Default() + if err != nil { + logrus.Error(err) + os.Exit(1) + } +} + // Helper function to determine the username/password passed // in the creds string. It could be either or both. func parseCreds(creds string) (string, string) { @@ -669,3 +681,7 @@ func swapSELinuxLabel(cLabel, processLabel string) (string, error) { dcon["type"] = scon["type"] return dcon.Get(), nil } + +func DefaultContainerConfig() *config.Config { + return containerConfig +} -- cgit v1.2.3-54-g00ecf