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 <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-04-16 21:54:31 -04:00
parent 5928e8fe80
commit e62d081770
39 changed files with 68 additions and 1496 deletions

View File

@ -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
}