usernsFlags.StringVar(&flags.UserNS,"userns","","'container', `path` of user namespace to join, or 'host'")
usernsFlags.StringSliceVar(&flags.UserNSUIDMap,"userns-uid-map",[]string{},"`containerID:hostID:length` UID mapping to use in user namespace")
usernsFlags.StringSliceVar(&flags.UserNSGIDMap,"userns-gid-map",[]string{},"`containerID:hostID:length` GID mapping to use in user namespace")
usernsFlags.StringVar(&flags.UserNSUIDMapUser,"userns-uid-map-user","","`name` of entries from /etc/subuid to use to set user namespace UID mapping")
usernsFlags.StringVar(&flags.UserNSGIDMapGroup,"userns-gid-map-group","","`name` of entries from /etc/subgid to use to set user namespace GID mapping")
returnusernsFlags
}
// GetNameSpaceFlags returns the common flags for a namespace menu
fs.BoolVar(&flags.ForceRm,"force-rm",false,"Always remove intermediate containers after a build, even if the build is unsuccessful.")
fs.BoolVar(&flags.Layers,"layers",false,fmt.Sprintf("cache intermediate layers during build. Use BUILDAH_LAYERS environment variable to override. (default %t)",UseLayers()))
returnfs
}
// GetBudFlags returns common bud flags
funcGetBudFlags(flags*BudResults)pflag.FlagSet{
fs:=pflag.FlagSet{}
fs.StringSliceVar(&flags.Annotation,"annotation",[]string{},"Set metadata for an image (default [])")
fs.StringVar(&flags.Authfile,"authfile","","path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json")
fs.StringSliceVar(&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")
fs.BoolVar(&flags.Compress,"compress",false,"This is legacy option, which has no effect on the image")
fs.StringVar(&flags.Creds,"creds","","use `[username[:password]]` for accessing the registry")
fs.BoolVar(&flags.DisableContentTrust,"disable-content-trust",false,"This is a Docker specific option and is a NOOP")
fs.StringSliceVarP(&flags.File,"file","f",[]string{},"`pathname or URL` of a Dockerfile")
fs.StringVar(&flags.Format,"format",DefaultFormat(),"`format` of the built image's manifest and metadata. Use BUILDAH_FORMAT environment variable to override.")
fs.StringVar(&flags.Iidfile,"iidfile","","`file` to write the image ID to")
fs.StringSliceVar(&flags.Label,"label",[]string{},"Set metadata for an image (default [])")
fs.BoolVar(&flags.NoCache,"no-cache",false,"Do not use existing cached images for the container build. Build from the start with a new set of cached layers.")
fs.StringVar(&flags.Logfile,"logfile","","log to `file` instead of stdout/stderr")
fs.IntVar(&flags.Loglevel,"loglevel",0,"adjust logging level (range from -2 to 3)")
fs.StringVar(&flags.Platform,"platform","","CLI compatibility: no action or effect")
fs.BoolVar(&flags.Pull,"pull",true,"pull the image if not present")
fs.BoolVar(&flags.PullAlways,"pull-always",false,"pull the image, even if a version is present")
fs.BoolVarP(&flags.Quiet,"quiet","q",false,"refrain from announcing build instructions and image read/write progress")
fs.BoolVar(&flags.Rm,"rm",true,"Remove intermediate containers after a successful build (default true)")
fs.StringVar(&flags.Runtime,"runtime",util.Runtime(),"`path` to an alternate runtime. Use BUILDAH_RUNTIME environment variable to override.")
fs.StringVar(&flags.SignaturePolicy,"signature-policy","","`pathname` of signature policy file (not usually used)")
fs.BoolVar(&flags.Squash,"squash",false,"Squash newly built layers into a single new layer. The build process does not currently support caching so this is a NOOP.")
fs.StringSliceVarP(&flags.Tag,"tag","t",[]string{},"tagged `name` to apply to the built image")
fs.StringVar(&flags.CPUSetCPUs,"cpuset-cpus","","CPUs in which to allow execution (0-3, 0,1)")
fs.StringVar(&flags.CPUSetMems,"cpuset-mems","","memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.")
fs.StringVar(&flags.Isolation,"isolation",DefaultIsolation(),"`type` of process isolation to use. Use BUILDAH_ISOLATION environment variable to override.")
fs.StringVarP(&flags.Memory,"memory","m","","memory limit (format: <number>[<unit>], where unit = b, k, m or g)")
fs.StringVar(&flags.MemorySwap,"memory-swap","","swap limit equal to memory plus swap: '-1' to enable unlimited swap")