mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
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:
17
vendor/github.com/containers/buildah/pkg/cli/common.go
generated
vendored
17
vendor/github.com/containers/buildah/pkg/cli/common.go
generated
vendored
@ -13,6 +13,7 @@ import (
|
||||
"github.com/containers/buildah"
|
||||
"github.com/containers/buildah/pkg/parse"
|
||||
"github.com/containers/buildah/util"
|
||||
"github.com/containers/common/pkg/auth"
|
||||
"github.com/containers/common/pkg/config"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/pkg/errors"
|
||||
@ -150,7 +151,7 @@ func GetBudFlags(flags *BudResults) pflag.FlagSet {
|
||||
fs := pflag.FlagSet{}
|
||||
fs.StringVar(&flags.Arch, "arch", runtime.GOARCH, "set the ARCH of the image to the provided value instead of the architecture of the host")
|
||||
fs.StringArrayVar(&flags.Annotation, "annotation", []string{}, "Set metadata for an image (default [])")
|
||||
fs.StringVar(&flags.Authfile, "authfile", GetDefaultAuthFile(), "path of the authentication file.")
|
||||
fs.StringVar(&flags.Authfile, "authfile", auth.GetDefaultAuthFile(), "path of the authentication file.")
|
||||
fs.StringArrayVar(&flags.BuildArg, "build-arg", []string{}, "`argument=value` to supply to the builder")
|
||||
fs.StringVar(&flags.CacheFrom, "cache-from", "", "Images to utilise as potential cache sources. The build process does not currently support caching so this is a NOOP.")
|
||||
fs.StringVar(&flags.CertDir, "cert-dir", "", "use certificates at the specified path to access the registry")
|
||||
@ -278,17 +279,3 @@ func VerifyFlagsArgsOrder(args []string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetDefaultAuthFile() string {
|
||||
return os.Getenv("REGISTRY_AUTH_FILE")
|
||||
}
|
||||
|
||||
func CheckAuthFile(authfile string) error {
|
||||
if authfile == "" {
|
||||
return nil
|
||||
}
|
||||
if _, err := os.Stat(authfile); err != nil {
|
||||
return errors.Wrapf(err, "error checking authfile path %s", authfile)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user