mirror of
https://github.com/containers/podman.git
synced 2025-05-24 18:46:26 +08:00
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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user