cgroupsns was not following containers.conf

Implement ParseCgroupsNamespace to handle defaults.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-04-30 08:40:16 -04:00
parent 4a2765c498
commit 97fcbfcbec
59 changed files with 591 additions and 487 deletions

View File

@ -927,25 +927,6 @@ func IsolationOption(isolation string) (buildah.Isolation, error) {
return defaultIsolation()
}
// ScrubServer removes 'http://' or 'https://' from the front of the
// server/registry string if either is there. This will be mostly used
// for user input from 'buildah login' and 'buildah logout'.
func ScrubServer(server string) string {
server = strings.TrimPrefix(server, "https://")
return strings.TrimPrefix(server, "http://")
}
// RegistryFromFullName gets the registry from the input. If the input is of the form
// quay.io/myuser/myimage, it will parse it and just return quay.io
// It also returns true if a full image name was given
func RegistryFromFullName(input string) string {
split := strings.Split(input, "/")
if len(split) > 1 {
return split[0]
}
return split[0]
}
// Device parses device mapping string to a src, dest & permissions string
// Valid values for device looklike:
// '/dev/sdc"